Flow Designer with silo'd Tasks based on List Collector values in variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 02:26 PM
I have a catalog item that allows the end user to select one to many Business Services using my catalog item.
After submittal, I want first tasks (Task 1) created for all selected Business Services. In this use case, there would be two tasks. If 5 Business Services were created there would be 5 tasks created.
When the fulfiller approves one of the tasks (i.e. Task 1 for Adobe Download Manager), a second task should be created for ONLY this single Business Service. Task 2 for the second business service in my example (Task 2 for Apache Tomcat) won't be created until Task 1 for Apache Tomcat is closed.
Lastly, once both Business Services are routed through both tasks (Task 1 and Task 2) and closed, only then can the ritm be closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 05:57 PM
Hi Mark, this article should help: Using list collector in Flow Designer 'For Each lo... - ServiceNow Community
Summarizing it, you'll need to convert the list collector into an array, which will be accomplished via a flow action. Once you have that, you can plug it into the item's process engine flow and adjust its logic according to your needs. If you need further help, let me know and I'll be happy to assist.
If I've at all helped, please return the favor by clicking the thumb next to my post. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 08:28 AM
The issue with this solution is when you create tasks in the loop it either waits for each task to be created in the loop; or it creates all the tasks. I need tasks to be created in tranches (i.e. All Tasks 1 for all items in array). Then it trickles down based on a one by one approval of the Task 1s. Meaning when Task 1 is created for a single item in the list collector, Task 2 will be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 09:09 AM - edited 02-14-2025 09:18 AM
Hi @Mark Brogna
Create a subflow where you can have task1 and task2 with business service as the input, In subflow you can wait until the task1 is closed complete and create task2 and use that subflow in for each loop as mentioned in the above article by converting list to array. After the loop completed, lookup the catalog tasks related to that particular RITM and then use them in for each loop with wait for condition until all the tasks are closed (i.e, active is false) and then close the RITM.
Thanks,
Swathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 10:24 AM
So, how would I create all 3 tasks required for the first task? And then create ONLY the second task if the first task is complete? The wait checkbox waits on each task to be complete before moving forward. When using the for each logic it will create one business service task at a time.