Workflow do not transition to the next activity even after the "Wait for Condition" result was true.

Aindrila Mondal
Tera Expert

Hi,

I'm working on a work flow for a catalog. My workflow is on 'sc_req_item' table.

We have an inbound action from where some values are captured and from there is stored on a separate custom table(not in any way related to RITM table) .I want to make the workflow wait until these values are set on the custom table fields .Once the values are set on the custom table fields the workflow should transition to the next step (i.e. close the RITM) after wait for condition.

 

This is the workflow below and the wait for condition script:

 

AindrilaMondal_0-1692707088673.png

 

Tried 2 ways of wait for condition script but neither worked:

1.

AindrilaMondal_1-1692707167436.png

2.

AindrilaMondal_2-1692707213350.png

Can please help me to understand where am I wrong and how to achieve the above.

 

Thanks in advance,

Aindrila

 

 

1 ACCEPTED SOLUTION

Hi Nayan,

Thanks for the documentation!!

Tried using a different approach which solved my issue, used timer to create a loop and keep checking until the values are updated, which helped in my case.

AindrilaMondal_0-1692776924526.png

 

Thanks for your inputs though!!

 

 

 

View solution in original post

5 REPLIES 5

Nayan  Dhamane
Kilo Sage
Kilo Sage

Hello @Aindrila Mondal ,

 

The script looks good to me but the thing I am wondering is that you have added the and condition with every variable meaning if anything is empty then you flow will be stoped.

 

To debug i would suggest you to add logs in each if loop. also in the log check if the all variables are not getting empty values.

 

If my answer solved your issue, please mark my answer as Correct & Helpful based on the Impact

Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.

Hi Nayana,

 

Thanks for your reply!!!

Yes ,you guessed correct that what i want.

 

I used logs to debug and realized that it is working properly only, initially when the field values are blank the workflow is waiting at the wait for condition (for this case the log printed null values as field values not yet filled).

But after the field values are filled the workflow doesn't proceed from wait for condition to next step. How to make the workflow proceed again.

 

It's stuck here:

AindrilaMondal_0-1692766717712.png

 

 

Thanks in advance.

Any help is appreciated.

Hello @Aindrila Mondal ,

try the method mentioned in below post:

https://www.servicenow.com/community/developer-forum/wait-for-condition-is-not-proceeding-with-the-w...

If my answer solved your issue, please mark my answer as Correct & Helpful based on the Impact

Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.

Hi Nayan,

Thanks for the documentation!!

Tried using a different approach which solved my issue, used timer to create a loop and keep checking until the values are updated, which helped in my case.

AindrilaMondal_0-1692776924526.png

 

Thanks for your inputs though!!