AnsweredAssumed Answered

v9 - Limiting events via Runtime tab's Cancel/Quit & postconditions' Restart functionality

Question asked by Daryl_Brown_218 on Aug 31, 2016
Latest reply on Sep 2, 2016 by Wolfgang_Brueckler_1288
Hello,

We're trying to build a workflow that includes a file event to verify our input file exists before we proceed on to the next step.
The catch is, we don't want the event to keep polling indefinitely -- we want to throw an error at some point if the file isn't there -- but since this is a generic event we're building, we'd like to be able to dynamically control how long we wait.  Now we know we can use the Runtime tab to kill the task once it reaches a certain max runtime, but we can't control those MRT settings via a :PUT_ATT command...so we'd have to either hardcode the MRT into the event itself, or on the event's properties within the workflow.  That'd work...but it goes against our desire to define these durations / intervals as variables (e.g., &LOCAL_EVENT_RETRIES# and &LOCAL_EVENT_RETRY_INTERVAL#).

So...what we tried next was to hardcode a max runtime into the event, and configure it to do the Cancel/Quit when MRT exceeded.  We then added postconditions to configure it to retry a few times: 
i0usarrgvcc0.png

But in practice, what seems to be happening is that the event times out at the MRT threshhold -- it finishes in "ENDED_TIMEOUT - ended untimely".  When I look at the Postconditions report, I see that it recognized that it was eligible to restart, but then it threw this message:
U0021335 No restart is executed because the task is in status 1942.  
(1942 = ENDED_TIMEOUT - ended untimely)

So...my question for everybody...  Is there a way to achieve what we're trying to do here?
For example, is there a way for the Runtime's Cancel/Quit to put the task into an "ENDED_NOT_OK - aborted" status rather than an "ENDED_TIMEOUT - ended untimely" status?
Or is there a postconditions trick we could implement to get around this U0021335 error?
Or are we just stuck hardcoding the polling interval and MRT values into our event?

Thanks in advance!

Outcomes