- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 02:25 PM
I've found several posts and Knowledge articles related to a request item workflow not running, but none of them describe what I'm seeing. Usually the use cases I've found involve the stage of the request not being approved yet, or a business rule running things in the ditch before the workflow can fire. And while I can't completely rule out that second condition, it would be a different problem than what I've read so far. Based on what I can find, we don't have any custom business rules that would explain the behavior I'm seeing, but we either have or recently had a contractor doing some work that i wasn't involved in that may have got something sideways.
I have a very simple catalog item requesting creation of a user account in an outside system. This is supposed to be available to users both in our central office and at our 58 campuses statewide. The outside users (and some of the inside ones) have no roles in ServiceNow (they don't need to do anything that would require a role). Most but not all of our internal users do have some role. and a handful have the Almighty Admin role. And that last group is the only one that the workflow works for.
To wit: I can create a request for myself (admin) and everything behaves as expected. The Request is created along with the request item, the workflow for the request starts, the workflow for the request item starts, the approval is sent and once it's approved a catalog task is created for fulfillment. From there we wait for someone to complete the task and mark it closed complete before we carry on. I can go to the RITM and find the link to Show Workflow and see where it's currently sitting. The request item shows up in the workflow operations dashboard, just as you'd expect and as soon as I complete the catalog task, the notification will go out and the task will close and the requested item workflow will complete and clean up. In other words, everything runs exactly as planned.
As long as I am admin, that is.
If I am anybody else -- internal, external, roles, no roles, doesn't matter -- the workflow for the request runs, the stage is set as request_approved, the request workflow completes and everything stops dead in its tracks at that point. The workflow for the requested item never runs, even though I can go to the Show workflow link on the request and see that it completed successfully and set the stage correctly. But the logs never show that anything ever happened.
Now the reason I mention the consultants is that when I'm running a request for somebody else, the log file is littered with gs.log() entries telling me that "the business rule ran" (I don't know what business rule) and that the group was identified as xxx or the company was identified as xxx. I don't know what they were working on, or what these log messages were meant to tell them (or why they left them active), I just know that when I'm processing a request for myself, those messages are generated. But having found the business rule in question (which is a scary looking thing that runs on Task) I set it as inactive, and attempted another run and it doesn't appear to have helped any. The only improvement was that it got rid of the extraneous log messages (a LOT of extraneous log messages).
2019-09-30 17:09:06 Information Notification 'Request Opened on Behalf' (2f2a8d62c0a8006401ee40a4185140b0) included recipients via notification's "Users/Groups in fields" (e.g., watchlist, assigned_to, etc): 'Alex Doles' (8124d503db346340c0ebd855ca961983) EMAIL.33684d18db580c10a0cc4b8b0b961914
2019-09-30 17:09:06 Information Notification 'Request Approved' (2d9b4f23c6112284014937e2ad96b533) included recipients via notification's "Users/Groups in fields" (e.g., watchlist, assigned_to, etc): 'Alex Doles' (8124d503db346340c0ebd855ca961983) EMAIL.7b680d18db580c10a0cc4b8b0b961948
2019-09-30 17:09:06 Information inside the script action *** Script
2019-09-30 17:08:55 Information terminating Service Catalog Request, state: finished ENGINE
2019-09-30 17:08:55 Information DESIRED = in_process *** Script
2019-09-30 17:08:55 Information CURRENT STAGE = requested *** Script
2019-09-30 17:08:55 Information APPROVAL = approved CHANGES = true *** Script
2019-09-30 17:08:54 Information Workflow starting: Service Catalog Request, for REQ0010236 ENGINE
But when I run it for myself:
2019-09-30 17:14:56 Information Notification 'Request Approved' (2d9b4f23c6112284014937e2ad96b533) included recipients via notification's "Users/Groups in fields" (e.g., watchlist, assigned_to, etc): 'James Bengel' (8e249903db346340c0ebd855ca9619d0) EMAIL.9dc9c958db94c4508f75c191159619a1
2019-09-30 17:14:56 Information inside the script action *** Script
2019-09-30 17:14:56 Information Notification 'NC Approval Request' (0609572cdb45bb008f75c1911596194f) included recipients via notification's "Users/Groups in fields" (e.g., watchlist, assigned_to, etc): 'Duane Maxie' (This indicates the approval was sent) (b9249903db346340c0ebd855ca96193b) EMAIL.59c90d58db94c4508f75c19115961978
2019-09-30 17:14:56 Information Notification 'Request Opened on Behalf' (2f2a8d62c0a8006401ee40a4185140b0) included recipients via notification's "Users/Groups in fields" (e.g., watchlist, assigned_to, etc): 'James Bengel' (8e249903db346340c0ebd855ca9619d0) EMAIL.91c9c958db94c4508f75c1911596199d
2019-09-30 17:14:48 Information Workflow starting: ESS Data Warehouse Access Request, for RITM0010240 ENGINE
2019-09-30 17:14:47 Information Workflow starting: Service Catalog Request, for REQ0010237 ENGINE
2019-09-30 17:14:47 Information DESIRED = in_process *** Script
2019-09-30 17:14:47 Information terminating Service Catalog Request, state: finished ENGINE
2019-09-30 17:14:47 Information CURRENT STAGE = requested *** Script
I can't say there's not other stuff they did that would impact this workflow, but taking the business rule out of play is what generated these log entries, so that at least doesn't appear to have been the culprit.
Any ideas are welcome.
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2019 05:21 AM
I'd checked those already, and all were in order. The problem was simpler than that, actually. The workflow was still checked out. *sigh* Still pretty new to workflow and forgot that nugget of wisdom. But by the time I'm done with this project, I suspect I'll have learned quite a bit that they don't teach you in the self-paced labs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 03:46 PM
Item to check:
- Does the Catalog Item being referenced have the Workflow field populated?
- Is the stage of the RITM displaying as request_approved on the form?
- Check that the workflow definition has the Table field set to Request Item [sc_req_item] and not Catalog Item [sc_cat_item].
These all need to be true before the - Start Workflow - business rule will trigger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2019 05:21 AM
I'd checked those already, and all were in order. The problem was simpler than that, actually. The workflow was still checked out. *sigh* Still pretty new to workflow and forgot that nugget of wisdom. But by the time I'm done with this project, I suspect I'll have learned quite a bit that they don't teach you in the self-paced labs.