yawlfoundation / yawl

Yet Another Workflow Language
http://www.yawlfoundation.org
GNU Lesser General Public License v3.0
90 stars 35 forks source link

Case not suspended after timeout #602

Closed a-pika closed 7 years ago

a-pika commented 7 years ago

Main5.xrs.gz Main5.yawl.gz worklet5.xrs.gz worklet5.yawl.gz

For the attached specifications, when the timeout event occurs in the worklet, the case is not suspended (as per the timeout rule).

yawlfoundation commented 7 years ago

When a work item times out, the engine (force) completes the item before announcing the timeout to services. When said item represents the last (or only) task in the specification instance, as in this example, the engine will also complete the case, and announce that to services, before the timeout is announced. This is the expected and correct behaviour.

The worklet service receives the worklet case completion announcement, and, because it was a selection worklet, marks the selection as complete and checks the parent work item back in, allowing the parent case to continue.

So, the (worklet) case has already completed by the time the exlet tries to suspend it - since there are no more tasks in the case, it makes little sense to try to suspend it anyway.

The compensation worklet is still allowed to run - unlike a selection worklet, the compensation does not need a extant parent case while it runs.

I have added several new log messages in the latest build that hopefully better explain what is going on in these situations.