- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2019 07:29 AM
Wanted to see if anyone has every seen this.
I have a Catalog Item that a user can submit that requires no approval and they can assign it to a certain group of their choosing. Nothing special except for the fact that every morning I find 3 or 4 that has no Workflow attached, so of course no Task was created, and the Approval is still set at Not Yet Requested. Once I contact the user and have them share their screen and walk them thru the same SR, have them click the Order Now button and then the Submit button, everything works fine. They claim they did the same thing.
So my question is: How is it possible that a Catalog Item that definitely has a Workflow assigned to it can get create without an attached Workflow?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2019 11:06 AM
Opened a HI Ticket and they had some ideas.
Normally when we see the Unique Key violation during catalog submission it is due to calling update() method prematurely. It can happen on Before, Async or even on After (if updating a table that has not finished the insert) Business rules or within the Workflow. Below is documenation on workflow engine order and when to use/not to use update().
KB0700219 - Workflow engine operation order
During the checkout process, the Requested Item [sc_req_item] record is saved into the database before the Request [sc_request] record. Also, all Before or Asyc business rules and workflows run before the records are saved into the database. When there is an update() call to either record before these records are saved in the database, the unique key violation error occurs.
So, after reading this I did find an Async Business Rule that was copying a variable from the Item up to the Request. I disabled that and put the code to perform this same thing into the Workflow and it seems to have stopped occurring. Keeping my fingers crossed that I have this resolved. Learned a valuable lesson on when Business Rules are processed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2019 07:34 AM
At the request level, can you check to see if it's approved? A workflow for a request item isn't going to start until the request is approved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2019 05:16 PM
Approval = Not yest requested
Request State = Pending Approval
I thought it might be user error because each time I shared their screen and walk them through, it works great.
We have a UI Action button to create an SR from Incident. I thought all the bad requests were from a user inputting from the Service Catalog until today. Had a report that a user clicked the button and got a duplicate error and it generated a Request and RITM with no Workflow attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2019 06:00 AM
Making headway on this. When the Workflow for approval first starts it writes a line to the log that it's starting for that Request #. When I search the log I don't find that REQ# but if I check for the next previous REQ# I find the start of that one plus an error:
Unique Key violation detected by database (Duplicate entry '1938ce711ba033c03d5bba2d1e4bcb25' for key 'PRIMARY')
So it appears it's getting this unique key violation, can't insert with that REQ# so it moves to the next available, writes that and basically creates a broken REQ/RITM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2019 11:06 AM
Opened a HI Ticket and they had some ideas.
Normally when we see the Unique Key violation during catalog submission it is due to calling update() method prematurely. It can happen on Before, Async or even on After (if updating a table that has not finished the insert) Business rules or within the Workflow. Below is documenation on workflow engine order and when to use/not to use update().
KB0700219 - Workflow engine operation order
During the checkout process, the Requested Item [sc_req_item] record is saved into the database before the Request [sc_request] record. Also, all Before or Asyc business rules and workflows run before the records are saved into the database. When there is an update() call to either record before these records are saved in the database, the unique key violation error occurs.
So, after reading this I did find an Async Business Rule that was copying a variable from the Item up to the Request. I disabled that and put the code to perform this same thing into the Workflow and it seems to have stopped occurring. Keeping my fingers crossed that I have this resolved. Learned a valuable lesson on when Business Rules are processed.