Preconditions, Postconditions, Conditions Preconditions and Postconditions

In the Properties window for a task,the areas Preconditions, Postconditions and Conditions are all structured in the same way and they have similar functions. Basically, you use all these areas to define conditions and actions that will be processed when the workflow task runs.

TIn the Properties window for a task,the Preconditions and Postconditions function in the same way. In these areas you define conditions and actions that will be processed when the workflow task runs.

The Conditions area 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 action.

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

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

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

Definition of Conditions and Actions

Conditions Editor

When you have not yet defined conditions, the system displays -depending on the selected area- the text No Preconditions Specified or No Postconditions Specified and the button Add Precondition or Add Postcondition. Click this button to open the Conditions Edition in its own dialog.

To extend the Conditions-Editor Dialog to the complete window size, you can click . To reduce it, you click .

If there are already conditions and/or actions, they will be listed in the related area. To change the existing entries, click in the upper right edge. The Conditions Editor opens.

You use the Conditions Editor to create new or change existing conditions and actions. In the left area of the Condition-Editor's dialog, you can select conditions, actions and final actions. To add new entries, drag and dropt them to the right area. You can insert conditions and actions to other conditions by dragging them into the required block.

Make sure that all Preconditions and Conditionsinclude at least a final action because otherwise, the task or Workflow cannot start.

To assume the definition or modification that you have made in the Conditions Editor, click OK. This ends the dialog and stores the properties. This includes that it is not necessary to store the properties again in the Definition area. To close the Conditions Editor without saving your modifications, click Cancel.

The symbol within the blocks indicates that the condition or action are processed several times. The conditions and actions of the Preconditions area are repeated until a final action has been reached. Those in the Postconditions are only processed once.

When you click , the symbol changes to . This means that the condition or action is only processed 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.

Parameters

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

To change the values of the parameters, you click a bold term in the condition or action block. A field is shown inside the block in which you can set all the parameters of the selected condition or action. When you are finished, click Accept. Note that you cannot send the parameters if a value is invalid or missing. When all parameters have successfully been passed on, you will see the related values in the descriptive text.

Delete / Deactivate

You can deactivate or delete existing condition and action blocks. Select the required block and click Deactivate or Delete in the upper right Conditions Editor area for this purpose. Deleting removes the block including all its subordinate conditions and actions. Deactivating has the effect that the block will not be processed during the Workflow's execution. Deactivated blocks appear in gray.

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 when you define preconditions, postconditions or conditions, Conditions and Actions:

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.

The sections that follow list the available building block statements for workflow tasks,

"Condition" Statements for Conditions

Condition Description

Parameters Precond. Postcond. Conditions

CHECK ACTIVITIES

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

  • Object name or alias for the activity (task)
  • Comparison operator (such as >, <, =)
  • Count
  • Status

CHECK CONNECTION

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

  • Connection object
  • Agent

CHECK FILE

Checks whether a particular file exists.

  • Agent
  • File name
  • Exists / Does not exist

CHECK HISTORY

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

  • Length of time
  • Object name of the task
  • Task execution status

CHECK PROCESS

Checks whether a particular process runs on a machine.

  • Process name
  • Agent
  • Login object
  • Running/ not running

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's time zone is used.

  • Before / After
  • Time (HH:MM:SS)

CHECK RETURN CODE

Checks the task's return code.

  • Operator (such as >, <, =)
  • 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.

  • More / Fewer
  • Time interval (HH:MM:SS)
 

USER DEFINED

Compares two values of your choice with each other.

  • Value 1
  • Operator (such as >, <, =)
  • Values 2

"Action" Statements for Conditions

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

Deletes an entry of a static Variable object.

  • Object name of the Variable
  • Key (Wildcards * and ? are allowed.)

START OBJECT

Starts any object and does not check its end status.

  • The name of an executable object
  • Wait / Do not wait for the end
  • Additional parameters

MODIFY RETURN CODE

Modifies the task's return code.

  • Return code
  • Additional text (optional)
   

PUBLISH VALUE

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

  • Value
  • Variable name

REDO EVALUATE AT

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

  • Time (+DD/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.

  • Variable name
  • Value
  • Scope (task or workflow)

SET VARIABLE

Creates or changes variable value.

  • Variable name
  • Key
  • Column
  • Value

"Finally" Statements for Conditions

Action Description

Parameters Precond. Postcond. Conditions
ABORT

(FINALLY) send an abort signal. And stop further processing

(No parameters.)

 

 

BLOCK

Blocks the branch in the Workflow as of the current task.

  • Text (optional)
 

CANCEL WORKFLOW

Cancels the Workflow at the specified levels. All processing stops immediately.

  • Workflow level (Parent or Top)
  • Include / Do not include subordinate tasks

RUN TASK

Starts the task immediately and ends the checks.

(FINALLY) run task.

(No parameters.)

   

SKIP TASK

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

  • 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