yawlfoundation / yawl

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

Codelets are not resumed after a server restart #615

Closed fmannhardt closed 6 years ago

fmannhardt commented 6 years ago

Differently to what is documented in the AbstractCodelet JavaDocs, YAWL does not resume the execution of Codelets after a server restart. Instead the work item stay 'busy' in the YAWL Engine and is not fired again. Therefore, the execute method is not executed again and neither the resume method.

This affects all Codelets and leads to blocked YAWL cases, which can never be finished. I attached a small test set to reproduce the issue.

YAWL-LongRunningWorkitems-Source.zip

fmannhardt commented 6 years ago

To reproduce install the Codelets and start a case of the YAWL spec. The retrieve codelet should poll every second whether a file exists. Now restart the YAWL Engine and it does not continue.

fmannhardt commented 6 years ago

Note that I also tried to use the resume method, but that should not be needed in this case since the codelet does not depend on any state.

adamsmj commented 6 years ago

There was a race condition that sometimes caused a failure to persist the running codelet. This has been refactored and fixed in the latest update.

You are right about the resume method, it should only be used to restore state and so you should remove it from your codelet.