In some scenarios, it may be desired to perform an operation in a Workflow when no search results are returned.
For example, a Search activity may check Active Directory for a User object with a matching employeeNumber. If one is found, the manager of the Workflow target is set to the distinguished name of the found object. If no object is found, another operation is desired, such as sending a notification or flagging the account.
It is expected behaviour, however, that any and all Activities which are within the scope of the Search Activity will be skipped if there are no results found.
In an IF-Else branch is configured outside the scope of the Search Activity, it is possible to test the Execution Status of the first Activity within the scope of the Search. If the execution status of this Activity is Not executed, then this Activity was skipped because no search results were found. It is then possible to add an alternate Activity in that If-Else branch.