Accessing flow operations output via script

Dominik9
Tera Guru

Hi experts

 

I'm trying to access the output of a flow, subflow, or action using scripting. I know that the sys_flow_context table stores information about the execution, but it doesn't contain the actual output data visible in the Workflow Studio Operations section. There we have the action section and in it the Output data. 

Anybody knows the name of the ServiceNow table where the real output of a flow, subflow, or action is stored? Is there any possibility to get this information via script?

Basically we execute the flow/subflow/action in background from a business rule and later, in another script we want to get the output.

 

Thank you!

Dominik

13 REPLIES 13

@Dominik9 

got it.

then I will suggest let that run in background and whatever processing you want to do later in the Business rule script add that logic after wait condition in your flow itself.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Ankur Bawiskar 

This is no option, as the business rule can trigger different flows/subflow/actions. So we don't want to adjust all of those.

@Dominik9 

not a good idea though.

If your flow is waiting for 2/3 days then it's not a good practice to make that BR script wait since it will lead to performance and will occupy memory and will utilize system resources.

So the only option is move the subsequent logic after the wait for condition.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Ankur Bawiskar 

Yes, as this is not working anyway, it is anyway no option. Thats why I want to access the output via script as soon as the flow finished. But I do not know on what table the output is stored in the end. 

@Dominik9 

that's correct and I believe that's the only option which I mentioned above.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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