The following scenario simulates a simple leave approval business process, in which an employee fills a form and submits the leave request to the manager and the manager approves or rejects it. The process ends if the manager approves the request. Otherwise, if the manager rejects it, the employee will be able to resend the leave request by adjusting it.
Tip | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Before you begin,
and download it from here.
|
Let's get started! This tutorial includes the following sections:
...
Deploying the artifacts
- For instructions on creating the deployable artifacts, see Creating the deployable archive.
- For instructions on deploying them, see Deploying BPMN artifacts.
Creating the user
Make sure that you have started the Business Process profile of WSO2 EI.
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.4.0-business-process
Localtab title On Windows Go to Start Menu -> Programs -> WSO2 -> Enterprise Integrator 6.4.0 Business Process. This will open a terminal and start the business process profile.
- Log in to the Management Console of the Business Process profile.
- Click Configure → Users and Roles → Add → Add New User.
Enter the below details to create a user called
manager
and click Next.Tip Enter both the User Name and the Password as
manager
.In the next screen, assign the user to the
admin
role and click Finish.You view the new user you created as shown below.
Testing the output
Follow the steps below to test the output.
- 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 Leave Approval Process.
Initiate the process by filling the form and click Start.
You view a pop-up message upon successful process initiation.
Initiate the process again by filling the form again and click Start .
Tip You create two tasks to test the output of both leave approval and leave rejection.
- Log out and log in again using
manager/manager
credentials. - Click TASKS and then click MY TASKS . You view two tasks created.
- Click on the first task, select A pprove from the drop down list and click Complete Task .
You view the task in the TASKS → COMPLETED TASKS list. Also, you will not view any tasks created if you log out and log in again usingadmin/admin
credentials and click TASKS → MY TASKS. - Click TASKS and then click MY TASKS again, click on the second task, which is left now, select Reject from the drop down list and click Complete Task .
- Log out and log in again with
admin/admin
credentials, and click TASKS → MY TASKS.
You view the Adjust vacation request T ask.
- Click on the Adjust vacation request T ask, change the details and click Complete Task to resend the leave application.
- Log out and log in again with
manager
/manager
credentials, and click TASKS → MY TASKS .
You view another Task in TASKS → MY TASKS list, which you can approve or reject as you did before.