Setting a custom condition for executing a step
For each step of your action sequence you can set a condition that determines whether that step will be executed or not. You can create a custom condition using FreeMarker (external) syntax.
In this example the condition is "only execute this step when a previous step, called 'step1', returned status code 404". If the output to this condition is 'true', the step will be executed; if the output is 'false' or empty, the step will be skipped. Any other output will result in an error.
In the action sequence, create the step.
Enter a name, e.g. 'step2'.
Fill in the other fields.
Under Execute this step, select 'Only if custom condition applies'.
In the field below, enter the following condition:
${_responses.step1.statusCode == 404}Click Save.
This step, step2, will now only be executed when the previous step, step1, returned status code 404.