This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Claims Approval task with HT Renderings Sample
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 (ClaimsApprovalTask.ht) inside the <htd:task name="ApproveClaim"> element.
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
Setting up the sample
- Set up the sample as mentioned in the Claims Approval Task Sample topic.
- Create the roles (regionalClerksRole and regionalManagerRole) as mentioned in the ClaimApprovalTask sample topic.
- 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.
- The ClaimsApprovalProcess.zip 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. - If you have already installed the ClaimsApprovalTask.zip human task sample, un-deploy it.Â
- Deploy the ClaimsApprovalTaskWithHTRenderings.zip 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.
- Login to the HumanTask Explorer (https://localhost:9445/humantask-explorer) as the "regionalClerkUser".
- 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.
- Click on the task row to open the task info page.
- Click on the Start button. Then the rendered task information can be seen as following.
- 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.
- 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.