- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2024 07:10 PM
I am trying to write a script to check for any open change tasks and return true or false in Wait for Condition in flow designer.
But the Wait for Condition is showing error every time. Even if write a simple statement [return true] without any other code, the activity still shows error.
The subflow input is change request record and below is the Wait for condition to check for any open change tasks.
Please suggest if any idea?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 12:51 AM - edited 10-08-2024 01:40 AM
Hello @Anu2
The wait for condition script expects an encoded query as return value (for example "active=true^change_request=..."), not just the true false. I don't think wait for condition fits in your requirement.
Please ckarify your requirement, like you want to wait until all the change tasks are closed to continue further, OR just check if there is any open tasks or not and the continue accordingly. Based on your requirement I can provide a solution here.
If you want to wait until all the open tasks are closed, follow the screenshots below.
1. Sub flow with input type of Reference to Change Request
2. Create a flow variable.
3. Set flow variables - Check box unchecked - means False
4. Use a Do.. While loop
5. In the loop, have these actions.
Please let me know if you need any help 🙂
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 12:51 AM - edited 10-08-2024 01:40 AM
Hello @Anu2
The wait for condition script expects an encoded query as return value (for example "active=true^change_request=..."), not just the true false. I don't think wait for condition fits in your requirement.
Please ckarify your requirement, like you want to wait until all the change tasks are closed to continue further, OR just check if there is any open tasks or not and the continue accordingly. Based on your requirement I can provide a solution here.
If you want to wait until all the open tasks are closed, follow the screenshots below.
1. Sub flow with input type of Reference to Change Request
2. Create a flow variable.
3. Set flow variables - Check box unchecked - means False
4. Use a Do.. While loop
5. In the loop, have these actions.
Please let me know if you need any help 🙂
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 03:06 AM
Hi Avnesh,
Thank you so much for this. It worked perfectly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 03:14 AM
I'm glad it helped you 😀 and thanks for accepting my answer as solution, Please make it helpful too by hitting 👍
Anvesh