com.ebasetech.ufs.workflow.resource
Interface Assignable


public interface Assignable

Interface implemented by all assignable task enactments. One of its assignment methods will be called by the AssignmentHandler implementation to create an assignment.

Every class that implements this interface is the enactment-time alter-ego of a process node that implements the interface AssignableDefineable. Such a class is one that supports the notions of an assignment mode and an assignment expression, as interpreted by the AssignmentHandler.

See Also:
AssignableDefinable, AssignmentHandler

Method Summary
 void acceptActorId(java.lang.String actorId, java.lang.String reason, java.lang.String caller)
          Set the actor id to be used by the receiver but do this without checking with the assignment handler that this is acceptable.
 java.lang.String getActorId()
          Retrieve the actorId set for the receiver, or null if it has not yet been assigned
 java.lang.String getAssignableName(com.ebasetech.ufs.kernel.IUFSServletContextProxy proxy)
          Returns the name of the assignable object
 java.lang.String getAssignmentExpression()
          Returns the assignment expression
 int getAssignmentMode()
          Answer the mode of assignment set for this assignable
 java.util.Collection getPooledActorIds()
          Retrieve the pooled actors for the receiver, or null if no pooled actors exist
 void setActorId(java.lang.String actorId, boolean forceAcceptance, java.lang.String reason, java.lang.String caller)
          Set the individual actor that is responsible for executing the task.
 void setDynamicProxy(com.ebasetech.ufs.kernel.IUFSServletContextProxy proxy)
          Set the proxy to be used, if necessary, to answer other components of this interface
 void setPooledActors(java.util.List pooledActors, java.lang.String reason, java.lang.String caller)
          Set the list of pooled candidate actors that can take the task.
 boolean supportsActorPools()
          Answers true if the assignable in question supports actor pools for assignment
 void unsetActorId(java.lang.String reason, java.lang.String caller, com.ebasetech.ufs.kernel.IUFSServletContextProxy proxy)
          Unsets the individual actor that is responsible for executing the task.
 

Method Detail

setDynamicProxy

void setDynamicProxy(com.ebasetech.ufs.kernel.IUFSServletContextProxy proxy)
Set the proxy to be used, if necessary, to answer other components of this interface


setActorId

void setActorId(java.lang.String actorId,
                boolean forceAcceptance,
                java.lang.String reason,
                java.lang.String caller)
                throws com.ebasetech.ufs.utility.ConcurrentUpdateException,
                       com.ebasetech.ufs.utility.PersistenceException,
                       com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException,
                       InvalidAssignmentException,
                       com.ebasetech.ufs.kernel.SetupPropertiesException,
                       ResourceManagementException,
                       java.sql.SQLException,
                       com.ebasetech.ufs.workflow.server.enactment.ProcessAttributeException,
                       com.ebasetech.ufs.workflow.server.enactment.ProcessStructureException
Set the individual actor that is responsible for executing the task. If the receiver has some actor pools defined, then it checks to make sure that the actor defined is in one of the defined pools. If no such pools are defined then the assignment is successful. The forceAcceptance parameter is passed on to the assignment handler and tell is that the supplied actor is regarded as acceptable even if it fails to pass the normal assignment handler checks for compliance with the assignment expression. The handler is allowed to reject the assignment though, on the basis that the supplied name does not exist.

Throws:
com.ebasetech.ufs.utility.ConcurrentUpdateException - If some other thread has been in an modified the database record under our feet
com.ebasetech.ufs.utility.PersistenceException - If there is some error with the database access
InvalidAssignmentException - If the supplied actor is not in one ofthe already defined pools
com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException
com.ebasetech.ufs.kernel.SetupPropertiesException
ResourceManagementException
java.sql.SQLException
com.ebasetech.ufs.workflow.server.enactment.ProcessAttributeException
com.ebasetech.ufs.workflow.server.enactment.ProcessStructureException

acceptActorId

void acceptActorId(java.lang.String actorId,
                   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.InvalidStateTransitionException
Set the actor id to be used by the receiver but do this without checking with the assignment handler that this is acceptable. Implementations of this method are intended to be used uniquely by assignment handler implementations so as to avoid multiple calls to isAssignableToActor

Throws:
com.ebasetech.ufs.utility.PersistenceException
com.ebasetech.ufs.utility.ConcurrentUpdateException
com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException

unsetActorId

void unsetActorId(java.lang.String reason,
                  java.lang.String caller,
                  com.ebasetech.ufs.kernel.IUFSServletContextProxy proxy)
                  throws com.ebasetech.ufs.utility.ConcurrentUpdateException,
                         com.ebasetech.ufs.utility.PersistenceException,
                         com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException
Unsets the individual actor that is responsible for executing the task. That is, the assignable is unassigned and returns to the waiting state.

Throws:
com.ebasetech.ufs.utility.ConcurrentUpdateException - If some other thread has been in an modified the database record under our feet
com.ebasetech.ufs.utility.PersistenceException - If there is some error with the database access
com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException

getActorId

java.lang.String getActorId()
Retrieve the actorId set for the receiver, or null if it has not yet been assigned


supportsActorPools

boolean supportsActorPools()
                           throws java.sql.SQLException,
                                  com.ebasetech.ufs.utility.PersistenceException
Answers true if the assignable in question supports actor pools for assignment

Throws:
java.sql.SQLException
com.ebasetech.ufs.utility.PersistenceException

getPooledActorIds

java.util.Collection getPooledActorIds()
Retrieve the pooled actors for the receiver, or null if no pooled actors exist


setPooledActors

void setPooledActors(java.util.List pooledActors,
                     java.lang.String reason,
                     java.lang.String caller)
                     throws com.ebasetech.ufs.utility.ConcurrentUpdateException,
                            com.ebasetech.ufs.utility.PersistenceException,
                            PooledActorsNotSupportedException,
                            com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException
Set the list of pooled candidate actors that can take the task.

Parameters:
pooledActors - A list of strings representing the names of the pools/groups
reason - the reason passed into the API when the method that ultimately called this one was invoked
caller - the id of the caller of the external API method that ultimately called this one was invoked
Throws:
com.ebasetech.ufs.utility.ConcurrentUpdateException
com.ebasetech.ufs.utility.PersistenceException
PooledActorsNotSupportedException
com.ebasetech.ufs.workflow.server.enactment.InvalidStateTransitionException

getAssignmentExpression

java.lang.String getAssignmentExpression()
                                         throws com.ebasetech.ufs.utility.PersistenceException,
                                                java.sql.SQLException
Returns the assignment expression

Throws:
com.ebasetech.ufs.utility.PersistenceException
java.sql.SQLException

getAssignableName

java.lang.String getAssignableName(com.ebasetech.ufs.kernel.IUFSServletContextProxy proxy)
                                   throws com.ebasetech.ufs.utility.PersistenceException,
                                          java.sql.SQLException
Returns the name of the assignable object

Throws:
com.ebasetech.ufs.utility.PersistenceException
java.sql.SQLException

getAssignmentMode

int getAssignmentMode()
                      throws java.sql.SQLException,
                             com.ebasetech.ufs.utility.PersistenceException
Answer the mode of assignment set for this assignable

Throws:
java.sql.SQLException
com.ebasetech.ufs.utility.PersistenceException
See Also:
AssignmentMode