The If/Else entry is listed in the context menu of an Action Descriptor under
.An If/Else statement is a conditional branch which contains other statements/tools. If it is processed in the action descriptor sequence, it will be evaluated based on the Statement attribute and the specified condition. If the condition applies, the action processor will enter the branch and process the statements within the branch.
Attribute | Type | Description |
---|---|---|
Statement | Select Value | Defines the type of the If/Else statement.
Supported values are:
Note: Statements containing "Else" must immediately follow after a statement containing "If".
|
Context Name [O] | String | Specifies the name of a context created by a tool executed earlier in the statement/tool sequence of the action. All statements/tools under the If/Else statement are executed with this context. |
Enabled Condition [O] | Enabled_Condition | Relationship to an enabled condition which lets you specify the conditions (simple or complex) which are checked at run time and must be true to execute the statement. See Enabled/Visible Condition for more information on how to specify enabled conditions. |
The following example shows an action to delete a folder or file depending on the resource type. The action starts with an If statement. If the condition is fulfilled the If statement is executed and none of the Else statements will be entered. The last Else statement will only be entered if none of the previous statement conditions was evaluated to true.