Prerequisites • Exercise 0 • Exercise 1 • Exercise 1.1 • Exercise 2 • Exercise 3 • Exercise 4 • Exercise 5 • Exercise 6 • Exercise 7
Different execution paths in a process based on the state of process variables can be achieved using Exclusive Gateways. In Exercise 5 we will examine how this can be implemented by modifying the exampleorg_dicProcess.
In order to solve this exercise, you should have solved Exercise 4 and read the topics on Exclusive Gateways and Conditions.
Solutions to this exercise are found on the branch solutions/exercise-5.
- Add an exclusive gateway to the
exampleorg_dicProcessmodel and two outgoing sequence flows - the first starting the processexampleorg_cosProcess, the second stopping the processexampleorg_dicProcesswithout starting the processexampleorg_cosProcess. - Add condition expressions to each outgoing sequence flow which decides the path that will be taken based on a boolean value.
- In the
DicTaskclass, create a boolean variable which decides whether theexampleorg_cosProcessshould be started based on the start Task's input parametertutorial-input. - Add the boolean variable to the process execution variables, storing the decision. It needs to have the same name as the variable used in the condition expression from
2.
Execute a maven build of the dsf-process-tutorial parent module via:
mvn clean install -Pexercise-5
Verify that the build was successful and no test failures occurred.
To verify the exampleorg_dicProcess and exampleorg_cosProcesses can be executed successfully, we need to deploy them into DSF instances and execute the exampleorg_dicProcess. The maven install build is configured to create a process jar file with all necessary resources and copy the jar to the appropriate locations of the docker dev setup.
-
Start the DSF FHIR server for the
dic.dsf.testorganization in a console at location.../dsf-process-tutorial/dev-setup:docker-compose up dic-fhirVerify the DSF FHIR server started successfully at https://dic/fhir.
-
Start the DSF BPE server for the
dic.dsf.testorganization in a second console at location.../dsf-process-tutorial/dev-setup:docker-compose up dic-bpeVerify the DSF BPE server started successfully and deployed the
exampleorg_dicProcess. -
Start the DSF FHIR server for the
cos.dsf.testorganization in a third at location.../dsf-process-tutorial/dev-setup:docker-compose up cos-fhirVerify the DSF FHIR server started successfully at https://cos/fhir.
-
Start the DSF BPE server for the
cos.dsf.testorganization in a fourth console at location.../dsf-process-tutorial/dev-setup:docker-compose up cos-bpeVerify the DSF BPE server started successfully and deployed the
exampleorg_cosProcess. -
Start the
exampleorg_dicProcessby posting a specific FHIR Task resource to the DSF FHIR server of thedic.dsf.testorganization using either cURL or the DSF FHIR server's web interface. Check out Starting A Process Via Task Resources again if you are unsure.Verify that the
exampleorg_dicProcesswas executed successfully by thedic.dsf.testDSF BPE server and possibly theexampleorg_cosProcessby thecos.dsf.testDSF BPE server, depending on whether decision of your algorithm based on the input parameter allowed to start theexampleorg_dicProcess.
Prerequisites • Exercise 0 • Exercise 1 • Exercise 1.1 • Exercise 2 • Exercise 3 • Exercise 4 • Exercise 5 • Exercise 6 • Exercise 7