Catalog Task workflow activity in Parallel Flow Launcher

benjilali
Giga Contributor

Hi,

I'm trying to use a parallel flow launcher which calls to a workflow that creates a certain number of catalog tasks using the Catalog Task workflow activity.

When the parallel flow starts it creates the parallel activities but the issue is it creates only one catalog task instead of four.

can someone help me on this?

Regards,

5 REPLIES 5

Tim Deniston
Mega Sage
Mega Sage

Can you post some screenshots of the workflow? That might help diagnose the issue. 

 

Are your Catalog Task activities in parallel or sequential? If sequential, is the "Wait for completion" box in the activity checked? 

 

Does your workflow pass validation when checking it in or using the "Validate" checkbox in the top-right of the workflow canvas? 

Hi,

1. It is parallel flow:

find_real_file.png

2. Inputs:

find_real_file.png

3. group_data is (in cycle):

find_real_file.png

4.  Subflow is:

find_real_file.png

5. Inputs of the flow is: 

find_real_file.png

6. Catalog task script is:

find_real_file.png

 

I checked it many times: workflow.inputs.u_group is different in each iteration (logged that). Some time ago I saw a note that Catalog Task activity creates a task only once then updates it if creation requested. 

Unfortunately I cannot redesign the workflow to use sequential task creation b/c a list of groups based on user input. 

scottl
Kilo Sage

"When the parallel flow starts it creates the parallel activities but the issue is it creates only one catalog task instead of four."

I'm having the exact same problem. Did you find out how to resolve this? Because this renders the parallel launcher redundant if this is how it works, and this is a massive flaw!

Which SN even admit too in their own documentation. 

"This can happen when the same subflow containing a Create Task activity runs more than once in a parent flow. When the subflow reruns and attempts to execute the Create Task activity again, the system reopens the first task activity instead and does not create an additional task."

Note: An alternative to creating duplicate subflows that use the Create Task activity is to add a Run Script activity to the workflow that creates a task with a script.

https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/workflow-activities/reference/workflows-as-subflows.html

benjilali
Giga Contributor

Hi guys,

 

thanks for your interaction. i have found a solution for this issue using scripts to create sc_tasks.

I use scratchpad variables to get the sys_id of the task and I use wait for condition activity for iteration management.

Here an exemple :

find_real_file.png

find_real_file.png

find_real_file.png

 

Regards,