Standard Workflow for Automation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 11:33 AM
Hello everyone!
I was curious...Has anyone come up with a way to have a "default" workflow (or flow) that can be used across catalog items that could have different variables that determine the path a workflow needs to go? For example:
Catalog Item 1:
variable 1 value
variable 2 value
Result: Add user to AD group 1
Also Catalog Item 1:
variable 1 value
variable 2 value
Result: Add user to AD group 2
Catalog Item 2:
variable 1 value
Result: Add user to AD group
And the thought is both items in this scenario will have the same workflow attached. We would just have a config table of some sort that houses the matrix to determine the AD route.
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 03:32 PM
add a hidden variable with a name (action_name) on to the catalog form and populate this variable based on your scenerios.
in the config table pick up the path based on the value populated in the hidden action name variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 05:13 PM
Hi @Money,
Yes, you can create a custom 'framework' for this and it may take some time to build it in the first place, but it will be much time-saving in the long run.
I won't go too much into detail, but at a high level, you would have the following:
- A table to store when/how the approvals/tasks are generated.
- 'Condition' type field to check the variables
- 'Flow' or 'script' to trigger when the condition is true
- Approver/task assignee
- A 'general' workflow/flow that iterates through the above and generates approvals/tasks when the conditions are met.
You can refer to the OOB HR Service Activities workflow as it's quite similar to what I stated above.
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 01:28 AM
I would recommend NOT building your own framework from scratch for this - lots of custom code and really hard to upgrade / maintain!
I would recommend using Catalog Builder and Sequential Request Fulfilment for this.
ServiceNow have already built this workflow for you, and there are out-of-box "Approval" and "Task" definitions that you can modularly pull in to build up your workflow - see docs.
You can also define your own steps if the three out-of-box ones don't complete your use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 07:02 AM
I have built this framework long back. And we have extended it to multiple integrations (azure, AD, Jira). The time I have spent is worth