There are two categories of steps you can use when building a workflow:
All steps have the following attributes:
- Description - a label that appears on the step. Use a short descriptive summary, for example Get patient name
- Execute Condition - a condition expression that determines whether the step should be executed or not. When the condition evaluates to false, the workflow skips it and continues execution on the Next link. This attribute is not available for Start steps or Test steps.
Every time a workflow runs, it begins at the Start step.
This is where you define the Workflow Properties available when the workflow starts. These properties can serve as input parameters when configuring triggers that start this workflow. They are also input parameters for other (larger) workflows that use this workflow in a Start Workflow step.
A workflow property has the following attributes:
- Name - this identifies the property
- Default Value - this is the value that the workflow uses in case the trigger did not supply a value for this property.
It is convenient to define things such as a URL to a third-party API as workflow properties, even if this information does not come from a trigger. This way you don't have to repeat the URL in every Command step when you need to use the API multiple times.
This step can be used to store results from other workflows, or calculate/combine data from a previously executed Command step. It adds or updates values for one or more workflow properties with the following attributes:
- Name - identifies the property. When the name is same as a previously-used property, the value replaces the previous value of that property.
- Value - the value that is assigned to the property. Can be either a fixed text/number, or a property expression
This step checks the value of one or more workflow properties and branches the workflow on different paths depending on the result of that check.
- Test Condition - the condition expression that the step checks. When the condition evaluates to "true", the step follows the Yes link. Otherwise, it follows the No link.
Start Workflow Step
This step starts another workflow, optionally waiting for that workflow to complete.
- Wait - whether to wait for the started workflow to finish before moving to the next step. Check this when you need to use results from the started workflow.
- Input Properties - properties to pass to the started workflow. They can be used as workflow properties in that workflow.
- Success Output Properties - properties to assign when the started workflow completed successfully. Here you may use as property values the output properties and success properties defined on the End step of the started workflow, if any.
- Error Output Properties - properties to assign when the started workflow failed. Here you may use as property values the output properties and error properties defined on the End step of the started workflow.
This step ends the current workflow. Optionally, you may assign output properties and mark the workflow as successful or failed. This is useful when the workflow is intended to be executed from another workflow, via the Start Workflow step.
- Failed Condition - a condition expression that lets you mark the workflow as successfully executed or not.
- Output Properties - properties which are always returned to the parent workflow, either when the current workflow has succeeded or has failed.
- Success Output Properties - output properties which are only returned to the parent workflow when the current workflow has succeeded (i.e. Failed Condition evaluates to false)
- Error Output Properties - output properties which are only returned to the parent workflow when the current workflow has failed (i.e. Failed Condition evaluates to true or wfsystem.status is set to failed)
The values of all output properties are evaluated as property expressions.
These steps integrate your workflow with the outside world. A command step takes some input parameters, executes an action and returns some output parameters that are the result of that action.
- Adapter - the command step's adapter. It is possible to change the adapter with another one having the same adapter type or the same command and command input properties. An autocomplete list shows what adapters are available for the selected command step.
- Input Properties - properties which are given to a command. Usually the properties are predefined. For example, to send an email you need to provide a To address, a Subject and so on.
- Success Output Properties - properties to assign when the command completed successfully. As property values, you may use one of the results that the command returns.
- Error Output Properties - properties to assign when the command failed. As property values, you may use one of the results that the command returns, or one of the predefined error, code or message workflow error results.