List of Statements to Build Conditions
When creating Workflows, developers and object designers can assign conditions to individual tasks. These conditions affect the execution of the task in the Workflow in which they are inserted. There are Preconditions, Postconditions and Conditions (for IF Workflows only). For more information, see Conditions, Preconditions, Postconditions.
This topic describes the sets of predefined statements that you can use to build your conditions:
- Condition statements, which are the basis of IF statements in your task preconditions and postconditions.
- Action statements, which are the basis of THEN statements.
- Finally statements.
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.
CONDITION Statements (IF)
The following statements are available for Conditions in IF Workflows:
CHECK ACTIVITIES
Description: Checks the number of times that an object has run with a particular status.
Parameters:
- TASK=Name or alias of the task
- OPERATOR=Comparison operator (>, <, =, etc.)
- COUNT=Number of runs
- STATUS
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
CHECK CONNECTION
Description: Checks whether there is a connection to a machine or a system. This condition has the same function as the script element SYS_HOST_ALIVE.
Parameters:
- CONNECTION=Connection object
- AGENT
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
CHECK FILE
Description: Checks whether a particular file exists. Only the OS Agent can check the file. An error occurs if the task is an SAP job.
Parameters:
- FILENAME
- CONDITION=Exists/Does not exist
- AGENT. *OWN means that the Agent of the task (if available) is used.
- LOGIN=
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
CHECK HISTORY
Description: Checks whether the last run of a task has ended with a particular status in a particular time span.
Parameters:
- DAYS
- TIME
- TASK=Object name of the task
- STATUS
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
CHECK PROCESS
Description: Checks whether a particular process runs on a machine. This is only possible with Windows and UNIX platforms.
Parameters:
- PROCESS=PID (process ID) or the name of the process.
- AGENT
- LOGIN=Login object
- CONDITION
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
CHECK CURRENT QUEUE
Description: Checks whether the task runs in a particular Queue
Parameters:
QUEUE
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: No
CHECK CURRENT TIME
Description: Checks whether a certain point in time lies before or after the current (physical) point in time. The task time zone is used.
Parameters:
- CONDITION=Before/After
- TIME (HH:MM)
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
CHECK RETURN CODE
Description: Checks the return code of the task.
Parameters:
- OPERATOR=Comparison operator (>, <, =, etc.)
- RETURN CODE
Available as precondition: No
Available as postcondition: Yes
Available as condition: No
CHECK STATUS
Description: Checks the end status of the task
Parameters:
STATUS
Available as precondition: No
Available as postcondition: Yes
Available as condition: No
TIME SINCE ACTIVATION
Description: Checks the time that has past since the task has been activated.
Parameters:
- OPERATOR=More/Less
- TIME SPAN(HH:MM)
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: No
USER DEFINED
Description: Compares two values of your choice. Only the predefined variables whose values are available at the time they are accessed will be resolved. Variables can be used for system, object and Variable object values.
Parameters:
- VALUE 1
- OPERATOR=Comparison operator (>, <, =, etc.)
- VALUE 2
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
ACTION Statements (THEN)
The following ACTION (THEN) statements are available:
CHANGE QUEUE
Description: Moves the task to another Queue
Parameters:
QUEUE in which the task should run
Available as precondition: Yes
Available as postcondition: No
Available as condition: No
DELETE ENTRY FROM VARIABLE
Description: Removes a key (entry) from a static Variable object.
Parameters:
- VARIABLE=Name of the VARA object
- KEY- Wildcards (* and ?) are allowed.
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
START OBJECT
Description: Starts any object and does not check its end status. Read buffer variables are supplied with values and can be read in this object's script. For more information, see List of Predefined Read Buffer Variables.
Parameters:
- 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 PromptSet values you must populate.
If the object has no PromptSets assigned, clicking PARAMETERS opens an empty section. - END=Wait/No wait
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
MODIFY RETURN CODE
Description: Modifies the return code of the task
Parameters:
- CODE
- MESSAGE=Optional text
Available as precondition: No
Available as postcondition: Yes
Available as condition: No
PUBLISH VALUE
Description: Makes a specific value available for the Workflow as a variable.
Parameters:
- VALUE
- VARIABLE name=Name of the VARA object
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
REDO EVALUATE AT
Description: Ends the processing of the conditions and actions at a particular point in time.
Parameters:
- DAYS
- TIME (HH:MM)
Available as precondition: Yes
Available as postcondition: No
Available as condition: No
REDO EVALUATE IN
Description: Ends the processing of the conditions and actions after a particular time span.
Parameters:
Time span in MINUTES
Available as precondition: Yes
Available as postcondition: No
Available as condition: No
SET OBJECT VARIABLE
Description: Creates or changes an object variable.
Important! To use this object variable, you must have activated the option Generate Task at: Runtime (Post Process is exempted) regardless of the settings that are defined in the parameter scope of the task or the workflow.
Otherwise, the system tries to access a non-existing variable or returns the old value (if the variable is already defined in the object)
Parameters:
- OBJECT VARIABLE
- VALUE
- SCOPE=Task or Workflow
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
SET VARIABLE
Description: Creates or changes variable value.
Parameters:
- VARIABLE NAME=Name o the VARA object
- KEY
- COLUMN
- VALUE
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
FINALLY Statements (FINALLY)
The following FINAL (FINALLY) statements are available:
ABORT
Description: Sends an abort signal. And stops further processing
Parameters:
TEXT=Text to be sent
Available as precondition:
Available as postcondition: Yes
Available as condition:
BLOCK
Description: Blocks the branch in the Workflow from the current task onwards.
Parameters:
TEXT (optional)
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: No
CANCEL WORKFLOW
Description: Cancels the Workflow at the specified levels. Processing stops immediately.
Parameters:
- SCOPE=OWN*/Parent/Top
- SUBORDINATE TASKS=Include/exclude
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
RUN TASK
Description: Starts the task immediately and ends the checks.
Parameters:
No parameters
Available as precondition: Yes
Available as postcondition: No
Available as condition: No
SKIP TASK
Description: Skips the task. No further conditions or actions will be processed.
Parameters:
MESSAGE=Additional status text (optional)
For limitations, see STATUS_TEXT in :MODIFY_STATE
Available as precondition: Yes
Available as postcondition: No
Available as condition: No
RESTART TASK
Description: Ends processing and starts the task again after a particular time.
Parameters:
Time span in MINUTES
Available as precondition: Yes
Available as postcondition: Yes
Available as condition: Yes
ROLLBACK
Description:
Parameters:
Available as precondition: No
Available as postcondition: Yes
Available as condition: No
PROCESS IF BRANCH
Description: Based on the condition results, determines whether processing continues on the TRUE or FALSE branch of the IF-workflow.
Parameters:
- TRUE/FALSE return value
- ALIAS of true or false branch for the action
Available as precondition: No
Available as postcondition: No
Available as condition: Yes
See also: