com.ebasetech.ufs.workflow.resource.example
Class AssignmentHandlerImpl

java.lang.Object
  extended by com.ebasetech.ufs.workflow.server.external.DefaultAssignmentHandler
      extended by com.ebasetech.ufs.workflow.resource.example.AssignmentHandlerImpl
All Implemented Interfaces:
com.ebasetech.api.workflow.Constants, AssignmentHandler

public class AssignmentHandlerImpl
extends DefaultAssignmentHandler

The simplest possible assignment handler


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
AssignmentHandlerImpl()
           
 
Method Summary
 AssignmentExpressionComponent getAssignmentExpressionComponentActorIdOnly()
          Implementations of this operation are called by the process designer to provide the GUI component to provide the assignment expression.
 AssignmentExpressionComponent getAssignmentExpressionComponentSupportsPools()
          Implementations of this operation are called by the process designer to provide the GUI component to provide the assignment expression.
 java.util.Collection getCandidateActors(Assignable assignable)
          Answer a collection of strings, each of which is a candidate actor assignment for the supplied assignable.
 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.
 boolean isAssignableToRole(Assignable assignable, java.lang.String roleName)
          Answer true if it is feasible that the an actor that is a member of the defined groups may be assigned to the supplied assignable.
 
Methods inherited from class com.ebasetech.ufs.workflow.server.external.DefaultAssignmentHandler
assign
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssignmentHandlerImpl

public AssignmentHandlerImpl()
Method Detail

getAssignmentExpressionComponentSupportsPools

public AssignmentExpressionComponent getAssignmentExpressionComponentSupportsPools()
Description copied from interface: AssignmentHandler
Implementations of this operation are called by the process designer to provide the GUI component to provide the assignment expression.

The component returned should allow the user to configure an assignment expression which may resolve to either a single resource or a resource pool.


getAssignmentExpressionComponentActorIdOnly

public AssignmentExpressionComponent getAssignmentExpressionComponentActorIdOnly()
Description copied from interface: AssignmentHandler
Implementations of this operation are called by the process designer to provide the GUI component to provide the assignment expression.

The component returned should ONLY allow the user to configure an assignment expression which resolves to a single resource (that is, an actorId).


isAssignableToActor

public boolean isAssignableToActor(Assignable assignable,
                                   java.lang.String actorId,
                                   boolean forced)
                            throws com.ebasetech.ufs.utility.PersistenceException,
                                   ResourceManagementException
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
Overrides:
isAssignableToActor in class DefaultAssignmentHandler
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:
com.ebasetech.ufs.utility.PersistenceException - is there is an issue with the underlying database system
ResourceManagementException - if there is some problem with the assignment requested

getCandidateActors

public java.util.Collection getCandidateActors(Assignable assignable)
                                        throws com.ebasetech.ufs.utility.PersistenceException,
                                               ResourceManagementException
Description copied from interface: AssignmentHandler
Answer a collection of strings, each of which is a candidate actor assignment for the supplied assignable.

Throws:
com.ebasetech.ufs.utility.PersistenceException - is there is an issue with the underlying database system
ResourceManagementException - if there is some problem with the assignment requested

isAssignableToRole

public boolean isAssignableToRole(Assignable assignable,
                                  java.lang.String roleName)
                           throws com.ebasetech.ufs.utility.PersistenceException,
                                  ResourceManagementException
Description copied from interface: AssignmentHandler
Answer true if it is feasible that the an actor that is a member of the defined groups may be assigned to the supplied assignable.

Throws:
com.ebasetech.ufs.utility.PersistenceException - is there is an issue with the underlying database system
ResourceManagementException - if there is some problem with the assignment requested