If Last Step Action
<AMIF LASTSTEP="Text" RESULTCODE="Text">
Controls task flow depending on whether the last step was a success, general failure, or failed because of a specific error. Causes the steps following this action to execute if the previous step meets the specified condition. If not, execution follows the next Else or End If action, whichever comes first.
Used to provide custom error handling on steps that are set to ”r;continue on error”. This action introduces conditional steps depending on the outcome of the previous step. It is commonly used to introduce a block of steps to be carried out if the previous step fails.
Specifies the condition to be met.
succeeded: step succeeded
failed: step failed for any reason
failedwithcode: Failed with specified error codes. Step failed with one of the error codes specified in the Error codes field.
Specifies the error codes to match.
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.
More on variables
More on expressions
More on the expression builder
NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.
<AMIF LASTSTEP="failedwithcode" RESULTCODE="20074, 20089">