Versions Compared

Key

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

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,

  • Download the product installer from here, and run the installer.
    Insert excerpt
    Installing the Product
    Installing the Product
    nopaneltrue
  • Select the relevant WSO2 Integration Studio based on your operating system and download it from here.
    The path to this folder is referred to as <EI_TOOLING> throughout this tutorial.

    Info

    Getting an error message? See the troubleshooting tips given under Installing WSO2 Integration Studio.

Let's get started! This tutorial includes the following sections:

...

  1. If you have not started the business profile previously, make sure to start it.

    Panel
    borderColor#542989
    bgColor#ffffff
    borderWidth1
    Localtabgroup
    Localtab
    titleOn MacOS/Linux/CentOS

    Open a terminal and execute the following command:

    Code Block
    wso2ei-6.46.0-business-process
    Localtab
    titleOn 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.

  2. Log in to the BPMN-explorer at https://localhost:9445/bpmn-explorer using admin for both the username and password.
  3. Click PROCESSES in the top menu, and click the  Start  option of the Order Approval Process.

  4. Enter a value for the Product Id and click Start. This creates a Claimable Task.
  5. Click TASKS in the top menu, and then click Claimable Tasks
  6. Click on the new Claimable Task.

  7. Click Claim Task on the next Fill Order Form screen.
  8. 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 TASKSCOMPLETED TASKS to view the completed task.

    Also, you will receive an email to the recipient email address you defined.

  9. 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.
  10. 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. 
  11. Click on the Task and click Complete Task to approve the order.
  12. Click on the task, click Claim Task, and then click Complete Task.

    You will receive an email to the recipient email address you defined.