01: package org.obe.spi.runtime;
02:
03: import org.obe.spi.WorkflowContext;
04: import org.wfmc.wapi.WMActivityInstanceState;
05: import org.wfmc.wapi.WMWorkflowException;
06:
07: /**
08: * Controls the completion of auto-finish activities. The engine consults the
09: * completion strategy whenever a work item for an auto-finish activity is
10: * closed.
11: *
12: * @author Adrian Price
13: */
14: public interface CompletionStrategy {
15: /**
16: * Applies the completion strategy in the specified workflow context.
17: *
18: * @param ctx The workflow execution context.
19: * @return The new state to be applied to the activity instance. This must
20: * represent a valid state transition, as defined by
21: * <a href="http://www.wfmc.org/standards/docs/interface2-3.pdf">WfMC Interface 2</a>
22: */
23: WMActivityInstanceState apply(WorkflowContext ctx)
24: throws WMWorkflowException;
25: }
|