Versions Compared

Key

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

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:9443/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 (ClaimsApprovalTask.ht) inside the <htd:task name="ApproveClaim"> element.


 

Code Block
<htd:renderings>
  	<!-- Display Input Information to the User -->
  	<htd:rendering type="wso2:input">
   		<wso2:inputs>
           	<wso2:element id="fname">
              	<wso2:label>First Name</wso2:label>
           		<wso2:value>$firstname$</wso2:value>
        	</wso2:element>
            	<wso2:element id="lname">
              	<wso2:label>Last Name</wso2:label>
            	<wso2:value>$lastname$</wso2:value>
        	</wso2:element>
           	<wso2:element id="amount">
                <wso2:label>Loan Amount</wso2:label>
         		<wso2:value>$euroAmount$</wso2:value>
      		</wso2:element>
            <wso2:element id="custId">
              	<wso2:label>Customer Identifier</wso2:label>
            	<wso2:value>/test10:ClaimApprovalData/test10:cust/test10:id</wso2:value>
			</wso2:element>
    	</wso2:inputs>
	</htd:rendering>
	<!-- Display elements to the user workspace which implements output message -->
	<htd:rendering type="wso2:output">
      	<wso2:outputs>
         	<wso2:element id="approved">
         		<wso2:label>Loan Approval Status</wso2:label>
               	<wso2:xpath>/test10:ClaimApprovalResponse/test10:approved</wso2:xpath>
              	<wso2:value type="boolean">Approved, Disapproved</wso2:value>
            	<wso2:default>Disapproved</wso2:default>
			</wso2:element>
   		</wso2:outputs>
	</htd:rendering>
</htd:renderings>

 


Prerequisites

  • 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

...

  1. Login to the HumanTask Explorer (https://localhost:9443/humantask-explorer) as the "regionalClerkUser".
  2. Go to the "My Tasks" tab of the HumanTask Explorer web app (https://localhost:9443/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.