flow designer trigger and business rule trigger are conflicting

Debasis Pati
Tera Guru

We have a requirement as below, create one cancel button on sc_request table when clicked on it pop-up to fill additional comment and once provided and cancelled it should cancel the request and close incomplete all the active ritm and active catalog tasks also it should copy the comment what we have provided. Now i have achieved it by creating a declarative action and created a flow designer on request table and trigger condition as wen request state changes to closed cancelled. it is working perfectly fine the conflict is below. we have the same kind of requirement but slightly different for sc_req-item table same popup and cancel button but when i cancel this it should first close incomplete the ritm and update comment also post this it should check all the active tasks & ritms which are present and mark them close incomplete and copy the comment.for the sc_request it should check if any ritm is closed complete if yes it should mark the state as closed complete if no ritm is closed complete then it should mark the sc_request to closed cancelled. now for the cancel button in ritm table if i close cancel the request again the first flow will run and it will go on loop how i can avoid this any idea?

@Ankur Bawiskar  any suggestions?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Debasis Pati 

My thoughts

1) try to add some delay in your flow i.e. Wait For Duration

OR

2) create a custom field on RITM such as a "Cancel Source" or "Skip Cancel Flow"

-> When triggering a cancel action from one level (say, RITM), set this flag before updating the parent/request record.

-> Update your flow trigger conditions to check for this flag and only run if it's not set. This prevents the parent flow from firing when the cancel is initiated from a child item and vice versa.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello @Ankur Bawiskar ,
Even if i put delay this wont help if the button in sc_req_item table is clicked and the business rule on ritm table will make the sc_req to cancelled then again the flow will run this should not run and if that runs again the flow will trigger the business rule and it will go on loop.
also for custom field we are not allowed.

@Debasis Pati 

I don't think without Custom field you can do anything here if Delay won't help you.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader