Print

Subflows are separate workflow activities defined to be executed out of a primary workflow. ServiceNow's documentation gives the basics on how to create the subflow, but lacks on how to link a subflow to a primary workflow and pass data and return codes back and forth.  This article attempts to fill in the gaps you can't get from SN documentation.

The basics for subflows is documented in this ServiceNow Wiki article

Notes to bear in mind when defining and using subflows:

Example: A simple catalog item is created with a workflow associated that calls a subflow to return whether a manager’s name begins with the letter “A”. The return from the subflow would be either “yes” or “no”.  This functionality would be referenced in this catalog item and others as a standard validation on other catalog items that have their own unique workflow, but requiring the same "A" validation on the manager's name.

The system property “glide.workflow.enable_input_variables” must be set to true in order to enable input variables in subflows.