Workaround to set Stages from the flow designer if RITM is cancelled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2025 10:57 AM - edited 04-15-2025 10:58 AM
Hi,
I've read a lot of community forum topics about Stages in flow designer and how I should and shouldn't set them.
I have a Flow with the "Service Catalog" trigger and I would be more than happy with the flow capabilities it has, but I'm actually overwhelmed with setting a stage when the RITM state is either Closed Incomplete or Closed Skipped.
As you may understand from the condition above, that I want to wait for this condition to happen. At first I thought that this is an easy one, because I'll use "Do the following in Parallel", create one "Wait for condition" action, and on a second branch I'll just write the whole other logic. It was perfectly fine, but when it comes to set the stage accordingly, I froze.
Unfortunately, I've reached the end. Because it turned out I can't set the stage from the "Do the following in parallel" logic!
What I've tried so far:
1. Created a subflow with the Wait for condition action and a script that cancels the parent flow.
- Not a good idea, because I can't set the Stage from the sublow.
2. Created a separate flow with a custom trigger (On the RITM table where it waits for the state either Closed Skipped or Closed Incomplete) and set the "Request Cancelled" stage from there.
- It worked, the Business rules on the RITM table automatically canceled the other flow.
- Unfortunately, the previous flow stages were overridden and it only showed a Stage in list view with just one stage.
3. Created a Business Rule on Request Item table with the condition:
current.state.changesTo(7) || current.state.changesTo(4);
In the script I set the stage as "Request Cancelled".
- Worked, but the Stage in the list view didn't update. In the picture below it is a Cancelled Request, but the stage icons as you can see are not updated.
4. I also read this KB0858491, but in my opinion, it's too complex to query the stage_state table each time update the stage_status field to color the stages. It will have a significant impact on performance when there will be thousands of records.
5. Update record action and set Stage from there also doesn't work fine. The Stages are not visible in the list view.
So my question is, am I thinking too hard on this one? How can I achieve the "Do the following in Parallel" logic with a Flow designer, but also with an ability to set the Stages within that flow.
Who is going to be my lifesaver?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 12:17 AM
Hi @andriusiene , I tried to check out the issue you mentioned. Yeah, it’s a bit tricky to set up stages in RITM when using the "do the following in parallel" option. I tried something, it’s a bit of a workaround. Since I’m not exactly sure what is your requirement, let me know if this isn’t what you were looking for. I also checked the community but couldn’t find a clear solution there either.
Firstly, I created a 'True/False' flow variable -
- In the 4th step - Do the following in parallel is called
- 5->6 the first parallel task is waiting for the state change to 'Closed Incomplete' /'Closed Skipped' / Closed Complete'
- 7 -> checking if the state changed to 'Closed Incomplete' /'Closed Skipped'
- 8 -> set the 'Cancel' variable to 'true'
- 10 -> else set the 'Cancel' variable to 'false'
- In the 11->12 second parallel section is where you will do your whole other logic
- 13 -> here we will set the 'Request Cancelled' state - if the flow variable is true.
RITM0010006 - state is changed to 'Closed Incomplete'
RITM0010005 - state is changed to 'Closed Complete'. We can see the 'Request Cancelled' stage is skipped here -