Along with library modules several example modules and applications are provided, demonstrating the main features of the solution. This includes a series of example applications for usage in different Usage Scenarios. They all share the same business process described in the next section.
Business context: Approval#
Take a look on the process model above. Imagine you are building a system that responsible for management of all approval requests in the company. Using this system, you can submit requests which then get eventually approved or rejected. Sometimes, the approver doesn't approve or reject, but returns the request back to the originator for correction (that is the person, who submitted the request). Then, the originator can amend the request and resubmit it or cancel the request.
An approval request is modelled in the following way. The subject describes what the request is about, the applicant is the person whom it is about (can be different from originator). Finally, the amount and currency denote the costs of the request. All requests must be stored for compliance purposes.
The request is initially created in
DRAFT mode. It gets to state
IN PROGRESS as soon as the process is started and will
eventually get to
REJECTED as a final state.
For sample purposes two groups of users are created: The Muppet Show (
Fozzy) and The Avengers (
Fozzy are responsible for approvals.
Let's play the following run through this process model.
Ironmansubmits an Advanced Training request on behalf of
- The request costs are provided in wrong currency and
Gonzoreturns the request to
Ironmanfor correction (EUR instead of USD)
Ironmanchanges the currency to USD and re-submits the request
Gonzois out of office, so
Fozzytakes over and approves the request
To run the example please consult the Usage Scenarios section.
Since the process application includes Camunda BPM engine, you can use the standard Camunda webapps by navigating to http://localhost:8080/camunda/app/. The default user and password are
admin / admin.
The following storyboard can be used to understand the mechanics behind the provided implementation:
TIP: In this storyboard, we assume you started the single node scenario and the application runs locally on http://localhost:8080. Please adjust the URLs accordingly, if you started differently.
To start the approval process for a given request open your browser and navigate to the
Example Tasklist: http://localhost:8080/polyflow/. Please note that the selected user is
Open the menu (
Start new...) in and select 'Request Approval'. You should see the start form for the example approval process.
Advanced Trainingfrom one of predefined templates and click Start. The start form will disappear and redirect back to the empty
Since you are still acting as
Ironmanthere are nothing you can do here. Please switch the user to
Gonzoin the top right corner and you should see the user task
Approve Requestfrom process
- Examine the task details by clicking Data tab in Details column. You can see the data of the request correlated to the current process instance.
- Click on the task name and you will see the user task form of the
Approve Requesttask. Select the option
Return request to originatorand click complete.
- Switch to
Workpiecesand you should see the request business object. Examine the approval request by clicking Data, Audit and Description tabs in Details column.
- Change user back to
Ironmanand switch back to the
Tasklistand open the
Amend requesttask. Change the currency to
USDand re-submit the request.
Change user back to
Fozzy, open the
Approve Requesttask and approve the request by selecting the appropriate option.
Workpiecesand you should still see the request business object, even after the process is finished. Examine the approval request by clicking Data, Audit and Description tabs in Details column.