Jump to content

Expiring in a loop


Paul Alexander
 Share

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). 

image.png.ee469bcc58e07b93914000f8c45d57dc.png

 

 

 

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:

image.png.3d0fc676475005347e7f0c8c79ff334b.pngimage.png.9b5c7a0357365ab53c8fa060cecae26d.pngimage.png.6255b1fd15339d853982f441bc79efb3.pngimage.png.80fbf2dbe8fc702d5cf687771565d62c.pngimage.png.3c267b9589326ee499bb17e3fd2ca213.png

 

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. 

 

thanks

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.

image.png

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.

image.png

Hope this helps.

Ehsan

 

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
 Share

×
×
  • Create New...