The following example demonstrates creating a business process scenario to simulate an order approval process. The Production Manager invokes an order approval process where it is possible to set the product ID. Additionally, an admin user of the Production Division can set the quantity to order and the unit price of the product. The quantity and the unit price are used to calculate the total cost. If the total cost is above 100,000, the order will have to be approved by an admin user from the Production Division before the order email is dispatched to the Purchasing Division. Alternatively, if the cost is below 100,000, the order email is dispatched to the Purchasing Division without approval.
Tip | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Before you begin,
|
Let's get started! This tutorial includes the following sections:
...
If you have not started the business profile previously, make sure to start it.
Panel borderColor #542989 bgColor #ffffff borderWidth 1 Localtabgroup Localtab title On MacOS/Linux/CentOS Open a terminal and execute the following command:
Code Block wso2ei-6.46.0-business-process
Localtab title On Windows Go to Start Menu -> Programs -> WSO2 -> Enterprise Integrator 6.46.0 Business Process. This will open a terminal and start the business process profile.
- Log in to the BPMN-explorer at https://localhost:9445/bpmn-explorer using
admin
for both the username and password. - Click PROCESSES in the top menu, and click the Start option of the Order Approval Process.
- Enter a value for the Product Id and click Start. This creates a Claimable Task.
- Click TASKS in the top menu, and then click Claimable Tasks.
- Click on the new Claimable Task.
- Click Claim Task on the next Fill Order Form screen.
Enter values for the Quantity and Unit Price to get a total value (i.e.,
Quantity * Unit Price
), which is less than 100,000, and click Complete Task.
You view the claimable task being completed and removed from the TASKS list, since the total value you entered (i.e.,Quantity * Unit Price
) is less than 100,000.Tip Click TASKS → COMPLETED TASKS to view the completed task.
Also, you will receive an email to the recipient email address you defined.
- Follow the above steps again by entering values for the Quantity and Unit Price to get a total value (i.e.,
Quantity * Unit Price
), which is more than 100,000. - Click TASKS → CLAIMABLE TASKS. Since you are logged in as the administrator, you view the Claimable Task, which is created for the administrator to approve the order.
- Click on the Task and click Complete Task to approve the order.
- Click on the task, click Claim Task, and then click Complete Task.
You will receive an email to the recipient email address you defined.