Configuring Human Task Coordination
Enabling human task coordination
For the human task coordination to function properly, you need to enable task coordination at both the Task Parent and Task Processor. In WSO2 BPS, you can enable this feature in both Task Parent (B4P module) and Task Processor using the following configuration options. The following steps address human task processor configuration.
- Navigate to the
<PRODUCT_HOME>/repository/conf/
directory in your local machine and open the humantask.xml configuration file. Set the
TaskCoordinationEnabled
entry to true.<HumanTaskCoordination> <TaskCoordinationEnabled>true</TaskCoordinationEnabled> </HumanTaskCoordination>
Use the following steps to enable HumanTask Coordination in the B4P module (Task Parent).
- Navigate to the
<PRODUCT_HOME>/repository/conf/
directory in your local machine and open the b4p-coordination-config.xml file. Set the
TaskCoordinationEnabled
entry to true.<HumanTaskCoordinationConfiguration> <TaskCoordinationEnabled>true</TaskCoordinationEnabled> </HumanTaskCoordinationConfiguration>
Coordination Protocol Services and Registration service are implemented as WSO2 Carbon admin services. In order to access these services, a user needs to be authenticated to the system. In WSO2 BPS task coordination, these services are authenticated using a user created in BPS and configured within the config files. You can either create an individual user for authentication, or create an entire tenant where all users within it can authenticate task coordination. See the sections below:
Creating a predefined user for authentication
Use the following instructions to create a role and a user.
Step 1: Create a role
- Start the BPS server If it is not started already.
- Go to the Configure menu in the management console and navigate to Users and Roles > Role.
- Click "Add New Role".
- Enter a name for the role (e.g.: htcoordinatorRole) and click Next.
Select the following permissions for the newly created role.
These are minimum permission requirements.
- All Permissions \ Admin Permissions \ Login
- All Permissions \ Admin Permissions \ Manage \ HumanTask \ View Task List
- Click Finish.
Step 2: Create a user for the above created role
- Go to the Configure menu in the management console and navigate to Users and Roles > Users.
- Click "Add New User".
- Enter relevant values in the username and password fields.
- Click Next.
- Select the rolename defined above for the role
- Click Finish.
Step 3: Configure the above created user in b4p-coordination-config.xml
- Navigate to the
<PRODUCT_HOME>/repository/conf/
directory in your local machine and open the b4p-coordination-config.xml file. Set the username and password in the
TaskProtocolHandlerAuthentication
entry as follows.<TaskProtocolHandlerAuthentication> <Username>htcoor</Username> <Password>htcooradmin</Password> </TaskProtocolHandlerAuthentication>
Step 4: Configure the above created user in humantask.xml
- Navigate to the
<PRODUCT_HOME>/repository/conf/
directory and open the humantask.xml configuration file Set the username and password in the
RegistrationServiceAuthentication
entry as follows.<RegistrationServiceAuthentication> <Username>htcoor</Username> <Password>htcooradmin</Password> </RegistrationServiceAuthentication>
- You can configure two users for Humantask engine and B4P module.
- You can secure (encrypt) the plain text entries for the username and password in the configuration files using the WSO2 Secure vault tool. See advanced configuration section for this configuration.
Creating a tenant for authentication
Step 1: Create a registry resource in the tenant's configuration registry
- Start the BPS server If it is not started already.
- Navigate to Registry>Browse in the Main menu of the management console and click on
/_system/config.
- Click on Entries>Add Resource and fill the form using the values listed below for guidance. See Adding a Resource for more information.
- Method: Create Text Content
- Name: TaskCoordination
- Media type: text/plain
- Click Add to finish adding the resource.
Step 2: Create username and password registry properties and define credentials
Click on the registry resource you created (Task Coordination) found under the Entries section.
Add two new registry properties for the resource called "Username" and "Password", and define the tenant coordination user credentials. To do this, click Properties>Add New Property and enter the following values. See Managing Properties for more information.
- Username Property
Name: username
Value: (username value) - Password Property
Name: password
Value: (password value)
- Username Property
- Click Add to finish adding the property.