- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2025 03:29 AM - edited ‎06-13-2025 05:07 AM
Hi All,
I need help with a requirement - the requirement is on the change request form when we are moving from implement to review state if that change request has any associated change task auto or manual if the task is not either closed or cancelled the change request state should not move from implement to review state Now to fix it
I wrote a Business Rule on change_request table, before update with condition state changes to review
This is the script that I have written
How can I avoid it so that irrespective whether there is auto task or manual task the change request does not move to review state unless until all the change task are closed
And the flow is OOTB
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 04:35 AM
Hi @Harsh3842,
If you want the Flow to not be activated when BR is running then add
if (taskGR.hasNext()) {
taskGR.setWorkflow(false);// Disables the Flow on Change Task
gs.addErrorMessage("All Change Tasks must be closed or cancelled before moving to the Review state.");
current.state = previous.state; // Revert to previous state
gs.setAbortAction(true); // Block the update
}
However, you need to check if disabling the Flow doesnt hamper critical processes before moving forward.
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 04:18 AM
Hi @Harsh3842
If you have no tried, please write setWorkflow(false) in your business rule and try out.
Thanks and Regards,
Vasu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 04:20 AM
Hi @Harsh3842
If you have no tried, please write setWorkflow(false) in your business rule and try out so that the flow designer does not trigger.
Thanks and Regards,
Vasudev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 04:35 AM
Hi @Harsh3842,
If you want the Flow to not be activated when BR is running then add
if (taskGR.hasNext()) {
taskGR.setWorkflow(false);// Disables the Flow on Change Task
gs.addErrorMessage("All Change Tasks must be closed or cancelled before moving to the Review state.");
current.state = previous.state; // Revert to previous state
gs.setAbortAction(true); // Block the update
}
However, you need to check if disabling the Flow doesnt hamper critical processes before moving forward.
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 04:39 AM
@Harsh3842 use taskGR.update(); after setting up values in your code.