Task
Task
The FHIR Task resource enables the DSF's distributed communication. Whenever a BPMN process instance communicates with a different process instance, the DSF will create a Task resource based on parameters set in the BPMN model and during execution. It will then automatically send the Task resource to the recipient to start or continue whatever process the Task resource referred to. All Task resources used in the DSF derive from the DSF Task base definition. This profile includes a splicing for Task.input with three additional Input Parameters:
message-namebusiness-keycorrelation-key
When creating a process plugin, it is usually necessary to create new profiles based on the DSF Task base definition and put them into src/resources/fhir/StructureDefinition.
Task Input Parameters
Task Input Parameters allow adding additional information to Task resources before they are starting a process. For example, if a particular process requires an additional string value, one would add a slice to the Task profile in the same way the DSF Task base definition adds slices to the original FHIR Task resource in the message-name slice. It is import to know that this also requires creating a CodeSystem and including it in a ValueSet to be able to use it in the Task resource.
Task Output Parameter
Task Output Parameters function the same way as Input Parameters but are used to add information when a process has finished executing. This is usually used to display the result of the executed process. If the process fails because an uncaught exception is thrown, the DSF will update a Task to status failed and include the exception as an Output Parameter.