Preconditions, Postconditions, Conditions

The Preconditions, Postconditions and Conditions areas are all structured in the same way and have similar functions. You use them to define conditions and actions that will be processed when the workflow task runs.

General Information

The Conditions tab is only available in the START object of IF Workflows. You use it to determine if and when the TRUE or FALSE branches should be processed. It can also include any conditions and actions.

Preconditions and Postconditions are available in the properties of every workflow task. The conditions and actions that are defined in the Preconditions tab will be processed before the workflow task runs. The ones that are defined in the Postconditions will be processed afterwards.

Important! Preconditions in a Workflow can only use variables that are available to the task, even if the precondition is part of the Workflow. If the task does not inherit the object values from its parent, they cannot be used in conditions.

A condition verifies something and an action either carries out a regular or a final action. The difference of these two types is that after a final action, neither further conditions will be evaluated nor actions taken. This means that after a final action, the task or the TRUE or FALSE branch of the IF Workflow starts in the Preconditions and Conditions tab.

Conditions can include other conditions and actions. The nesting depth is not limited.

Structure of Conditions and Actions

Conditions and actions appear in blocks that group related statements together to form the entire condition.

A condition block starts with IF. You can add multiple conditions that need to be evaluated together. The additional conditions appear in blocks that start with AND IF.

The first action block of a block starts with THEN, blocks for additional actions for a positive evaluation of a condition begin with AND THEN.

Blocks for the action for a negative evaluation of the condition start with ELSE. Additional "ELSE" actions start with AND. This allows you to build further AND IF conditions for an ELSE action to describe another decision branch for an action.

List of Statements to Build Conditions

There are three sets of predefined statements that you can use to build your conditions:

Each statement is a sentence with placeholders for parameters. You specify the values for the parameters to describe the conditions or actions that you need. Many parameters allow you to enter variables instead of static values.

CONDITION Statements (IF)

Condition

Description Parameters Precond. Postcond. Conditions

CHECK ACTIVITIES

Checks the number of times that an object has run with a particular status.

TASK=Name or alias of the task

OPERATOR=Comparison operator (>, <, =, etc.)

COUNT=Number of runs

STATUS

CHECK CONNECTION

Checks whether there is a connection to a machine or a system.

CONNECTION=Connection object

AGENT

CHECK FILE

Checks whether a particular file exists.

FILENAME

CONDITION=Exists/Does not exist

AGENT

LOGIN=

CHECK HISTORY

Checks whether a task has ended with a particular status in a particular time span.

DAYS

TIME

TASK=Object name of the task

STATUS

CHECK PROCESS

Checks whether a particular process runs on a machine.

PROCESS

AGENT

LOGIN=Login object

CONDITION

CHECK CURRENT QUEUE

Checks whether the task runs in a particular Queue

QUEUE

 

CHECK CURRENT TIME

Checks whether a certain point in time lies before or after the current (physical) point in time. The task time zone is used.

CONDITION=Before/After

TIME (HH:MM)

CHECK RETURN CODE

Checks the return code of the task.

OPERATOR=Comparison operator (>, <, =, etc.)

RETURN CODE

   

CHECK STATUS

Checks the task's end status.

STATUS

   

TIME SINCE ACTIVATION

Checks the time that has past since the task has been activated.

OPERATOR=More/Less

TIME SPAN(HH:MM)

 

USER DEFINED

Compares two values of your choice.

VALUE 1

OPERATOR=Comparison operator (>, <, =, etc.)

VALUE 2

ACTION Statements (THEN)

Action

Description Parameters Precond. Postcond. Conditions

CHANGE QUEUE

Moves the task to another Queue.

QUEUE in which the task should run

   

DELETE ENTRY FROM 
VARIABLE

Removes a key (entry) from a static Variable object.

VARIABLE=Name of the VARA object

KEY- Wildcards (* and ?) are allowed.

START OBJECT

Starts any object and does not check its end status.

OBJECTNAME=Name of the executable object

PARAMETERS=Values as defined in the PromptSet assigned to the object. You have to select an object and accept the condition first and then click on PARAMETERS to load the PromtSet values you must populate.
If the object has no PromptSets assigned, clicking PARAMETERS opens an empty section.

END=Wait/No wait

MODIFY RETURN CODE

Modifies the task's return code.

RETURN CODE

MESSAGE=Optional text

   

PUBLISH VALUE

Makes a specific value available for the Workflow as a variable.

VALUE

VARIABLE name=Name of the VARA object

REDO EVALUATE AT

Ends the processing of the conditions and actions at a particular point in time.

DAYS

TIME (HH:MM)

   

REDO EVALUATE IN

Ends the processing of the conditions and actions after a particular time span.

Time span in MINUTES

   

SET OBJECT VARIABLE

Creates or changes an object variable.

OBJECT VARIABLE

VALUE

SCOPE=Task or Workflow

SET VARIABLE

Creates or changes variable value.

VARIABLE NAME=Name o the VARA object

KEY

COLUMN

VALUE

FINALLY Statements (FINALLY)

Action

Description Parameters Precond. Postcond. Conditions

ABORT

Sends an abort signal. And stops further processing

TEXT=Text to be sent

 

 

BLOCK

Blocks the branch in the Workflow from the current task onwards.

TEXT (optional)

 

CANCEL WORKFLOW

Cancels the Workflow at the specified levels.

Processing stops immediately.

SCOPE=Parent/Top

SUBORDINATE TASKS=Include/exclude

RUN TASK

Starts the task immediately and ends the checks.

No parameters

   

SKIP TASK

Skips the task. No further conditions or actions will be processed.

MESSAGE=Additional status text (optional)

   

RESTART TASK

Ends processing and starts the task again after a particular time.

Time span in MINUTES

   

ROLLBACK

Rolls back the task, the Workflow or the top Workflow.

TASK=Parent workflow or top workflow

   

PROCESS IF BRANCH

Based on the condition results, determines whether processing continues on the TRUE or FALSE branch of the IF-workflow.

TRUE/FALSE return value

ALIAS of true or false branch for the action

   

Working with the Conditions Editor

You use the Conditions Editor to create new or change existing conditions and actions. If you have not defined conditions yet, the system displays a text indicating it and the button Add Condition/Precondition/Postcondition. If conditions are already defined, you can edit them and add new ones by clicking the pencil icon.

The conditions editor contains two panes. You select the conditions and action from the left pane to drag and drop them on the right one. Here you enter their values and build the logic.

To Add Conditions and Actions

  1. Select a condition/action from the left pane and drag it to the right pane.
  2. The area where you are about to drop it is highlighted:

  3. Drop it there. The condition or action is displayed in a block and highlighted.

    The symbol within the blocks indicates that the condition/action is processed several times. In case of Preconditions, they are repeated until a final action has been reached. For Postconditions, they are processed only once.

    If you click it the symbol changes to . This means that the condition or action is processed only once regardless of whether it is located in the Preconditions or Postconditions area. This also includes all subordinate blocks. Clicking the symbol again restores the original behavior.

    To Insert Conditions and Actions in other Conditions:

    1. Select a condition/action from the left pane and drag it to the right pane.
    2. Move it across the pane until the place where you want to drop it displays a highlighted line (the color depends on your configuration, in our screenshot this is a dark yellow line):

    3. The embedded condition or action is displayed in a block of its own within the "parent" condition.

    To Replace Conditions and Actions

    1. Select a condition/action from the left pane and drag it to the right pane.
    2. Move it across the pane until the condition/action you want to replace is highlighted and REPLACE is displyed over it:

    To Delete/Deactivate Existing Condition/Action Blocks

    Select the required block and click the Deactivate or Delete button in the upper right corner of the dialog. You can also click the x icon on the block to delete it.

    To Define Condition/Action Parameters

    Parameter are values that determine the behavior of conditions and actions. They appear in bold in the descriptive text of the blocks.

    1. Click a parameter (a bold term) in the condition or action block.
    2. The values to be defined for that particular parameter are displayed. They depend on the type of parameter.
    3. Enter the required data and when you are finished, click Accept.

      Alternatively, use a Variable. To do so:

      1. Hover your mouse over the parameter label. This turns the label into a button that displays the Variable symbol on its left side.
      2. Click the button. This activates the Variable picker button.
      3. Click it to open the Insert Variable dialog and select the required one. See Inserting Variables.
      4. Click OK.

      You cannot send the parameters if a value is invalid or missing.

    4. When all parameters have successfully been passed on, you will see the entered values in the descriptive text.
  1. Click OK to close the dialog and store the properties.

If you have defined Preconditionsand Conditions make sure that they include at least a final action because otherwise, the task or Workflow cannot start.