01: package org.obe.runtime.strategy;
02:
03: import org.obe.spi.WorkflowContext;
04: import org.obe.spi.runtime.CompletionStrategy;
05: import org.wfmc.wapi.WMActivityInstanceState;
06: import org.wfmc.wapi.WMWorkflowException;
07:
08: /**
09: * Completes an activity when any of its work items are closed.
10: *
11: * @author Adrian Price
12: */
13: public class AnyCompletionStrategy implements CompletionStrategy {
14: public WMActivityInstanceState apply(WorkflowContext ctx)
15: throws WMWorkflowException {
16:
17: return WMActivityInstanceState.CLOSED_COMPLETED;
18: }
19: }
|