This documentation is for WSO2 Enterprise Integrator version 6.2.0 . View documentation for the latest release.

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

This sample explains on how to define a deadline with a human task. In this sample, the ClaimApprovalTask sample has been modified and defined with the deadline duration of 1 minute for the tasks with a claimed amount less than 10,000. In the event that the particular Claim Approval Task is overdue, the potential owners are sent a notification.

The following configuration snippet has been added to the ApproveClaim task.

 Click here to view the code snippet.
<htd:deadlines>
      <htd:startDeadline name="sendNotifications">
             <htd:documentation xml:lang="en-US">
                        if the claimed amount is less than 10000 - to the task's potential
                        owners to remind them or their todo.
             </htd:documentation>
             <htd:for>PT1M</htd:for>
             <htd:escalation name="reminder">
               <htd:condition>
                    <![CDATA[htd:getInput("ClaimApprovalRequest")/test10:amount <                           
                          10000]]>	
	           </htd:condition>
               <htd:toParts>
                       <htd:toPart name="firstname">
                           htd:getInput("ClaimApprovalRequest")/test10:cust/test10:firstname
                        </htd:toPart>
                        <htd:toPart name="lastname">
                            htd:getInput("ClaimApprovalRequest")/test10:cust/test10:lastname
                        </htd:toPart>
               </htd:toParts>
               <htd:localNotification reference="tns:ClaimApprovalReminder">
                        <htd:documentation xml:lang="en-US">
                                Reuse the predefined notification "ClaimApprovalReminder".
                                Overwrite the recipients with the task's potential owners.
                          </htd:documentation>
               </htd:localNotification>
             </htd:escalation>
        </htd:startDeadline>
</htd:deadlines>

Prerequisites

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 Claims Approval Task sample topic.
  3. Create users for the respective roles and assign those users to the roles as mentioned in the Claims Approval Task 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 ClaimsApprovalProcess.zip BPEL package has to be deployed as mentioned in the Claims Approval Task sample page. This BPEL package can be found in the <EI_HOME>/samples/business-process/bpel directory.
  2. The ClaimsApprovalTaskWithDeadline.zip HumanTask package has to be deployed as mentioned in the Claims Approval Task sample page. This HumanTask package can be found in the <EI_HOME>/samples/business-process/humantask directory.

Running the sample

This sample has to be run as already mentioned in the ClaimApprovalTask sample. See Running the Sample for details.

  • No labels