Hands On Workflow - DigiBP/digibp.github.io GitHub Wiki
This hands-on gives you a basic introduction into workflow modelling, implementation and execution with the Camunda platform.
Contents:
- 1. Use Case Process
- 2. Human process flow
- 3. User tasks
- 4. Task forms
- 5. Read-only task forms
- 6. Model a gateway
- 7. Configure a gateway
- 8. Pools, lanes and message flows
- 9. Roles and groups
1. Use Case Process
The goal is to produce and digitalize a similar pizza service process as depicted in the following:
2. Human process flow
Model the four elementary tasks of the pizza service, including start and end event. Please select labels that correspond to the BPMN modelling convention.
3. User tasks
Change the task to user tasks where suitable. Then deploy and try to execute it. Now, some tasks should appear in the “All Tasks” filter of the tasklist app. You may also consult the cockpit app.
Question:
- Please investigate the tasklist app—what can you see now? You may also consult the cockpit app too.
4. Task forms
You may have experienced that there are just empty task forms. Please investigate how to add tasks forms. Then re-deploy and execute it, and add some data into the generated tasks forms.
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="pizzaType" label="Pizza:" type="string" />
<camunda:formField id="customerAddress" label="Address:" type="string" />
<camunda:formField id="pizzaPrice" label="Price:" type="string" defaultValue="19.90" />
<camunda:formField id="solvent" label="Solvent?" type="boolean" defaultValue="true" />
</camunda:formData>
</bpmn:extensionElements>
Question:
- Please investigate the tasklist app—what can you see now?
5. Read-only task forms
Not all roles require manipulating the data. The chef and partially the courier only need to read the data. Therefore, form fields can be made read-only by adding “readonly” as a constraint name. Then re-deploy and execute it, and add some data again into the generated tasks forms.
Question:
- Please investigate the tasklist app; claim and complete some tasks—what do the forms look like?
6. Model a gateway
Model a xor gateway with two outgoing sequence flows directing whether we have a solvent customer or not. If the customer is illiquid, the process needs to terminate; otherwise, it will continue.
7. Configure a gateway
Gateways work with workflow data. Configure the paths using '${solvent}' and '${solvent == false}'.
Questions:
- Where is the workflow data in our process?
8. Pools, lanes and message flows
Add a “Pizza Service” pool, following the three lanes: “Chef”, “Assistant”, “Courier”. Place the tasks on the appropriate lanes and add a “Customer” collapsed pool. Finally, add some message flows for readability.
9. Roles and groups
Assign corresponding candidate groups to the tasks and execute the workflow. Login with the users and investigate tasklist behaviour. Finally, try to assign a task to a user directly.
- "Chef" lane | "chef" candidate groups
- "Assistant" lane | "assistant" candidate groups
- "Courier" lane | "courier" candidate groups