Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Most processes depict real-life, practical business or scientific scenarios which need the interactions of a human at least once in its workflow design. Typically, these interactions are initiated by the process itself, and requests a user input to proceed. For example, consider a "bank loan request" process which often requires the final decision to be taken by a human.

...

If human task management capability is not included in your product by default, you can add it by installing the above feature using the instructions given in section, Feature Management. Follow the instructions below to add a human task.
1.

  1. Log on to the product's management console and select "Human Tasks-> Add" under the "Main" menu.
    Image Modified 

...

  1. The "New HumanTask Package" window opens. Provide the file and click "Upload.

...


  1. Image Modified

...

  1. The "Deployed Task Configurations" window opens with the newly-added human task listed. For example,

Image Removed

    • Package Name:    The name of the package.
    • Task Definition:   The task definition
    • Type: Whether this definition is a Task or a

...

    • Notification 
    • Status: The package status.

...

  1. Click on a selected "Task Definition".
    Image Modified
Excerpt
hiddentrue

Information on defining and adding human tasks to WSO2 BPS which facilitates human task management according to WS-Human Task specification.

 

Writing a human task artifact

...

ElementDescription
Code Block
languagejava
<htd:humanInteractions>
Contains declarations of elements from WS- HumanTask namespace, that is <htd:logicalPeopleGroups>, <htd:tasks>  and  <htd:notifications>.
Code Block
languagejava
<htd:import>

Used to import appropriate wsdl files. You should correctly specify the name spaces.

Example:

Code Block
languagejava
<htd:importnamespace="http://reminder.sample.humantask.wso2.org"location="OrderProcessReminder.wsdl"importType="http://schemas.xmlsoap.org/wsdl/">
Code Block
languagejava
<htd:logicalPeopleGroups>

Used to specify logical people groups used in an inline human task or a people activity. The name attribute contains the name of the logical people group. The name must be unique among the names of all logical people groups defined within the <htd:human Interactions> element.  

Code Block
languagejava
<htd:logicalPeopleGroups>   
<htd:logicalPeopleGroupname="regionalClerks">  
<htd:documentationxml:lang="en-US"> 

 The group of clerks responsible for the region specified.  

Code Block
languagejava
</htd:documentation>fd   
<htd:parametername="role" type="xsd:string"/>  
</htd:logicalPeopleGroup>
Code Block
languagejava
<htd:tasks>

Specifies the human tasks used in the business process.

Code Block
languagejava
<htd:tasks>
        <htd:task1>
        <htd:task2>
        <htd:task3>
<htd:tasks>
Code Block
languagejava
<htd:task> 

Used to provide the definition of an inline human task. The name attribute specifies the name of the task. The name must be unique among the names of all tasks defined within the <htd:tasks> element.

It also consists of the <htd:interface>, <htd:peopleAssignments> and <htd:presentationElements> elements which are used to described the task.

Code Block
languagejava
<htd:task name="OrderProcess">  
<htd:interface/>
<htd:peopleAssignments/>
<htd:presentationElements/>
</htd:task>
Code Block
languagejava
<htd:interface>

Specifies the port types and operations of the human task.     

Code Block
languagejava
<htd:interface 
 portType="cl:ClaimsHandlingPT"  
  operation="approve"   
 responsePortType="cl:ClaimsHandlingCallbackPT"   
  responseOperation="approvalResponse"/>  
Code Block
languagejava
<htd:peopleAssignments>

Used to assign people to process-related generic human roles.
 

Code Block
languagejava
<<htd:peopleAssignments>
                <htd:potentialOwners>
                    <htd:from logicalPeopleGroup="regionalClerks">
                        <htd:argument name="role">
                            regionalClerksRole
                        </htd:argument>
                    </htd:from>
                </htd:potentialOwners>
                <htd:businessAdministrators>
                    <htd:from logicalPeopleGroup="regionalManager">
                        <htd:argument name="role">
                            regionalManagerRole
                        </htd:argument>
                    </htd:from>
                </htd:businessAdministrators>
            </htd:peopleAssignments>
Code Block
languagejava
<htd:documentation> 

Provides annotations for users.

<htd:documentation>  

Example for WS-HumanTask 1.1 - WS-HumanTask Task Definition  

</htd:documentation>  

Code Block
languagejava
<htd:from>
<htd:argument> 

From element used to assign people for roles which have been specified in the business process. Argument element will pass values used in the people query.

Code Block
languagejava
 <htd:from logicalPeopleGroup="regionalClerks">
                        <htd:argument name="role">
                            regionalClerksRole
                        </htd:argument>
                    </htd:from>
Code Block
languagejava
<htd:presentationElements>

Specifies the user interface for human tasks or how the user interacts with the human task.

Code Block
languagejava
<htd:presentationElements>   
<htd:name xml:lang="en-US">Approve Claim
</htd:name>  
<htd:name xml:lang="de-DE">Genehmigungder Schadensforderung  
</htd:name>   
<htd:presentationParameters>   
<htd:presentationParametername="firstname"  
  type="xsd:string">   
 htd:getInput("ClaimApprovalRequest")/test10:cust/test10:firstname   
</htd:presentationParameter>   
</htd:presentationParameters>
Code Block
languagejava
<htd:notifications>

Used to provide the definition of an inline notification.The name attribute specifies the name of the notification. The name must be unique among the names of all notifications defined within the <htd:notifications> element.

Code Block
languagejava
<htd:notifications>   
  <htd:notificationname="ClaimApprovalReminder">  
  <htd:documentationxml:lang="en-US">

...

Code Block
languagejava
createTaskOutput = function() {
	var outputVal = getCheckedRadio(); //get approve or not from radio button

if(outputVal == 'approve') {return'<sch:ClaimApprovalResponse 	xmlns:sch="http://www.example.com/claims/schema"><sch:approved>true</sch:approved></sch:ClaimApprova	lResponse>';
	} else if (outputVal == 'disapprove') {return'<sch:ClaimApprovalResponse 	  
xmlns:sch= "http://www.example.com/claims/schema"> <sch:approved>false</sch:approved>
</sch:ClaimApprov	 alResponse>';
}
	};

Output JSP will be used by the regional clerk user to approve the claim.

...

Info

An additional .jsp called <TaskName>-Reminder-input.jsp exists to send reminders for task caller.

...

Excerpt
hiddentrue

Information on defining and adding human tasks to WSO2 BPS which facilitates human task management according to WS-Human Task specification.