Jump to content

Expiring in a loop

Paul Alexander

Recommended Posts

We have a process which puts a request on hold, then suspends waiting for a status change, and this will loop if the 'suspend' node expires OR if the status changes. The status gets changed by a script (which DOES work as it's been tested on hundreds of the requests of this type). 





This seems to be getting stuck in a loop if the node DOES expire - I assume that, once the node expires once, then it's ALWAYS expired? 

I thought that a NEW instance of the 'suspend' node was created each time the loop is activated? If this isn't the case, then how can I have a loop with a 'suspend' node with an expiration date please?

Link to comment
Share on other sites

Hi Ehsan


Hopefully this will help:



I've tested this by changing the timeout of node 2 to 2 minutes, then checking to see which way the process goes.

The first time, it goes round the 'expired' route (which I'd expect).

However, if I then immediately update the request so that the 'wait for status change' option is fulfilled, it STILL  goes round the 'expired' route where I would expect it to go round the 'no match' route. 



Link to comment
Share on other sites

@Paul Alexander,

I've had a chance to investigate this scenario. The first time around when the "Requests > Suspend > Wait for Request Off Hold" Hornbill Automation has completed, the 'Stage Expired' value is set to 'true'. The second time around (i.e. in the loop) when the Hornbill Automation is run, the 'Stage Expired' value is NOT set because a expiry period has not been set up and hence, the old 'Stage Expired' value of 'true' is maintained in memory - This is by design to allow you to use the value later in the stage but I can understand that in a loop, this is not particularly useful.

To that affect, I would recommend the changes below in your process.

After the "Requests > Suspend > Wait for Request Off Hold" Hornbill Automation, add "Requests > Get Request Information > Request Details" Hornbill Automation. This would load the Request's most up to date record.


Update the Decision node to check on the Request's status, as below. As the Request's status is set everytime (i.e. overwritten in memory), we'll not get the scenario previously described.


Hope this helps.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...