Subflow Creates Orphaned Demand Tasks

Scott93
Tera Contributor

Good day.  I've been unsuccessful in finding anything relevant to my development issue online, to include this forum. 
I am trying to create a flow in which the subflow will create different demand tasks based upon the parent demands subcategory (not OOB but user created sub-categories).  

The issue is when I test the flow a demand will be generated with the proper subflow that was selected on the form's drop down menu and the demand tasks are generated but they are "orphaned" and do not have the parent demand assigned. 

I believe the issue may reside in the record producer's script.  In the first file attached you will see the template script I am using.   In the screen shot there is a green arrow next to the current.u_nao_subcategory line.  This line works in another flow but it will create a demand with only PPSM-CLSA as the subcategory.  I changed the subflow and commented out this line but my java experience is minimal and not sure if this is the cause of the orphaned demand tasks when I // comment out.  Again, the demand gets created with the proper PPSM subcategory selected.
The next screen shot is the top of the subflow.  By using if statements I'm trying to avoid having to create 5 different record producers.  The demand tasks are generated but they will not appear under the demand. 

Any insight would be appreciated.  Standing by to offer more details if needed. 

Scott93_0-1720794664510.pngScott93_1-1720794753982.png

 

1 ACCEPTED SOLUTION

Isaac Vicentini
Mega Sage
Mega Sage

Hi @Scott93,

 

When you configure the creation of tasks in the subflow, you must assign the demand record as the parent of the task.

Usually, this assignment is in the "Parent" or "Universal Request" task field.

 

Is this being done?


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

View solution in original post

4 REPLIES 4

Isaac Vicentini
Mega Sage
Mega Sage

Hi @Scott93,

 

When you configure the creation of tasks in the subflow, you must assign the demand record as the parent of the task.

Usually, this assignment is in the "Parent" or "Universal Request" task field.

 

Is this being done?


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

Thank you and of course!  I did not have the parent assigned within the demand task and I was focused on everything else.  Embarrassing mistake. 

Thank you very much.  Your input along with Isaac's below put me on the right direction as I was making a rookie mistake.  Appreciate your help. 

Bhargav Padarth
Tera Contributor

Can you post the action details of the Create Task in the sub-flow you have created.You should be choosing the respective Task Table name relate to the Demand & Assign the Demand Number with the record you are passing as an input to the sub-flow