Variables in Web-based Workflow Designer

Prev Next

Variables are placeholders vor specific values which can be re-used multiple times throughout a workflow. Variables allow dynamic adjustments based on different inputs and conditions.

In a document workflow it's often necessary to use values from the document's index data. A variable can be used to store the current date and time, which can then be referenced throughout the workflow for tasks such as timestamping documents or scheduling automated actions.

In the workflow, you may use both global variables and system variables. Global variables are defined by you, while system variables are pre-set.

Global variables

Global variables are placeholders for specific values in multiple actions throughout one workflow.

  • Example: If the customer number is entered in the workflow task form for an invoice, the customer name is retrieved from an external database and stored in a workflow global variable. This name can then be used in another workflow step. Global variables can also be displayed in the Web Client task list.

Creating Global Variables

  • Go to a workflow canvas and hit the icon Variables in the right-hand sidebar.

  • Enter a unique name for identification, e.g., "MyOrderNumber."

  • Select the variable type from the dropdown list:

    • Text: Maximum length is 255 characters.

    • Integer or Decimal Number: For decimals, specify the number of decimal places.

    • Date or DateTime: Use for date type variables.

    • Keyword: Several values can be stored in a keyword variable: e.g. several order numbers.
      However, it is not possible to select individual values from this variable during assignment – unlike User, Role, and Substitution rule, which can be used as list variables.

    • User, Role and Substitution Rule: These are list variables. They can contain one or more values.
      The list variable option allows individual users to be selected from the respective list in a later step.

Editing Variables

You can edit the name of a variable in the variable list even if it is already used in the workflow, but not the type. The variable does not need to be removed from the configuration first.

When the variable name is changed, it is automatically updated wherever it occurs in the workflow, including in free SQL commands like data assignments.

Hyphens are stored internally as double underscores. When selected, the global variable will be displayed in the list with double underscores.

System variables

System variables are parameters automatically set and updated by the DocuWare system – depending on the variable type:

For example:

  • The 'last decision user' is automatically the user who made the last decision. This variable will be updated.

  • 'Document URL' and 'Organization GUID' however are system variables that remain unchanged."

List of system variables:

System variable

Description

Workflow name

Contains the workflow name that was specified in the Create New Workflow > General dialog

Start date/time

Includes date and time at which the workflow instance was started

Activity

Contains the name of the current activity

Assigned

Contains the name of the user, the role, or the substitution rule via which the task is assigned

Last error activity

Contains the name of the error activity

Last decision user

Contains the user who made the last decision

Last error message

Contains the type of error

Current user

Contains the most recent active user, i.e. the user that last edited the task in DocuWare Client

Task user

Contains the currently active user, i.e. the user that is currently editing the task in DocuWare Client

Received on

Contains the date on which the current task in the employee's task list was incorporated

Reminder date

Contains the date and time for which the reminder settings for the current task were specified

Pending date

Contains the date and time for which the pending settings for the current task were specified

Current date

Contains the current date and current time


FAQ

How to compare variables in conditions?

To compare variables within conditions, please note the following tips. The following operators are available for comparing variables: =, >=, >, <, <=

Date variables

When comparing variables with a fixed date value, the date must be defined according to one of the following notations:
cdate("YYYY/MM/DD")
cdate("YYYY-MM-DD")
cdate("YYYY.MM.DD")

Numeric variables

When comparing numeric variables, all variables must have the same number of decimal places. If two variables with different numbers of decimal places are to be compared, you must first give them the same number of decimal places by Assigning Data and using another variable.

Example:

You want to compare Variable 1 and Variable 2 even though they have different numbers of decimal places.

1. The following are set:

Variable 1 (0 decimal places)
Variable 2 (2 decimal places)
Variable 3 (0 decimal places)

2. Assigning Data activity:

Variable 3 = Variable 2*100

3. Result:

Variable 1 and Variable 3 now have the same number of decimal places and can be compared with each other in a condition.