Conditions in Web-based Workflow Designer

A condition is an automated decision which is based on rules.

  • If one or mutliple rules are met,the output is true.

  • If not, the output is false.

For example, the incoming invoices in a company are processed based on their amount. The rule for this decision is “Amount > 10.000”. Invoices exceeding €10,000 are routed to a Senior Manager for approvement (rule is met = true), while those below this threshold go to the team level ( rule is not met = false).

Based on this simple principle, conditions route documents within the workflow to tasks or any other action allowing precise control over the direction and handling of each action.

Stand alone conditions or conditional output

Now when you are configuring a workflow, you may add a condition either

  • as a “stand alone” action of the type condition
    or

  • as a conditional output within any action like a task, a data assignment or even within a stand alone action condition.

The outcome would be almost the same for both methods. Which method for adding conditions you choose, depends on the workflow and your preference:

  • Canvas: The most noticeable difference lies in how the condition is represented in the canvas. The stand-alone condition is shown as a separate, distinct workflow element. The conditional output, on the other hand, is visible on the canvas, too, but listed in the settings of another workflow item of the type action.

    So, if an automatic decision is a crucial part of a workflow, it may be useful to mirror this on the canvas with a condition as a distinct action.

    Also, you may search for a condition action in the workflow list view on the canvas.
    Find an example how a stand alone condition action looks like in the article How to create a basic invoice approval workflow.

    If, on the other hand, the workflow is very complex and includes a lot of actions, the use of a conditional output would reduce the number of workflow items and make the workflow easier to follow.

  • Workflow history: Both a condition action and an action with conditional output would be visible in the workflow history.

  • Conditional behavior

    • In a stand alone condition, a basic condition is created, which returns “True” or “False” and routes the document in the workflow. For both results, you may chain multiple conditional outputs, which are validated AFTER the first condition has been checked and will exit to the first conditional output which results to True.

To define a condition, follow these steps:

  1. Add a condition to a workflow

  2. Set a condition

  3. Name the outputs

  4. Connect conditions with actions

  5. Handle unexptected workflow interruptions

1. Add a condition to a workflow

As said, you may add a condition to a workflow configuration as an action or as conditional output within an action.

1.1 Add a condition as action

By adding a Condition action, the condition is clearly separated from other actions.

  • Find the left sidebar and click on Action.  

  • Choose Condition as action.

  • Enter a specific title for the condition, because the condition name will be visible in the Web Client as a part of the workflow history.

1.2 Add conditions within an action

When creating an action such as - for example - a task or data assignment, you can define the conditional output within the action itself. This approach integrates conditions into the action, reducing visual clutter.

  • Find the conditions in the Output area of each workflow item:  

2. Specify a condition

A condition is always based on the index data of the current workflow document. To specify the condition you simply define index data, that needs to be met, similar to how you would set criteria for a search in DocuWare.

  • In the Condition dialog, click Set conditions to define the query.  

  • Combine conditions and condition groups to handle the most common scenarios.

  • Read more about grouping conditions in the query builder. (coming soon)

Alternatively, you can use expressions to cover even more complex use cases.

  • Within the Set conditions dialog click on advanced query.

  • Add your expressions.

  • Find more information about expressions:

3. Name the outputs

A condition always has two outputs, true and false. The outputs determine the next step based on whether the condition is met or not.

It is recommended to assign a specific name to the output to represent the "Then" and “False” command in the canvas, for the invoice amount check example (see above) “<10.000” and “>10.000”.

If you use condition as an action you may even select a color to represent the "Then" and “False” connectors in the canvas.

4. Connect conditional output with actions

Connect the conditional output with other workflow items to route the document.

Drag the connector lines from the output port to the input ports of an action - see here how it is done in detail:

  • How to connect actions (coming soon)

5. Handle errors in a condition

If the condition causes an error, it can unexpectedly pause the workflow, holding back the document.

To prevent unnecessary loops, specify the error handling:

  • In the condition workflow item go to the Errors tab.

  • Choose one of the options:

    • No error handling

    • Restart workflow

    • End workflow

    • Go to step

  • Read more about error handling

Find out how to configure a complete invoice approval workflow, including conditions.