Skip to content

Latest commit

 

History

History
executable file
·
99 lines (79 loc) · 9.45 KB

exercise-6.md

File metadata and controls

executable file
·
99 lines (79 loc) · 9.45 KB

PrerequisitesExercise 1Exercise 1.1Exercise 2Exercise 3Exercise 4Exercise 5Exercise 6


Exercise 6 - Event Based Gateways and Intermediate Events

In the final exercise we will look at message flow between three organizations as well as how to continue a waiting process if no return message arrives. With this exercise we will add a third process and complete a message loop from Test_DIC to Test_COR to Test_HRP back to Test_DIC.

In order to solve this exercise, you should have solved exercise 5 and read the topics on Managing Multiple Incoming Messages and Missing Messages and Message Correlation.

Solutions to this exercise are found on the branch solutions/exercise-6.

Exercise Tasks

  1. Forward the value from the Task.input parameter of the dicProcess Task to the dsfdev_cosProcess using the HelloCosMessage. To do this, you need to override HelloCosMessage#getAdditionalInputParameters. Don't forget to also add the definition of your tutorial-input Input Parameter from task-start-dic-process.xml to task-hello-cos.xml.
  2. Modify the dsfdev_cosProcess to use a Message End Event to trigger the process in file hrp-process.bpmn. Figure out the values for the instantiatesCanonical, profile and messageName input parameters of the Message End Event based on the AcitvityDefinition in file hrp-process.xml.
  3. Modify the process in file hrp-process.bpmn and set the process definition key and version. Figure out the appropriate values based on the AcitvityDefinition in file hrp-process.xml.
  4. Add the process in file hrp-process.bpmn to the TutorialProcessPluginDefinition and configure the FHIR resources needed for the three processes.
  5. Add the CosTask, HelloHrpMessage , HrpTask and GoodbyeDicMessage classes as Spring Beans. Don't forget the scope.
  6. Modify the dsfdev_dicProcess:

Solution Verification

Maven Build and Automated Tests

Execute a maven build of the dsf-process-tutorial parent module via:

mvn clean install -Pexercise-6

Verify that the build was successful and no test failures occurred.

Process Execution and Manual Tests

To verify the dsfdev_dicProcess, dsfdev_cosProcess and dsfdev_hrpProcesses can be executed successfully, we need to deploy them into DSF instances and execute the dsfdev_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. Don't forget that you will have to add the client certificate for the HRP instance to your browser the same way you added it for the DIC instance in exercise 1 and exercise 4 or use the Keycloak user you created in exercise 3 for the hrp realm. Otherwise, you won't be able to access https://hrp/fhir. You can find the client certificate in .../dsf-process-tutorial/test-data-generator/cert/hrp-client/hrp-client_certificate.p12 (password: password).

  1. Start the DSF FHIR server for the Test_DIC organization in a console at location .../dsf-process-tutorial/dev-setup:

    docker-compose up dic-fhir
    

    Verify the DSF FHIR server started successfully.

  2. Start the DSF BPE server for the Test_DIC organization in a second console at location .../dsf-process-tutorial/dev-setup:

    docker-compose up dic-bpe
    

    Verify the DSF BPE server started successfully and deployed the dsfdev_dicProcess.

  3. Start the DSF FHIR server for the Test_COS organization in a third console at location .../dsf-process-tutorial/dev-setup:

    docker-compose up cos-fhir
    

    Verify the DSF FHIR server started successfully.

  4. Start the DSF BPE server for the Test_COS organization in a fourth console at location .../dsf-process-tutorial/dev-setup:

    docker-compose up cos-bpe
    

    Verify the DSF BPE server started successfully and deployed the dsfdev_dicProcess.

  5. Start the DSF FHIR server for the Test_HRP organization in a fifth at location .../dsf-process-tutorial/dev-setup:

    docker-compose up hrp-fhir
    

    Verify the DSF FHIR server started successfully. You can access the webservice of the DSF FHIR server at https://hrp/fhir.

  6. Start the DSF BPE server for the Test_HRP organization in a sixth console at location .../dsf-process-tutorial/dev-setup:

    docker-compose up hrp-bpe
    

    Verify the DSF BPE server started successfully and deployed the dsfdev_hrpProcess. The DSF BPE server should print a message that the process was deployed. The DSF FHIR server should now have a new ActivityDefinition resource. Go to https://hrp/fhir/ActivityDefinition to check if the expected resource was created by the BPE while deploying the process. The returned FHIR Bundle should contain a three ActivityDefinition resources. Also, go to https://hrp/fhir/StructureDefinition?url=http://dsf.dev/fhir/StructureDefinition/task-hello-hrp to check if the expected Task profile was created.

  7. Start the dsfdev_dicProcess by posting a specific FHIR Task resource to the DSF FHIR server of the Test_DIC organization 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 FHIR Task resource was created at the DSF FHIR server and the dsfdev_dicProcess was executed by the DSF BPE server of the Test_DIC organization. The DSF BPE server of the Test_DIC organization should print a message showing that a Task resource to start the dsfdev_cosProcess was sent to the Test_COS organization.
    Verify that a FHIR Task resource was created at the DSF FHIR server of the Test_COS organization and the dsfdev_cosProcess was executed by the DSF BPE server of the Test_COS organization. The DSF BPE server of the Test_COS organization should print a message showing that a Task resource to start the dsfdev_hrpProcess was sent to the Test_HRP organization.

    Based on the value of the Task.input parameter you send, the dsfdev_hrpProcess will either send a goodbyDic message to the Test_DIC organization or finish without sending a message.

    To trigger the goodbyDic message, use send-response as the http://dsf.dev/fhir/CodeSystem/tutorial#tutorial-input input parameter.

    Verify that the dsfdev_dicProcess either finishes with the arrival of the goodbyDic message or after waiting for two minutes.


PrerequisitesExercise 1Exercise 1.1Exercise 2Exercise 3Exercise 4Exercise 5Exercise 6