Guest Paul Alexander Posted September 15, 2020 Share Posted September 15, 2020 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 More sharing options...
Guest Ehsan Posted September 16, 2020 Share Posted September 16, 2020 @Paul Alexander, Could you please share a screenshot of the "Put on hold" Hornbill Automation so I can try and recreate with the same configuration. Ehsan Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted September 16, 2020 Share Posted September 16, 2020 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. thanks Link to comment Share on other sites More sharing options...
Guest Ehsan Posted September 17, 2020 Share Posted September 17, 2020 @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. Ehsan Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted September 17, 2020 Share Posted September 17, 2020 Thanks @Ehsan That all makes sense thanks. I'll change things to your suggestion and hopefully it'll fix it! thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now