How do I associate the subflow with main flow in Flow Designer

Ben124
Tera Expert

Hello All - Using the Flow Designer, I built a rather large workflow (about 200 steps) that still needs to grow even larger.  So, I figure I should do some subflows.  The problem I am running into is that I don't know how to make sure that my subflow is pulling the correct tickets from the main flow.

For example, the main flow is triggered from a Service Catalog form being created and generating a REQ and a RITM.  Throughout the main flow I need to reference either of those initial forms that were generated.  However, while this flow is running someone else could easily complete another of those Service Catalog forms which would create another different REQ and RITM.

So, my question is, how in the subflow do I make sure that I am referencing the correct REQ and RITM and not getting any of the others that were created in the exact same fashion?  Because it's a subflow I can't reference a previous step and pull in the data pill for it because it's not found there but only is found in the main flow's data pills.  Doing a general lookup for tickets on the sc_request table doesn't guarantee me to have the right ticket, either.  Thoughts?

1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

Hi,

You should definitely try to split your Flow into subflows!

In order to get the right data into a subflow, you will need to define correct input parameters.

So if your Subflow would depend on the initial RITM, send it as an input, by creating a reference to a sc_req_item record in the subflow, and make it mandatory.
Then when calling your subflow, put the correct input using the data pill picker.

Example below.

find_real_file.png

 

find_real_file.png

View solution in original post

2 REPLIES 2

OlaN
Giga Sage
Giga Sage

Hi,

You should definitely try to split your Flow into subflows!

In order to get the right data into a subflow, you will need to define correct input parameters.

So if your Subflow would depend on the initial RITM, send it as an input, by creating a reference to a sc_req_item record in the subflow, and make it mandatory.
Then when calling your subflow, put the correct input using the data pill picker.

Example below.

find_real_file.png

 

find_real_file.png

Thank you so much!  I knew there were inputs, but I couldn't piece everything together (like adding in the Trigger RITM on your second screenshot) or using Reference.Requested Item in your first screenshot.  I just ran a test and that seemed to do it for me.  I really appreciate the quick assist!