Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Condition to Execute lets you configure the steps of a workflow to execute or to be skipped according to custom conditions.
You can find this option in Properties.  Click Click a workflow object to view the Properties box:

Image Added
Let's use the example that you are awaiting an archive containing two data files and if one of these data files is missing, you prefer to skip the step that has not received data files meant for it and let the workflow finish with success. 
Here is a sample workflow:

Image Added
To get this desired behavior, your condition to execute should look like:

Code Block
EXPR#iif(StringLength(\5C3Aparam_TASK_genericload_unpacker_DataFlowFiles\5C3A)=0,0,iif(Find(\5C3Aparam_TASK_genericload_unpacker_DataFlowFiles\5C3A, 'ISSUER')!=-1,1,0))


This expression contains two iif(logexpr, result_if_true, result_if_false) conditions:

  1. iif(StringLength(\5C3Aparam_TASK_genericload_unpacker_DataFlowFiles\5C3A)=0 - this 0 – This one checks the DataFlowFiles OutParam (a default variable for Task Unpacker, where it writes all unzipped file names). If this variable equals 0 (there were no files in the archive), the workflow step is skipped.

If it is not zero, the second condition activates:

2. iif(Find(\5C3Aparam_TASK_genericload_unpacker_DataFlowFiles\5C3A, 'ISSUER')!=-1

...

– This condition checks this variable on containing files matching 'ISSUER' file mask and if such are missing, the step is skipped.

Tags
: TAG_Unpacker_END