| java.lang.Object de.danet.an.workflow.assignment.StandardResourceAssignmentService
StandardResourceAssignmentService | public class StandardResourceAssignmentService implements ResourceAssignmentService(Code) | | This class implements the standard resource assignment service provided
as part of the workflow package.
|
Method Summary | |
protected void | addAssignment(long finderId, String actId, WfResource resource) Assign a resource to an activity.
Parameters: actId - a unique (with respect to an ActivityFinder )identifier for the Activity. | public WfResource | asResource(Principal principal) Given a
java.security.Principal principal , return the
workflow resource associated with this principal. | public Collection | assignments(ActivityFinder finder, String actId, WfActivity activity) Return the assignments to an activity.
Parameters: actId - a unique (with respect to an ActivityFinder )identifier for the Activity. | public Collection | authorizers(WfResource resource) | public Collection | autoAssignResources(ActivityFinder finder, String actId, WfActivity activity, Principal principal, Participant participant) Triggers the automatic assignment of resources to an activity that
is about to become ready.
If resSel is of type string, the following cases
are handled by the assignment service:
!:currentUser
- Assigns the current user.
In all other cases the parameter resSel is simply
passed through to
ResourceManagementService.selectResources the resourceselection service .
Parameters: actId - a unique (with respect to an ActivityFinder )identifier for the Activity. | public void | changeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource oldResource, WfResource newResource) Change an assignment for enacting an activity.
Parameters: finder - the finder used to lookup activities by their finderId s Parameters: actId - a unique (with respect to an ActivityFinder )identifier for the Activity. | protected ActivityFinder | finderByIndex(long finderId) Lookup a finder for a given finder id. | protected long | finderId(ActivityFinder finder) Get the finder id for a finder.
Parameters: finder - the activity finder in question. | protected DataSource | getDataSource() Return the data source oassed to the constructor. | public WfResource | getResource(WfAssignment asnmnt) | protected ResourceManagementService | getResourceManagementService() Return the resource management service passed to the constructor. | public boolean | isMemberOfWorkItems(WfResource resource, WfAssignment assignment) Find out if a given assignment belongs to the work items assigned to
a particular resource.
Parameters: resource - the resource. Parameters: assignment - the assignment in question. | public Collection | knownResources() Returns at least the collection of all the workflow resources whom has
been assigned work items, but optionally it can return the additional
workflow resources who are known to the resource assignment service. | public void | removeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource resource) Remove the assignment of a resource to an activity. | public WfResource | resourceByKey(String key) Given the key of a WfResource
(obtained with
WfResource.resourceKeyresourceKey() ), return the workflow resource
associated with this key.
This method is implemented by simply calling
ResourceManagementService.resourceByKeyresourceByKey of the underlying resource
management service.
Parameters: key - the key. | public Collection | workItems(WfResource resource) Return the assignments of a given resource.
Parameters: resource - the resource. |
addAssignment | protected void addAssignment(long finderId, String actId, WfResource resource) throws RemoteException, AlreadyAssignedException(Code) | | Assign a resource to an activity.
Parameters: actId - a unique (with respect to an ActivityFinder )identifier for the Activity. The length of actId is guaranteed not to exceed 64. Parameters: finderId - the finderId s. Parameters: activity - the activity that is about to become ready. Parameters: resource - the resource to be assigned. throws: RemoteException - if a system-level error occurs. throws: NoSuchResourceException - if the resource is invalid. See Also: ActivityFinder throws: AlreadyAssignedException - if the assignment alreadyexists |
autoAssignResources | public Collection autoAssignResources(ActivityFinder finder, String actId, WfActivity activity, Principal principal, Participant participant) throws RemoteException(Code) | | Triggers the automatic assignment of resources to an activity that
is about to become ready.
If resSel is of type string, the following cases
are handled by the assignment service:
!:currentUser
- Assigns the current user.
In all other cases the parameter resSel is simply
passed through to
ResourceManagementService.selectResources the resourceselection service .
Parameters: actId - a unique (with respect to an ActivityFinder )identifier for the Activity. The length of actId is guaranteed not to exceed 64. Parameters: finder - the finder used to lookup activities by their finderId s. Parameters: activity - the activity that is about to become ready. Parameters: principal - the current caller as known in the EJB context,may be null . Parameters: participant - the Participant that describes the resource selection criteria. the assigned resources (instances of de.danet.an.workflow.omgcore.WfResourceWfResource ). throws: RemoteException - if a system-level error occurs. See Also: ActivityFinder |
finderByIndex | protected ActivityFinder finderByIndex(long finderId)(Code) | | Lookup a finder for a given finder id.
Parameters: finderId - the finder id the finder |
getDataSource | protected DataSource getDataSource()(Code) | | Return the data source oassed to the constructor.
Returns the data source. |
getResourceManagementService | protected ResourceManagementService getResourceManagementService()(Code) | | Return the resource management service passed to the constructor.
Returns the rms. |
isMemberOfWorkItems | public boolean isMemberOfWorkItems(WfResource resource, WfAssignment assignment) throws RemoteException, NoSuchResourceException(Code) | | Find out if a given assignment belongs to the work items assigned to
a particular resource.
Parameters: resource - the resource. Parameters: assignment - the assignment in question. true if the assignment belongs to the work items of the resource . throws: RemoteException - if a system-level error occurs. throws: NoSuchResourceException - if the resource is invalid. See Also: de.danet.an.workflow.spis.rms |
knownResources | public Collection knownResources() throws RemoteException(Code) | | Returns at least the collection of all the workflow resources whom has
been assigned work items, but optionally it can return the additional
workflow resources who are known to the resource assignment service.
the collection of the known resources to the ras (instances ofde.danet.an.workflow.omgcore.WfResourceWfResource ). throws: RemoteException - if a system-level error occurs. See Also: de.danet.an.workflow.assignment |
removeAssignment | public void removeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource resource) throws RemoteException, InvalidResourceException, NotAssignedException(Code) | | Remove the assignment of a resource to an activity. This method
is called by the workflow engine to implement the assignment
manipulation methods provided by its API.
Parameters: actId - a unique (with respect to an ActivityFinder )identifier for the Activity. The length of actId is guaranteed not to exceed 64. Parameters: finder - the finder used to lookup activities by their finderId s. Parameters: activity - the activity that is about to become ready. Parameters: resource - the resource to be assigned. throws: RemoteException - if a system-level error occurs. throws: InvalidResourceException - if the resource is invalid. throws: NotAssignedException - if the resource is not assigned tothe given activity See Also: ActivityFinder |
|
|