Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

flow equivalent of workflow input variables

Abhijeet Mane
Tera Contributor

Hi, I am currently migrating a Workflow to flow for a catalog item which has another workflow attached to it so basically

-> the main workflow is passing 3 values to the 2nd workflow which are stored in workflow.scratchpad and then passed to the 2nd workflow. 

-> then on the 2nd workflow we have 5 input variables and is used in a script activity 

 

so in flow designer how can i do this? what is the Equivalent of Workflow.scratchpad & What is the Equivalent of Input Variables in flow designer?

3 REPLIES 3

Peter Bodelier
Giga Sage

Hi @Abhijeet Mane 

 

Flows have no other input than the record which is triggered.

You'll need to use subflows if you want to have input (and output) values.

Create a subflow in Flow Designer (servicenow.com)

Instead of scratchpad you can use Flow Variables.

Flow variables (servicenow.com)


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Hey @Peter Bodelier , Thanks for the response but here there is one problem with using Subflow. i have a Run Script activity in that smaller workflow which is basically formmating the data from user table into Json. how can i import that script into flow designer subflow? as i don't see any script action in Subflow? Pardon me if i am being too noobie but i am quite new to flow designer.

Hi @Abhijeet Mane 

 

You can create a new action in flow designer. In an action you can use a script, among other utilities.

 

After you created the action, you can use it in your (sub)flows.

I would highly recommend following a nowlearning course on flow designer, before you start with this, because it really calls for a different way of thinking than workflow.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.