Doing something when Workflow Activity.Result = Skipped

Michael Domke
Tera Guru

Preface: I'm very new to Service Now so please forgive any misuse of terms or definitions.

I have a Workflow "Approval - User" Activity with several Conditions defined, for example:
Requested By.Manager is not "manager X"
and Requested By.Manager is not "manager Y"

There are two Workflow results (conditions):
Approved = activity.result == "approved" || activity.result == "skipped"
Rejected = activity.result == "rejected"

My issue is when activity.result == "skipped". This result arises when the Conditions are not met, for example, when Requested By.Manager is not X or Y. My goal, then, is to do something when activity.result == "skipped". For example, I want to send an email because there should always be a manager.

Since I'm new to Service Now I'm not yet familiar to what options are available to me to accomplish my goal.

I was thinking I could remove the activity.result == "skipped" condition from the existing Approved result and then add that condition on it's own in a third Workflow result called "Skipped". This new result would also be approved but it would then fire off the email I need. Am I on the right track? Is there any other suggestion to handle this situation?

References to other resources are very welcome.

Thanks,
Michael

2 REPLIES 2

Valor1
Giga Guru

If you right-click on the activity in the whiteboard (don't double-click), you can "add condition".

When you do that, set the condition to "activity.result == 'skipped'", then set the "Approved" condition to be just "activity.result == 'approved'".

That should create a branch from which you can take the appropriate action.


Thanks for the reply Valor. That's actually the path I started to take. Many thanks for the confirmation.