This documentation is for WSO2 Enterprise Integrator version 6.1.1 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
Skip to end of metadata
Go to start of metadata

This sample explains on how to include human task renderings in a human task and the use of Human Task Explorer. Refer the Human Task Rendering section for more information on task renderings. In this sample, the ClaimApprovalTask sample has been modified by including HT renderings. For this, you must use the Human task explorer web app (https://localhost:9445/humantask-explorer) to view the tasks. Trying to view tasks from management console will cause an exception since this sample does not have relevant JSP pages. 

The following rendering configuration snippet has been added to the ApproveClaim task ( inside the <htd:task name="ApproveClaim"> element.

  	<!-- Display Input Information to the User -->
  	<htd:rendering type="wso2:input">
           	<wso2:element id="fname">
              	<wso2:label>First Name</wso2:label>
            	<wso2:element id="lname">
              	<wso2:label>Last Name</wso2:label>
           	<wso2:element id="amount">
                <wso2:label>Loan Amount</wso2:label>
            <wso2:element id="custId">
              	<wso2:label>Customer Identifier</wso2:label>
	<!-- Display elements to the user workspace which implements output message -->
	<htd:rendering type="wso2:output">
         	<wso2:element id="approved">
         		<wso2:label>Loan Approval Status</wso2:label>
              	<wso2:value type="boolean">Approved, Disapproved</wso2:value>


  • Try the ClaimApprovalTask sample to get a better understanding on human tasks and how they work.
  • WSO2 BPS 3.5.0 or a later version

Setting up the sample

  1. Set up the sample as mentioned in the Claims Approval Task Sample topic.
  2. Create the roles (regionalClerksRole and regionalManagerRole) as mentioned in the ClaimApprovalTask sample topic.
  3. Create users for the respective roles and assign those users to the roles as mentioned in the ClaimApprovalTask sample topic.

Deploy the sample

If you already deployed a human task sample, delete the relevant ZIP file from the <EI_HOME>/samples/business-process/humantasks directory to undeploy it before deploying another sample.

  1. The BPEL package has to be deployed as mentioned in the ClaimApprovalTask sample page. This BPEL package can be found in the<BPS_HOME>/repository/samples/bpel directory.
  2. If you have already installed the human task sample, un-deploy it. 
  3. Deploy the sample. This HumanTask package can be found in the <BPS_HOME>/repository/samples/humantask directory.

Running the sample

This sample has to be run as already mentioned in the ClaimApprovalTask sample until the step 6. See Running the Sample for details. After the step 6, follow the steps below.

  1. Login to the HumanTask Explorer (https://localhost:9445/humantask-explorer) as the "regionalClerkUser".
  2. Go to the "My Tasks" tab of the HumanTask Explorer web app (https://localhost:9445/humantask-explorer/mytasks)  where there will be a task listed as following.
  3. Click on the task row to open the task info page.
  4. Click on the Start button. Then the rendered task information can be seen as following.
  5. Check the checkbox for Approval Status and click on "Complete" button to complete the task or "Save" button to save the current info and to complete it at a later time. You can see the saved tasks from the "My Tasks" page under the "In Progress" filter.
  6. Once you complete the task, it will be listed under "Completed" filter. The history, attachments and comments for the task can be seen in the tabs at the bottom of the page.

    This is how you can use HT Renderings to display your task information.

  • No labels