- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2024 07:16 PM
Hi all,
Trying to figure out what options I have within Flow Designer to monitor multiple tasks that have been created under a case for a completed state. I only need one task to be completed and then I can close the others as not required.
Basic overview of the flow
- Get managers
- for each manager
- create task
- Wait for condition (one task is closed complete)
Any advice appreciated 😄
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2024 06:18 PM
If anyone ever finds this here is the solution I implemented in this situation:
- Lookup created records (matching condition X)
- Do the following
- For each record looked up (X)
- Lookup record (this record)
- if (this record) is closed complete
- then
- set flow variables (record closed complete) = true
- then
- if (record closed complete) is false
- then
- timer 1 hour
- then
- For each record looked up (X)
- until (record closed complete) = true
Might be a better way and I didn't really want to use a timer but his is how i got around this to begin with. Would still love any better recommendations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2024 06:18 PM
If anyone ever finds this here is the solution I implemented in this situation:
- Lookup created records (matching condition X)
- Do the following
- For each record looked up (X)
- Lookup record (this record)
- if (this record) is closed complete
- then
- set flow variables (record closed complete) = true
- then
- if (record closed complete) is false
- then
- timer 1 hour
- then
- For each record looked up (X)
- until (record closed complete) = true
Might be a better way and I didn't really want to use a timer but his is how i got around this to begin with. Would still love any better recommendations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2024 07:51 PM
Hi @Kit G,
Looks like you found a solution yourself!
What you have is good but you need to watch out for a Flow property, sn_flow_designer.max_iterations, which stops the flow if the number of loops goes over a certain value (default value is 1000). So with your Flow, if no one completes the task within 1000 hours after its creation, your Flow will just stop. But I assume this is very unlikely 🙂
Other options to explore are
- create an individual Flow per task which would close the other tasks once the current one is closed
- Use Business Rule to close other related tasks once the current one is closed
However, I would like to question if your 'process' can be improved.
By the looks of it, you are going to close all the other tasks if one's completed.
If so, what if someone else was working on a task as well? If it's no longer needed as someone else has completed it, aren't you wasting their time spent on the task?
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2024 03:09 PM
Hi @James Chun ,
Thanks for the reply. I was aware of the limit 1000 loops before it bombs out which equals out to about 41 days with the 1 hour timer which should give enough time to resolve the task. As we work iteratively I will add it to the list of things that can be improved. Roughly thinking a way to handle the amount of loops - maybe a flow variable to count up to 999 etc. and do something if it is reached before the flow bombs.
In terms of the process - yes it could be improved. In this case however the business requirements I was trying to meet are for a very particular task where we dont mind which manager completes the work just that one does. You are right it could waste sometime. As the situation of multiple line managers is the minority and the time to complete the task is low we are hopeful the amount of wasted time is minimal.
Cheers