How to get the context of the flow/ subflow that is running/executing within the flow designer

Shariq Azim
Kilo Guru

Hello,

I am trying to get the  context id of the executing flow designer within the sub flow of flow designer?

The API provided in https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/sn_fd-namespace/ScriptableFlowAPI only speaks about getting the contextId if the  flow is executed through script...more aptly getting the context id after the   execution of the SUBFLOW is triggered .

For example , adding "worknotes link action" adds the flow to the  worknotes similarly i was trying to query on the context id after creation .

 

The whole idea is to have an active  check for the flow execution and raising a task if any error arises on using oob AD spokes.

Because for some reasons often randomly the flow is failing due to powershell  script failing to execute.

 

Regards,

Shariq

1 ACCEPTED SOLUTION

@Shariq 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

If not, please let us know if you need some more assistance.

Thanks!
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Can you please tell me How to find relation of Context to the record?, I have checked with record sys_id in the Context sys_id. Its not there....

 

I need a relation of a flow for a particular case so that I can cancel the Flow Execution.

 

 

Thank you for your response.