Notifying Participants
When the process completes, none of the participants are aware that the onboarding for the new developer has been completed.
Go to Camunda Modeler. The tool will have noticed that the process model has changed on disk (by checking out the new tag) and ask you to reload it. After doing so, you can continue editing.
Add a new task just before the end of the process and call it Notify Onboarding. Change the type to a Call Activity. This type of task calls another process model when the model containing it arrives at the task.
Link Notify Onboarding to the new process in the workspace by selecting the call activity and going to the Called element section of its configuration.
Choose BPMN as the Type and specify notify-onboarding as the Called element.
Open up the configuration section In mapping propagation and select the check box Propagate all variables.
Save the updated process model.
When the process arrives at the Notify Onboarding task, it will attempt to start a process called notify-onboarding and ensure all of the variables in the Onboard Developer process instance are copied into the subprocess.
Open up the file notify-onboarding.bpmn in Camunda Modeler using or Ctrl+O.
Inspect the model to learn how it works.
Test the Model
While in Camunda Modeler, deploy the Notify Onboarding process to the process engine with the 🚀 button. It needs to be deployed if a Onboard Developer process instance needs to call it at runtime.
Head over to Tasklist and start two new instances of Onboard Developer. Fill in some value for the e-mail address for the first one and leave the e-mail field blank for the other. Complete the user tasks for both processes and check the output of the docker logs.
$ docker logs --follow ID
You should see that one process instance completes (verify this in Cockpit), including the subprocess and the other stops at the user task in the sub process. Complete that task in Tasklist to complete the second process as well.
| You can inspect the values of the variables in the sub process instances using Cockpit, even after they have completed; this allows you to see the variables that were propagated to the sub process. |
Well done, participants are now much better informed when the onboarding is completed!