org.enhydra.shark.assignment
Class HistoryRelatedAssignmentManager

java.lang.Object
  extended byorg.enhydra.shark.assignment.HistoryRelatedAssignmentManager
All Implemented Interfaces:
AssignmentManager

public class HistoryRelatedAssignmentManager
extends java.lang.Object
implements AssignmentManager

This class provides an extended Assignment Manager implementation via the use of XPDL activity extended attributes. The following extended attributes can be associated with an activity to affect assignments: ReassignToOriginalPerformer - If an activity is executed more than once in a particular process, then it will only be assigned to the original performer during subsequent executions. The value of this extended attribute is ignored. AssignToPerformerOfActivity - This extended attribute can be used to force an activity to be assigned to the performer of a previously-executed activity. The value of this extended attribute should be the activity definition id in question. DoNotAssignToPerformerOfActivity - This extended attribute can be used to force an activity NOT to be assigned to the performer of a previously- executed activity. The value of this extended attribute should be the activity definition id in question. Note that only one of each extended attribute should be associated with any single activity definition. Note that the above names are just the default names of these extended attributes, and that they can be overriden in the configuration file (Shark.conf) using the following properties: - HistoryRelatedAssignmentManager.extAttrReassignToOriginalPerformer - HistoryRelatedAssignmentManager.extAttrAssignToPerformerOfActivity - HistoryRelatedAssignmentManager.extAttrDoNotAssignToPerformerOfActivity Finally, note that this class needs to make a connection to the workflow engine. If anybody wishes to extend/modify this class in any way, one obvious improvment would be to allow multiple copies of each extended attribute to be assigned to a single activity.

Author:
Rich Robinson

Field Summary
static java.lang.String PARTICIPANT_MAPPING_CLASS_NAME_PROPERTY
           
static java.lang.String USER_GROUP_CLASS_NAME_PROPERTY
           
 
Constructor Summary
HistoryRelatedAssignmentManager()
           
 
Method Summary
 void configure(CallbackUtilities cus)
           
protected  java.util.List doAssignToPerformerOfActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String processRequesterId, PerformerData xpdlParticipant, java.util.List xpdlResponsibleParticipants, java.lang.String[][] actExtAttribs)
           
protected  java.util.List doDoNotAssignToPerformerOfActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String processRequesterId, PerformerData xpdlParticipant, java.util.List xpdlResponsibleParticipants, java.lang.String[][] actExtAttribs)
           
protected  java.util.List doReassignToOriginalPerformer(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String processRequesterId, PerformerData xpdlParticipant, java.util.List xpdlResponsibleParticipants, java.lang.String actDefId)
           
protected  java.util.Set findResources(WMSessionHandle shandle, PerformerData p)
          Return a resource Ids for the specified participant.
 java.util.List getAssignments(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String processRequesterId, PerformerData xpdlParticipant, java.util.List xpdlResponsibleParticipants)
           
protected  java.util.List getAssignmentsForActDefId(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String processRequesterId, PerformerData xpdlParticipant, java.util.List xpdlResponsibleParticipants, java.lang.String actDefId, boolean fallbackToDefault)
           
 java.util.List getDefaultAssignments(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String processRequesterId, PerformerData xpdlParticipant, java.util.List xpdlResponsibleParticipants)
           
 ParticipantMappingManager getParticipantMapPersistenceManager()
           
protected  java.lang.String getPrevPerformerOfActDefId(WMSessionHandle shandle, java.lang.String procId, java.lang.String actDefId)
           
 UserGroupManager getUserGroupManager()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_GROUP_CLASS_NAME_PROPERTY

public static final java.lang.String USER_GROUP_CLASS_NAME_PROPERTY
See Also:
Constant Field Values

PARTICIPANT_MAPPING_CLASS_NAME_PROPERTY

public static final java.lang.String PARTICIPANT_MAPPING_CLASS_NAME_PROPERTY
See Also:
Constant Field Values
Constructor Detail

HistoryRelatedAssignmentManager

public HistoryRelatedAssignmentManager()
Method Detail

configure

public void configure(CallbackUtilities cus)
               throws java.lang.Exception
Specified by:
configure in interface AssignmentManager
Throws:
java.lang.Exception

getAssignments

public java.util.List getAssignments(WMSessionHandle shandle,
                                     java.lang.String procId,
                                     java.lang.String actId,
                                     java.lang.String processRequesterId,
                                     PerformerData xpdlParticipant,
                                     java.util.List xpdlResponsibleParticipants)
                              throws java.lang.Exception
Specified by:
getAssignments in interface AssignmentManager
Throws:
java.lang.Exception

doReassignToOriginalPerformer

protected java.util.List doReassignToOriginalPerformer(WMSessionHandle shandle,
                                                       java.lang.String procId,
                                                       java.lang.String actId,
                                                       java.lang.String processRequesterId,
                                                       PerformerData xpdlParticipant,
                                                       java.util.List xpdlResponsibleParticipants,
                                                       java.lang.String actDefId)
                                                throws java.lang.Exception
Throws:
java.lang.Exception

doAssignToPerformerOfActivity

protected java.util.List doAssignToPerformerOfActivity(WMSessionHandle shandle,
                                                       java.lang.String procId,
                                                       java.lang.String actId,
                                                       java.lang.String processRequesterId,
                                                       PerformerData xpdlParticipant,
                                                       java.util.List xpdlResponsibleParticipants,
                                                       java.lang.String[][] actExtAttribs)
                                                throws java.lang.Exception
Throws:
java.lang.Exception

doDoNotAssignToPerformerOfActivity

protected java.util.List doDoNotAssignToPerformerOfActivity(WMSessionHandle shandle,
                                                            java.lang.String procId,
                                                            java.lang.String actId,
                                                            java.lang.String processRequesterId,
                                                            PerformerData xpdlParticipant,
                                                            java.util.List xpdlResponsibleParticipants,
                                                            java.lang.String[][] actExtAttribs)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

getAssignmentsForActDefId

protected java.util.List getAssignmentsForActDefId(WMSessionHandle shandle,
                                                   java.lang.String procId,
                                                   java.lang.String actId,
                                                   java.lang.String processRequesterId,
                                                   PerformerData xpdlParticipant,
                                                   java.util.List xpdlResponsibleParticipants,
                                                   java.lang.String actDefId,
                                                   boolean fallbackToDefault)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

getPrevPerformerOfActDefId

protected java.lang.String getPrevPerformerOfActDefId(WMSessionHandle shandle,
                                                      java.lang.String procId,
                                                      java.lang.String actDefId)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultAssignments

public java.util.List getDefaultAssignments(WMSessionHandle shandle,
                                            java.lang.String procId,
                                            java.lang.String actId,
                                            java.lang.String processRequesterId,
                                            PerformerData xpdlParticipant,
                                            java.util.List xpdlResponsibleParticipants)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getParticipantMapPersistenceManager

public ParticipantMappingManager getParticipantMapPersistenceManager()
Specified by:
getParticipantMapPersistenceManager in interface AssignmentManager

getUserGroupManager

public UserGroupManager getUserGroupManager()
Specified by:
getUserGroupManager in interface AssignmentManager

findResources

protected java.util.Set findResources(WMSessionHandle shandle,
                                      PerformerData p)
                               throws java.lang.Exception
Return a resource Ids for the specified participant.

Returns:
A set of resource mapping for given participant.
Throws:
java.lang.Exception