workflow ID executed for Service Order

ashwajit_b
Tera Expert

Hi, is there a way to identify the workflows ID's which are executed / getting executed for the Service Orders

 

For a cancel order, I need to create a workflow to revoke the changes that were made by the provide order, but I need to get the details of the steps that were executed by the provide flow before the cancel was received, hence I'll need the workflow ID's for the same.

 

Thank You,

Ashwajit

4 REPLIES 4

ShashankInamdar
ServiceNow Employee
ServiceNow Employee

You can use the flow_context field that stores the sys id of the flow attached to the domain order.

The challenge you might face is, by the time you check on this post cancellation - the sys id value will reflect the new revised workflow. You may consider storing the sys id against another field or char on the domain order every time a flow is launched to have the context of the previous one that got cancelled.

molayd
Mega Guru

Hi @ashwajit_b ,

 

NOW OM framework provides an attribute Flow Context ID against the domain orders i.e. Product, Service & Resource Orders. The sub-flow, which are triggered against the orders, are mentioned in the flow context ID using the sys ID.

 

Hope this helps.

 

Thanks,

Molay 

ashwajit_b
Tera Expert

Hi @ShashankInamdar @molayd , thank you for looking into this. I've tried this "Flow_Context" field in my PDI for a newly created and approved SDWAN order. 

I was able to get the ID's of Workflow and its execution using this Flow-Context field however this ID is not matching with the execution ID in execution tab of flow designer. Please find the screenshot for the same below. Thank you..!!

 

 

Flow Context ID.pngFlow Executions.png 

Aneesh-D
Tera Guru
Tera Guru

@ashwajit_b - Yes, the reason why they are different is: the Execution Id that you see the in flow context is not the sys_id of the record. The execution tab in the Flow designer shows the sys_id of the record.

 

you can verify this - use the Execution Id to filter the data in sys_flow_context.

 

AneeshD_0-1719343998017.png