Update existing open RITM to use flow instead of workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 05:17 PM
Hello Experts,
Few of our catalog items had workflows defined to trigger approvals and task creation. We had to uplift the catalog items to trigger the approvals and task creation using Flow, instead of the associated Workflow.
Everything works well for the new RITM's being raised for the uplifted catalog items.
However, we observed it is impacting the existing open RITM's approval and task creation behavior, as the Workflow is no more associated to the catalog item.
Is there a way to update the open RITM's to run using the newly associated Flow?
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 06:39 PM
Hi @Somujit1,
If the old RITMs got attached to a workflow (you can check by opening the RITM record and at the bottom in Related Links, you should see something like WorkFlow or WorkFlow Context).
If they are not attached to any WorkFlow you can attach them to the new Flow using a background script. For example,
var now_GR = new GlideRecord('sc_req_item');
now_GR.addQuery('number', 'RITM0009009');
now_GR.query();
now_GR.next();
try {
var inputs = {};
inputs['current'] = now_GR; // GlideRecord of table: sc_req_item
inputs['table_name'] = 'sc_req_item';
var contextId = sn_fd.FlowAPI.startFlow('global.test_flow', inputs);
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
You can also refer to documentation at https://docs.servicenow.com/bundle/utah-application-development/page/app-store/dev_portal/API_refere...
Thanks,
Anvesh
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 08:12 AM
Hi @AnveshKumar M ,
This is great information!
Could you advice if you have seen cases where RITMs are dropping old flow and attaching new flow and requesting approvals twice. (Only changes done to flow were to update requesting of group approval)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 11:56 PM
Hi @CJPeterson
Didn't came across such scenario. Need to see the flow configuration to figure out the issue.
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 01:01 AM
Hi @CJPeterson ,
Canceling old flow and attaching new flow will not trigger approvals again if those are already approved in old flows.
But if the approvals in old flows are not approved or rejected then attaching new flow will trigger the approvals.
Please mark this as correct/helpful if it helps with your question in any way.
Please mark this response as correct or helpful if it assisted you with your question.
Best Regards,
Rutuja Khalate