| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines the resource assignment facility used by the workflow component. A central design issue for this interface is the identification of activites.
 The " of key" methodWfActivity is by
 definition only unique within the scope of the containing process
 and can thus not easily be used to identify a single activity in a
 workflow engine.  Even worse, a resource assignment service might
 be used by more than one workflow engine.
 At this interface, an activity is therefore identified using an
 ActivityFinder and an identifier that is unique with
 respect to the ActivityFinder. The
 ActivityFinder provides both a namespace to allow
 different consumers to request resources and a means for the
 assignment facility to map the identifier back to an actual
 WfActivity object.  See the description of ActivityFinder
 From the workflow engine's point of view, the resource assignment
 service is the only source of objects of type
 WfResource and WfAssignment.
 Implementations of resource assignment services may be (but need
 not be) based on a resource management service as defined in
 package de.danet.an.workflow.spis.rms
| Method Summary | |
|  WfResource | asResource(java.security.Principal principal)Given a principal, return the
 workflow resource associated with this principal. | 
|  java.util.Collection | assignments(ActivityFinder finder,
            java.lang.String actId,
            WfActivity activity)Return the assignments to an activity. | 
|  java.util.Collection | authorizers(WfResource resource)Given a , return the collection of
 resources this resource is authorized for. | 
|  java.util.Collection | autoAssignResources(ActivityFinder finder,
                    java.lang.String actId,
                    WfActivity activity,
                    java.security.Principal principal,
                    Participant participant)Triggers the automatic assignment of resources to an activity that is about to become ready. | 
|  void | changeAssignment(ActivityFinder finder,
                 java.lang.String actId,
                 WfActivity activity,
                 WfResource oldResource,
                 WfResource newResource)Change an assignment for enacting an activity. | 
|  WfResource | getResource(WfAssignment asnmnt)Get the resource associated with an Assignment. | 
|  boolean | isMemberOfWorkItems(WfResource resource,
                    WfAssignment assignment)Find out if a given assignment belongs to the work items assigned to a particular resource. | 
|  java.util.Collection | knownResources()Returns at least the collection of all the workflow resources being assigned to activities, but should also return the additional workflow resources that are known to the resource assignment service. | 
|  void | removeAssignment(ActivityFinder finder,
                 java.lang.String actId,
                 WfActivity activity,
                 WfResource resource)Remove the assignment of a resource to an activity. | 
|  WfResource | resourceByKey(java.lang.String key)Given the keyof aWfResource(obtained with), return the workflow resource
 associated with this key. | 
|  java.util.Collection | workItems(WfResource resource)Return the assignments of a given resource. | 
| Method Detail | 
public WfResource asResource(java.security.Principal principal)
                      throws java.rmi.RemoteException,
                             InvalidKeyException
principal, return the
 workflow resource associated with this principal.
 As the workflow core does not have a defined access to a
 resource management facility, this mapping functionality must
 be brought to the workflow core by the resource assignment
 service. If the resource assignment service is based on a
 resource management service as defined in package de.danet.an.workflow.spis.rmsResourceManagementService.asResourceUnsupportedOperationException
principal - the principal.
WfResource object corresponding to the
 given principal.
InvalidKeyException - if the resource with the given key
 can't be found.
java.rmi.RemoteException - if a system-level error occurs.
public WfResource resourceByKey(java.lang.String key)
                         throws InvalidKeyException,
                                java.rmi.RemoteException
key of a WfResource
 (obtained with resourceKey()
 For the workflow core, the resource assignment interface is the
 only source of WfResource objects. While resourceKey()WfResource
 objects.
 As the workflow core does not have a defined access to a
 resource management facility, this reverse mapping
 functionality must be brought to the workflow core by the
 resource assignment service. (Which is quite reasonable, as it
 has delivered the WfResource objects in the first
 place.) If the resource assignment service is based on a
 resource management service as defined in package de.danet.an.workflow.spis.rmsResourceManagementService.resourceByKeyUnsupportedOperationException
key - the key.
WfResource object corresponding to the
 given key.
InvalidKeyException - if the resource with the given
 key can't be found. As the environment is a concurrent multi
 user environment, WfResource objects (and keys obtained
 from WfResource objects) may become invalid.
java.rmi.RemoteException - if a system-level error occurs.
public java.util.Collection knownResources()
                                    throws java.rmi.RemoteException
 If the resource assignment service is based on a resource
 management service as defined in package de.danet.an.workflow.spis.rmsResourceManagementService.listResourcesUnsupportedOperationException
WfResourcejava.rmi.RemoteException - if a system-level error occurs.
public java.util.Collection authorizers(WfResource resource)
                                 throws java.rmi.RemoteException
WfResource objectThe resource assignment service usually uses its underlying resource management facility to implement this method, returning all groups the resource is a member of and all roles assigned to the resource. Resource assigments facilities may, however, modify this information e.g. according to configured delegation rules.
 If the resource assignment service is based on a resource
 management service as defined in package de.danet.an.workflow.spis.rmsResourceManagementService.authorizersUnsupportedOperationException
resource - the resource.
WfResource objects, not
 including resource
java.rmi.RemoteException - if a system-level error occurs.
public java.util.Collection autoAssignResources(ActivityFinder finder,
                                                java.lang.String actId,
                                                WfActivity activity,
                                                java.security.Principal principal,
                                                Participant participant)
                                         throws java.rmi.RemoteException
Usually, criteria for the resource selection must be determined within the resource assignment, e.g. based on the name of the activity, the process it belongs to etc. In some cases, however, the worflow component may have some resource selection information available. The workflow component may have obtained such information e.g. as part of the process description. If such information is available, it may optionally be passed to the automatic assignment. The type and valid values of such information depends totally on the resource assignment service used and remains undefined in the scope of this interface.
actId - a unique (with respect to an ActivityFinder)
 identifier for the Activity. The length of actId is 
 guaranteed not to exceed 64.finder - the finder used to lookup activities by 
 their finderIds.activity - the activity that is about to become ready.principal - the creator of the process, may be
 null.participant - the Participant that describes 
 resource selection criteria.
 The paramter may be null
WfResourcejava.rmi.RemoteException - if a system-level error occurs.ActivityFinder
public void changeAssignment(ActivityFinder finder,
                             java.lang.String actId,
                             WfActivity activity,
                             WfResource oldResource,
                             WfResource newResource)
                      throws java.rmi.RemoteException,
                             InvalidResourceException,
                             AlreadyAssignedException,
                             NotAssignedException
Activity.changeAssignmentWfAssignment.setAssignee.
finder - the finder used to lookup activities by 
 their finderIdsactId - a unique (with respect to an ActivityFinder)
 identifier for the Activity. The length of actId is 
 guaranteed not to exceed 64activity - the activity being enactedoldResource - the resource that has its assignment removednewResource - the resource to be assigned
java.rmi.RemoteException - if a system-level error occurs
InvalidResourceException - if the resource is invalid.
 As the environment is a concurrent multi user environment, 
 WfResource objects may become invalid
AlreadyAssignedException - if the assignment already
 exists
NotAssignedException - if there is no assignment to the
 old resourceActivityFinder
public void removeAssignment(ActivityFinder finder,
                             java.lang.String actId,
                             WfActivity activity,
                             WfResource resource)
                      throws java.rmi.RemoteException,
                             InvalidResourceException,
                             NotAssignedException
Activity.removeAssignmentWfResource.release.
finder - the finder used to lookup activities by 
 their finderIdsactId - a unique (with respect to an ActivityFinder)
 identifier for the Activity. The length of actId is 
 guaranteed not to exceed 64.activity - the activity that is about to become readyresource - the resource to be assigned
java.rmi.RemoteException - if a system-level error occurs
InvalidResourceException - if the resource is invalid.
 As the environment is a concurrent multi user environment, 
 WfResource objects may become invalid.
NotAssignedException - if the resource is not assigned to
 the given activityActivityFinder
public java.util.Collection assignments(ActivityFinder finder,
                                        java.lang.String actId,
                                        WfActivity activity)
                                 throws java.rmi.RemoteException
actId - a unique (with respect to an ActivityFinder)
 identifier for the Activity. The length of actId is 
 guaranteed not to exceed 64.finder - the finder used to lookup activities by 
 their finderIds.activity - the activity.
WfAssignmentjava.rmi.RemoteException - if a system-level error occurs.
public java.util.Collection workItems(WfResource resource)
                               throws java.rmi.RemoteException,
                                      NoSuchResourceException
resource - the resource.
WfAssignmentjava.rmi.RemoteException - if a system-level error occurs.
NoSuchResourceException - if the resource is invalid.
 As the environment is a concurrent multi user environment, 
 WfResource objects may become invalid.
public boolean isMemberOfWorkItems(WfResource resource,
                                   WfAssignment assignment)
                            throws java.rmi.RemoteException,
                                   NoSuchResourceException
resource - the resource.assignment - the assignment in question.
true if the assignment belongs to 
 the work items of the resource.
java.rmi.RemoteException - if a system-level error occurs.
NoSuchResourceException - if the resource is invalid.
 As the environment is a concurrent multi user environment, 
 WfResource objects may become invalid.
public WfResource getResource(WfAssignment asnmnt)
                       throws java.rmi.RemoteException
asnmnt - the assignment
java.rmi.RemoteException - if a system-level error occurs.| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||