This documentation is for WSO2 Business Process Server version 3.5.1. View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

The conditional branching sample ( can be found in the <BPS-HOME>/repository/samples/bpmn directory. 

Flow of the sample

In this sample scenario, a loan approval process is displayed.

  1. The clerk user fills the required details (income and loan amount), which is then sent for confirmation.
  2. At the exclusive gateway, if the loan amount is higher than 50,000, a request is sent to the clerk user to revise the loan amount. In this case, the user can revise and resubmit the loan application.
  3. If the loan amount does not exceed 50,000, the "review application" task is triggered and the manager user can approve the loan application. 

The following XML code snippet is the LoanProcess.bpmn definition of the exclusive gateway that declares the condition mentioned above.

<sequenceFlow id="flow4" sourceRef="exclusivegateway1" targetRef="usertask3">
    <conditionExpression xsi:type="tFormalExpression"><![CDATA[${loanAmount>50000}]]></conditionExpression>

Note: usertask3 is the id of the "revise amount" task. At the declaration of the exclusive gateway, flow3 is defined as the default. This makes "review application" the default task that will be executed after the condition.

<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway" default="flow3"></exclusiveGateway>

Running the sample

  1. Log in to the BPMN Explorer using the clerk/clerk credentials.
  2. Select the PROCESSES tab to view the task in the task list.
  3. Click the Start button next to the LoanApprovalProcess sample. 
  4. Fill in the required details (i.e., income and loan amount) and click Start.
  5. If the loan amount is less than 50,000, select the MY TASKS tab. You will see the that another task has appeared on the list. 
    If the loan amount is more than 50,000, logout and login to the bpmn-explorer using the manager/manager credentials and select the MY TASKS tab. You will see the that another task has appeared on the list. 
  6. Click on the task and you will see the following screen where you (the manager) can either accept/reject it. Click on Complete Task to finish. 
  • No labels