Proper way to wait for Change Closed or Cancel condition

ILYA STEIN
Tera Guru

I am creating standard change requests dynamically in a Flow Designer flow in response to a user submitting a RITM. The flow is configured to wait until the change's state is closed or cancelled, and update / close the RITM accordingly. However, I get a confusing error in the Wait for Condition step.
Here is the Wait for Condition part of the flow, along with the error details:

ILYASTEIN_0-1768505068402.png

Will appreciate any advice on how to avoid / handle this error.

2 REPLIES 2

Matthew_13
Mega Sage

Yeah indeed, I’ve run into this with Flow Designer before. The “Wait for Condition” step is picky about what it can “hold onto” while the flow is paused.

What’s happening is: you’re probably feeding the Wait step a record object/data pill coming back from the “Create Change” action. When the flow pauses, it has to store that value so it can resume later, and sometimes that record object doesn’t serialize cleanly—so you get that confusing [object] / action_status error.

What usually fixes it is a small change in approach:

  1. Right after you create the Change, store only the sys_id in a string variable

  2. Do a Look Up Record on change_request using that sys_id

  3. Use the Look Up Record output as the “Record” for the Wait for Condition step (wait until state is Closed/Canceled)

Same logic, but instead of trying to “pause” with a complex object, the flow pauses with just an ID and re-loads the record cleanly.

Also worth double-checking:

  • Make sure the flow is running with enough access (often easiest to run the flow/actions as System) so the Wait can re-check the record later.

  • Add a timeout path so the RITM doesn’t sit forever if the change never closes.

That pattern is usually enough to make the error go away.

 

@ILYA STEIN - Please mark as Accepted Solution and Thumbs Up if you find Helpful :

Ankur Bawiskar
Tera Patron

@ILYA STEIN 

So your flow is on catalog item, it creates CHG and it should wait till CHG is Closes/Cancelled and then proceed

You can use this approach.

sharing example on how to wait till all catalog tasks are closed and then update RITM, you can enhance it between CHG and RITM

  1. Use "Look up Record" action for change_request table to find all records that matches this RITM (Since CHG is linked with RITM)
  2. Use action "For Each item in" above results
  3. Use action "Wait for condition" where State is Closed/Cancelled.

AnkurBawiskar_0-1768533579363.png

 

💡 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