Execution of catalog items in Order guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2018 05:05 AM
Hi Guys,
I have an order guide with 10 catalog items. I want them to execute in an order one after the other.
For example, for a new employee allocation of Desk location must be prior and later allocation of Computer catalog item must execute and if only Computer was assigned to him then Programs installation catalog item must execute.
I already referred this below link, but it is for 2 items and if i want to use this, then i have to write this Run Script after every catalog item. But in future if i need to change the order of execution then i need to modify all the related workflows Instead of this, do we have any other solution or an efficient way to achieve this?
https://www.servicenowguru.com/system-definition/order-request-items-order-guide/
Regards,
Vijay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2018 05:17 AM
Are your catalog items exclusively being triggered by the order guide or - do you have situations where these same catalog items are being run independent of the order guide (standalone)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2018 05:55 AM
Hi Chuck Thomasi,
Thank you for your response. Yes we have few catalog items(stand alone) run independent of order guide.
Regards,
Vijay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2018 07:01 AM
I would have the workflow start out by checking if the order guide field is filled in. If so, you know it started from an order guide.
I would orchestrate this with events. Each workflow, if using an order guide, would wait for a trigger at the beginning of the workflow. It would not only wait for a specific trigger, but also check that one of the two event parameters matches the sys_id of the order guide. This way one event doesn't trigger multiple items in other order guides inappropriately.
If that path (has order guide) is true, then wait for an event (you get to choose the events used). For example, new_hire.1, new_hire.2, new_hire.3 Your first item would not need to wait for an event, but the second would wait for new_hire.1 event before proceeding. See the note about about checking the parameter to ensure "this is from my order guide from a preceding item)
At the end of each flow, it triggers the next flow with the order guide sys_id parameter to say "OK, whoever is listening for new_hire.n, it's your turn to run."
Of course, if the order guide field is empty, just jump around the event processing stuff at the beginning and end.