How to call a Flow from a Workflow?

gjz
Mega Sage

I've seen several posts that show how to call a Workflow from a Flow, but I need to do it the other way around - call the Flow from the Workflow.  I know I need a Run Script but that's all I know.

 

I have several complicated workflows that are initiated from a Service Portal catalog item and would like to start converting them to flows a little at a time.  Several of the workflows have what could be considered a subflow; it's these subflows that I would like to turn into flows.

 

For example...

I have three separate workflows that have many steps in common - for example, 1. Build/reimage a computer, 2. Order a new computer, 3. Return to equipment to stock.

 

If I build a flow for ordering a new computer, I want to be able to have the workflow control the steps before and after the build flow, and have the workflow wait until the build flow is done.

 

What is the best way to achieve this?

5 REPLIES 5

Community Alums
Not applicable

gjz
Mega Sage

I already found that article - but it isn't what I'm looking for.  That article starts with a flow as a trigger, I'm starting with a workflow, and it doesn't answer my question - will a workflow wait for a flow to finish and how do you know it has finished successfully?

giz,

I am trying to do the same thing you were asking about.  Did you ever find a solution for this?  Can you post it?

Thanks

 

Joe S1
Kilo Sage

You can call a flow via a script, have you looked at this and tried to do it from a run script action?

 

https://www.servicenow.com/community/developer-forum/trigger-flow-from-script-with-inputs/m-p/244320....

 

Thanks,

 

Joe S