com.ebasetech.ufs.workflow.server.external
Class DefaultAssignmentHandler

java.lang.Object
  extended by com.ebasetech.ufs.workflow.server.external.DefaultAssignmentHandler
All Implemented Interfaces:
com.ebasetech.api.workflow.Constants, AssignmentHandler
Direct Known Subclasses:
AssignmentHandlerImpl, EbaseAssignmentHandler, EbaseDynamicAssignmentHandler, LdapAssignmentHandler

public abstract class DefaultAssignmentHandler
extends java.lang.Object
implements AssignmentHandler, com.ebasetech.api.workflow.Constants

Default implementation of the assignment handler, which is here to do the "standard" bits of the defined functionality of the AssignmentHandler such as handling assignments to "follow-on task" and so on


Field Summary
 
Fields inherited from interface com.ebasetech.api.workflow.Constants
ASSIGNMENT_ERROR, BAD_PARAMETER_VALUE_TYPE, CANNOT_LOAD_OBJECT, COLON, DOWNCAST_ERROR, EMBEDDED_SQL_EXCEPTION, ENACTMENT_INITIALISATION_EXCEPTION, ENACTMENT_NOT_ACTIVE, FAILED_SETTING_OUT_PARAM, ILLFORMED_PARAMETERS, INVALID_ASSIGNMENT, INVALID_ASSIGNMENT_EXCEPTION, INVALID_COMPLETION, INVALID_POST_EXCEPTION, INVALID_STATE_TRANSITION, INVALID_STATE_TRANSITION_EXCEPTION, MISSING_CALLER, NO_ROLLBACK, NO_SUCH_TASK, NULL_RESOURCE, NULL_TASK_NAME, NULL_VARIABLE_NAME, POOL_ASSIGNMENT_FAILED, PROCESS_ATTRIBUTE_EXCEPTION, PROCESS_STRUCTURE_EXCEPTION, RESOURCE_MANAGEMENT_EXCEPTION, SCRIPT_EXCEPTION_ERROR, SECURITY_EXCEPTION, SETUP_PROPERTIES_EXCEPTION, TRANSACTION_EXCEPTION, UNINITIALISED
 
Constructor Summary
DefaultAssignmentHandler()
           
 
Method Summary
 boolean assign(Assignable assignable, Context context, java.lang.String reason, java.lang.String caller)
          The default assignment behaviour provided by this method is to handle the standard sorts of assignment and leave any trickyness to overriding methods which can just interpret the assignment expression however they like.
 boolean isAssignableToActor(Assignable assignable, java.lang.String actorId, boolean forced)
          Answer true if it is feasible that the given actor may be assigned to the assignable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ebasetech.ufs.workflow.resource.AssignmentHandler
getAssignmentExpressionComponentActorIdOnly, getAssignmentExpressionComponentSupportsPools, getCandidateActors, isAssignableToRole
 

Constructor Detail

DefaultAssignmentHandler

public DefaultAssignmentHandler()
Method Detail

assign

public boolean assign(Assignable assignable,
                      Context context,
                      java.lang.String reason,
                      java.lang.String caller)
               throws com.ebasetech.ufs.utility.PersistenceException,
                      com.ebasetech.ufs.utility.ConcurrentUpdateException,
                      com.ebasetech.ufs.workflow.server.enactment.ProcessAttributeException,
                      InvalidAssignmentException,
                      com.ebasetech.ufs.kernel.SetupPropertiesException,
                      com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException,
                      ResourceManagementException,
                      com.ebasetech.ufs.workflow.server.enactment.ProcessStructureException
The default assignment behaviour provided by this method is to handle the standard sorts of assignment and leave any trickyness to overriding methods which can just interpret the assignment expression however they like. In fact, they don't even need to call this method.

Specified by:
assign in interface AssignmentHandler
Parameters:
assignable - The assignable object that is being assigned.
context - The context object that represents the Job context of the assignable object.
reason - The string reason for this operation, passed into the external API when the method that ultimately caused this operation to be invoked was called.
caller - The string id of the caller of the external API method that invoked the implementation of this operation
Returns:
true if the assignment was completed
Throws:
com.ebasetech.ufs.utility.PersistenceException - If there is some issue with the underlying persistence mechanism
com.ebasetech.ufs.utility.ConcurrentUpdateException - If another thread in another processor in a cluster attempts to simultaneously modify the database
com.ebasetech.ufs.workflow.server.enactment.ProcessAttributeException - If this method attempts to incorrectly access some attribute of the Context
InvalidAssignmentException - If this method assigns the Assignable in some incorrect manner
com.ebasetech.ufs.kernel.SetupPropertiesException
com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException - If this method causes some invalid state transition to be attempted for the Assignable object
ResourceManagementException - If some other error occurs with management of resources
com.ebasetech.ufs.workflow.server.enactment.ProcessStructureException - if the assignment exposes some fault in the structure of the enacted process
See Also:
Assignable.setActorId(String, boolean, String, String), Assignable.setPooledActors(java.util.List, String, String), Assignable.supportsActorPools(), EscalatorEnactment, Context

isAssignableToActor

public boolean isAssignableToActor(Assignable assignable,
                                   java.lang.String actorId,
                                   boolean forced)
                            throws ResourceManagementException,
                                   com.ebasetech.ufs.utility.PersistenceException
Description copied from interface: AssignmentHandler
Answer true if it is feasible that the given actor may be assigned to the assignable.

Specified by:
isAssignableToActor in interface AssignmentHandler
forced - true if the supplied actor is being provided and the user is _insisting_ that it be used. Typically, the assignment handler will check that the given person exists (eg in the HR system) but will avoid checking that he/she is specically allowed by the assignment expression and assignment mode
Returns:
true if the assignment is acceptable, false otherwise.
Throws:
ResourceManagementException - if there is some problem with the assignment requested
com.ebasetech.ufs.utility.PersistenceException - is there is an issue with the underlying database system