A condition is an activity in a DocuWare workflow that makes an automated yes/no decision based on the rules you define. If one or more rules are met, the output is true. Otherwise, the output is false.
Based on this principle, conditions route documents within the workflow to tasks or any other activity.
Example: The incoming invoices of a company are processed based on their amount. The rule for this decision is “Amount > 10.000”.
The condition is met / true: The amount of an invoice exceeds €10.000. The invoice is routed to a Senior Manager for approvement.
The condition is not met / false: The amount is below the threshold of €10.000. The invoice directed to team level.
1. Adding a condition
To add a condition to the workflow, navigate to DocuWare Configurations > Collaboration > Workflow Designer.
Click the button New Workflow or Edit an existing one to open the workflow in the canvas.
There are two options to a add a condition:
Add a condition as an activity
Use the outputs of the trigger or an activity to define conditions:
Use whichever option suits your preference; both produce the same results. Refer to the box below to learn more about the difference of a condition as an activity or as output.
For both options, enter a meaningful name. The condition title will be visible in the Web Client as a part of the workflow history.
Comparing a condition activity and conditional output
A condition activity and a conditional Output produce identical results and use the same configuration. Which option fits better, depends on the workflow and your preference.
Consider the following aspects:
Representation on the canvas: The condition activity is shown as a separate, distinct workflow item, like “Route invoice”. Conditional Outputs are embedded in the settings of an activity or of the trigger.
If the condition is a basic step of a workflow like the routing of an invoice, it may be useful to mirror this on the canvas with a condition activity. However, if the workflow includes multiple activities, the use of a conditional output reduces visual clutter and makes the configuration easier to read.Search in canvas: You can search for a condition activity in the workflow list view.
Workflow history: Both a condition activity and conditional output would be visible in the workflow history.
Chain multiple conditional outputs: The condition activity returns a basic “True” or “False” output. For both decisions “True” or “False”, you may chain multiple conditional outputs, which are validated AFTER the first condition has been checked. The workflow will follow the first path whose condition is met - the first one that evaluates to ‘True’.
2. Configuring a condition
A condition is an automated decision based on the index data of the current workflow document.
Define the index data that needs to be met to set the conditions:
In the Condition dialog, click Set conditions to define the rule.
Combine conditions and condition groups to handle the most common scenarios.
The rule in the example below states: If the amount of an invoice exceeds €10.000, the condition is met - true. If the amount is below the threshold of €10.000, the conditions is not met - false.
Read more about Filtering documents based on index criteria.
Activate in Set conditions the option Advanced query to use expressions and cover more complex use cases.
Read more about using expressions in a workflow configuration
Read more about Workflow Expression Parser
3. Naming the outputs
A condition always has two outputs. They are named True and False by default.
Customize the output names to keep your workflow clear.
Example: When routing invoices, using labels such as < 10,000 and > 10,000 is clearer than relying on True and False.
The output names are not visibile in the Web Client.
If you use the condition as an activity you may even select a color to represent the True and False connectors in the canvas.
4. Connecting the outputs with activities
Connect the output of the automated decision with other workflow activities to route the document in the workflow.
Drag the connector lines from the output port to the input ports of an activity.
5. Handling errors
An error in the condition can unexpectedly pause the workflow and delay the document.
In a Conditon acitivity you may specify the error handling to prevent unnecessary loops.
Go to Condition > Action to the tab Errors.
Choose one of the following options:
No error handling
Restart workflow
End workflow
Go to step
Read more about error handling in a workflow.