01: package org.obe.spi.runtime;
02:
03: import java.security.Principal;
04: import org.obe.spi.WorkflowContext;
05: import org.wfmc.wapi.WMWorkflowException;
06:
07: /**
08: * Work item assignment strategy.
09: *
10: * @author Adrian Price
11: */
12: public interface AssignmentStrategy {
13: /**
14: * Applies the work item assignment strategy to the specified candidates.
15: *
16: * @param candidates The principals to whom work items could be assigned,
17: * based on the Performer specified in the Activity definition.
18: * @param expandGroups If <code>true</code>, recursively expand groups into
19: * their constituent members. If <code>false</code>, permits a work item to
20: * be assigned to a Group rather than individual users.
21: * @param ctx The workflow context.
22: * @return The principals to whom work items should be assigned. It must be
23: * a subset of <code>candidates</code>.
24: * @throws WMWorkflowException
25: */
26: Principal[] apply(Principal[] candidates, boolean expandGroups,
27: WorkflowContext ctx) throws WMWorkflowException;
28: }
|