Whatever I change the catalog task state it first updates to closed complete then closed incomplete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi facing an issue whenever the catalog task is updated the ritm updates are first closed complete then closed incomplete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Prasun Sarkar7,
If you suspect its a BR thats causing this theres a couple of things you can do.
You can go to BR's configured on sc_req_item table - filter on active = true and see which ones are impacting state.
Or you could jump into debugging - here's the ServiceNow documentation on that: Debugging business rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hmmmm this bug is raised as priority when I am updating stage via flow then the state is always changes to completed but via background script when I am updating its not updating the state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Looking at the screenshots of your flow, your if condition in step 13 is not evaluating accurately or is not evaluating what you think it is. This is unlikely to be a BR issue as it would have to be changing the value while your flow is running and you would thus see an additional system step in the change activities.
Per the run you show its evaluating something equal to completed but based on other screenshots it appears your should be evaluating the field you set to Closed Complete.
This suggest to me that either you are not checking the value of the correct field on the task or the value you are checking is not being updated in the manner you expect and thus the condition is always evaluating to false resulting in your step 15 and 16 always running and setting the "Closed Incomplete" value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hey John the if conditions are working fine I checked but the thing is that when I add the step called stage between the lines to COmpleted or Closed Incomplete the state of the RITM always updates to completed. But when I do update via script the state of the RITM is not changed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
This sounds like an issue with your script if I'm interpreting you correctly. The script could be encountering an error and not actually completing the update or there could be a timing issue where the flow execution proceeds before the scripted update is complete.
I would debug the script first to make sure it is actually running successfully and completing the update in your specific scenario/configuration. Once you verify that then if the issue is persisting you would need to evaluate if the flow is acting correctly. If your script is a background script it may not be triggering the flow as expected or the flow itself may be running without awareness of the script and thus proceeding faster than the script and getting to that point before the scripted update is applied.
