Two SCTASk tickets are creating in a parallel but auto updating the state.

LaraReddy
Tera Guru

HI All,

We created a Flow to generate two SCTASKs simultaneously, and it is working as expected. However, we observed an issue with the task states.

For example, if one SCTASK is closed as Closed Complete and the other is closed as Closed Incomplete, the RITM is correctly updated to Closed Incomplete based on the Flow logic. However, the state of the first SCTASK unexpectedly changes from Closed Complete to Closed Incomplete, and vice versa, causing both SCTASKs to end up with the same state.


LaraReddy_0-1786011818581.png

Advance thanks.







 

8 REPLIES 8

Hi @LaraReddy ,

 

Thanks for identifying the root cause.

Since the behavior is coming from the OOB "Close Tasks Due to Cancellations" Business Rule, I would recommend avoiding modifications to the OOB Business Rule directly, as it can create upgrade and supportability challenges.

A few questions:

  • Is the RITM state being set to Closed Incomplete or Cancelled by the Flow?
  • Is the OOB Business Rule executing because of a parent state change on the RITM?

If the OOB BR is being triggered by the RITM update, one option would be to adjust the Flow logic so that it does not move the RITM into a state that invokes the cancellation logic until all SCTASK processing is complete.

Alternatively, you could implement a custom Business Rule/Flow with additional conditions to preserve the individual SCTASK closure states, rather than trying to stop the OOB BR execution. In general, preventing OOB BR execution is not recommended unless ServiceNow provides a supported mechanism for doing so.

Could you share the condition and script from the "Close Tasks Due to Cancellations" Business Rule and the logic that updates the RITM state? That would help determine the most appropriate approach.


Please mark this response as Helpful or Correct if it helped.

Hi Lakshmi,
Thanks for the response.

As we mentioned above, We're moving the RITM state closed incomlete, if any one stcask state moves closed incomlete or skipped.

Yes, We don't want to touch the OOB BR script, But it would be helpful if we can adjust to bypass the OOB script at the exssiting flow level
After - Insert and Update

LaraReddy_0-1786015091301.png

 

@LaraReddy 

the OOTB BR is working and closing sc task when RITM state gets updated

You can customize this OOTB BR and ensure it doesn't run for your catalog item's SC TASK

Note: updating OOTB components should be checked as well during upgrades

Configuration, customization, and custom development guidelines for ServiceNow 

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Abhishek Pal
Mega Guru

Hi @LaraReddy ,

Do not create another Business Rule to reverse the task states, and do not try to suppress the OOB Business Rule from Flow Designer.

The OOB Business Rule is running because your Flow is moving the RITM Stage to Request Cancelled. The "Close Tasks Due to Cancellations" Business Rule is designed to close the related catalog tasks when the RITM is cancelled.

There is no supported Flow Designer option to skip one specific Business Rule. Avoid using setWorkflow(false), because it suppresses all Business Rules and can leave the REQ, RITM, tasks, approvals, and audit history inconsistent.

Recommended solution:

1. Remove the action that closes the RITM immediately when the first SCTASK becomes Closed Incomplete.

2. Create both SCTASKs in parallel.

3. Configure each branch to wait until its SCTASK reaches a closed state.

For example:

Closed Complete
Closed Incomplete
Closed Skipped

4. Continue the Flow only after both parallel branches have completed.

5. Evaluate the final states of both tasks.

Use logic such as:

If either SCTASK is Closed Incomplete:
RITM State = Closed Incomplete
RITM Stage = Complete

Else if both SCTASKs are Closed Complete:
RITM State = Closed Complete
RITM Stage = Complete

Else if both SCTASKs are Closed Skipped:
RITM State = Closed Skipped
RITM Stage = Complete

Important:

Do not set the RITM Stage to Request Cancelled when you need to preserve the individual SCTASK closure states.

Request Cancelled is what triggers the OOB "Close Tasks Due to Cancellations" Business Rule.

For an execution flow, first test by removing the custom RITM closure actions completely. OOB state-closure logic can close the RITM based on the final states of all associated catalog tasks:

- All tasks Closed Complete -> RITM Closed Complete
- At least one task Closed Incomplete -> RITM Closed Incomplete
- All tasks Closed Skipped -> RITM Closed Skipped

The expected design is:

Create both SCTASKs in parallel
-> Wait for both tasks to close
-> Evaluate their final states
-> Close the RITM once
-> Do not use Request Cancelled unless the intention is to cancel the remaining tasks

Creating another Business Rule to change the tasks back would introduce a race condition with the OOB Business Rule and is not recommended.

Reference:

https://www.servicenow.com/docs/r/servicenow-platform/service-catalog/state-closure-request.html

Hope this helps!

If this response helped, please mark it as Helpful.
If it resolves your issue, please Accept it as Solution.

Kind Regards,
Abhishek Pal