wt.workflow.engine
Interface WfEngineServiceSvr

All Known Implementing Classes:
StandardWfEngineService

public interface WfEngineServiceSvr

The WfEngineServiceSvr interface contains the server accessible API. Most of this API is devoted to capturing and emitting events; the rest is concerned with event propagation.

Supported API: true

Extendable: false


Method Summary
 void addEventListener(WfSynchRobot robot)
          Creates and adds a new event listener for the event key passed as argument.
 void changeAssignmentEvent(WfAssignedActivity obj, WTPrincipal new_assignee, WTPrincipal old_assignee, Role role)
          Used to notify the service that an activity assignment changed.
 void changeDataEvent(WfExecutionObject obj, ProcessData old_data)
          Method called in order to emit a change of data event.
 void changeDataEvent(WfExecutionObject obj, ProcessData old_data, Role role, String instructions)
          Method called in order to emit a change of data event in an activity.
 void changeResultEvent(WfExecutionObject obj, ProcessData old_data)
          This method is used to communicate that the result of an execution process (mostly activity) was set.
 void changeStateEvent(WfExecutionObject obj, WfState old_state, Vector events)
          Method called in order to emit a change of state event.
 void createProcessEvent(WfProcess obj)
          Used to notify the service that a process was created.
 ProcessingQueue createPropagationQueue(WfProcess process)
          Creates a queue to hold internal work (propagation, state changes) associated with the process passed as argument.
 ProcessingQueue createUserWorkQueue(WfProcess process)
          Creates a queue to hold user work (robot work) associated with the process passed as argument.
 void deleteDedicatedQueues(WfProcess process)
          Deletes dedicated queues associated with the process passed as argument if there are no other process using the queues.
 void doReteamProcess(TeamReference teamRef)
          Method called by lifecycle to cause the WfProcess to add it's roles to the Team.
 void doRobotWork(WfRobotActivity robot)
          Method called by robot activities to do the work associated with a robot activity.
 void emitCustomEvent(String event_type, Hashtable value_map)
          Creates and emits a custom event.
 void emitCustomEvent(String event_type, Object target, Hashtable value_map)
          Creates and emits a custom event.
 void emitPastDeadlineEvent(WfExecutionObject object)
          Emits event that a deadline has come and gone for the execution object passed as argument.
 void executionErrorEvent(WfExecutionObject obj, Exception exception)
          Used to notify the service that an exception occurred.
 Enumeration getAssociatedProcesses(TeamReference team, WfState state)
          Deprecated. use method that takes WTContainerRef as argument.
 QueryResult getAssociatedProcesses(TeamReference team, WfState state, WTContainerRef context_ref)
          

Supported API: false
 WfNode getPersistentNode(WfNode trans_node)
          Returns the persistent node that corresponds to a transient node, constructed for propagation purposes.
 Enumeration getPredecessors(WfNode node)
          Returns all predecessor nodes to a node passed as argument.
 Enumeration getSuccessors(WfNode node)
          Instantiates the successors of a given workflow node.
 void queueCompleteTransition(WfActivity activity, Vector events)
          Queues a request to complete an activity with a set of user defined events.
 void queueDeadlineCheck(WfExecutionObject obj)
          Queues the checking the execution object's deadline.
 void queueRestoreState(WfActivity activity, boolean new_thread)
          Queues the restoration of the state of objects associated with activity passed as argument.
 void queueStateChange(WfExecutionObject obj, WfTransition transition, boolean new_thread, boolean propagate)
          Queues the state change.
 void queueStateChange(WTCollection collection, WfTransition transition, boolean new_thread, boolean propagate)
          Queues the state change for a collection of execution objects.
 void queueSynchCheck(WfSynchRobot robot)
          Queues the a synchronization checking request.
 void queueTimeEvent(WfExecutionObject obj, Timestamp time, WfTransition transition)
          Queues a request to effect a state change at a given time to a a given execution object.
 void queueTimePastDeadlineCheck(WfExecutionObject obj)
          Queues the checking the execution object's time past deadline.
 void queueTimeToDeadlineCheck(WfExecutionObject obj)
          Queues the checking the execution object's time to deadline.
 void removeEventListener(WfSynchRobot robot)
          Removes an event listener for the event key passed as argument that is also associated to the robot.
 WfNode resetReachableNodes(WfNode start_node)
          Resets all nodes that can be reached from node passed as argument.
 void sendEventToSuccessors(ObjectReference node_ref, Object event, boolean is_immediate)
          Propagate event to successors of the given node.
 WfProcess setPrimaryBusinessObject(WfProcess process, WTObject object)
          Sets the primary business object to the object passed as argument.
 WfProcess setPrimaryBusinessObject(WfProcess process, WTObject object, boolean persist)
          Sets the primary business object to the object passed as an argument.
 

Method Detail

changeStateEvent

public void changeStateEvent(WfExecutionObject obj,
                             WfState old_state,
                             Vector events)
                      throws WTException
Method called in order to emit a change of state event.

Supported API: true

Parameters:
obj -
old_state -
events -
Throws:
WTException

changeDataEvent

public void changeDataEvent(WfExecutionObject obj,
                            ProcessData old_data)
                     throws WTException
Method called in order to emit a change of data event.

Supported API: true

Parameters:
obj -
old_data -
Throws:
WTException

getSuccessors

public Enumeration getSuccessors(WfNode node)
                          throws WTException
Instantiates the successors of a given workflow node. Returns a enumeration of instantiated links.

Supported API: true

Parameters:
node -
Returns:
Enumeration
Throws:
WTException

getPredecessors

public Enumeration getPredecessors(WfNode node)
                            throws WTException
Returns all predecessor nodes to a node passed as argument.

Supported API: true

Parameters:
node -
Returns:
Enumeration
Throws:
WTException

sendEventToSuccessors

public void sendEventToSuccessors(ObjectReference node_ref,
                                  Object event,
                                  boolean is_immediate)
                           throws WTException
Propagate event to successors of the given node. This is accomplished by either queueing the request or (in case queue is not used) by creating a new thread to instantiate the successor nodes and propagate the event to them. If, however, is_immediate is 'true', the event is propagated immediately, that is, without threading or queuing.

Supported API: true

Parameters:
node_ref -
event -
is_immediate -
Throws:
WTException

createProcessEvent

public void createProcessEvent(WfProcess obj)
                        throws WTException
Used to notify the service that a process was created. Manages event associated with the creation of a new process. This entails either recording an event audit and/or emitting a corresponding keyed event.

Supported API: true

Parameters:
obj -
Throws:
WTException

changeAssignmentEvent

public void changeAssignmentEvent(WfAssignedActivity obj,
                                  WTPrincipal new_assignee,
                                  WTPrincipal old_assignee,
                                  Role role)
                           throws WTException
Used to notify the service that an activity assignment changed. Manages event associated with the change of assignment for an assigned activity. This entails either recording an event audit and/or emitting a corresponding keyed event.

Supported API: true

Parameters:
obj -
new_assignee -
old_assignee -
role -
Throws:
WTException

executionErrorEvent

public void executionErrorEvent(WfExecutionObject obj,
                                Exception exception)
Used to notify the service that an exception occurred. Manages event associated with the creation of a new process. This entails the following:

Supported API: true

Parameters:
obj -
exception -

changeResultEvent

public void changeResultEvent(WfExecutionObject obj,
                              ProcessData old_data)
                       throws WTException
This method is used to communicate that the result of an execution process (mostly activity) was set.

Supported API: true

Parameters:
obj -
old_data -
Throws:
WTException

doRobotWork

public void doRobotWork(WfRobotActivity robot)
                 throws WTException
Method called by robot activities to do the work associated with a robot activity. This work is contained in the 'run' method of the object. The work is queued if USE_QUEUE is true or performed in a separate thread otherwise.

Supported API: true

Parameters:
robot -
Throws:
WTException

resetReachableNodes

public WfNode resetReachableNodes(WfNode start_node)
                           throws WTException
Resets all nodes that can be reached from node passed as argument. Returns an updated version of the start_node. Used in loops, called when a back loop link is traversed.

Supported API: true

Parameters:
start_node -
Returns:
WfNode
Throws:
WTException

queueStateChange

public void queueStateChange(WfExecutionObject obj,
                             WfTransition transition,
                             boolean new_thread,
                             boolean propagate)
                      throws WTException
Queues the state change. The execution object and transition are specified as parameters. This is used to delay the start of the execution of an object until the timeToStart arrives. If propagate is 'false' transition event is not propagated in case the execution object is an activity.

Supported API: true

Parameters:
obj -
transition -
new_thread -
propagate -
Throws:
WTException

queueStateChange

public void queueStateChange(WTCollection collection,
                             WfTransition transition,
                             boolean new_thread,
                             boolean propagate)
                      throws WTException
Queues the state change for a collection of execution objects. The collection and transition are specified as parameters. This is used to delay the start of the execution of an object until the timeToStart arrives. If propagate is 'false' transition event is not propagated in case the execution object is an activity.

Supported API: false

Parameters:
collection -
transition -
new_thread -
propagate -
Throws:
WTException

queueTimeEvent

public void queueTimeEvent(WfExecutionObject obj,
                           Timestamp time,
                           WfTransition transition)
                    throws WTException
Queues a request to effect a state change at a given time to a a given execution object.

Supported API: true

Parameters:
obj -
time -
transition -
Throws:
WTException

queueDeadlineCheck

public void queueDeadlineCheck(WfExecutionObject obj)
                        throws WTException
Queues the checking the execution object's deadline. The execution object is specified as parameter.

Supported API: true

Parameters:
obj -
Throws:
WTException

queueTimeToDeadlineCheck

public void queueTimeToDeadlineCheck(WfExecutionObject obj)
                              throws WTException
Queues the checking the execution object's time to deadline. The execution object is specified as parameter.

Supported API: true

Parameters:
obj -
Throws:
WTException

queueTimePastDeadlineCheck

public void queueTimePastDeadlineCheck(WfExecutionObject obj)
                                throws WTException
Queues the checking the execution object's time past deadline. The execution object is specified as parameter.

Supported API: true

Parameters:
obj -
Throws:
WTException

queueCompleteTransition

public void queueCompleteTransition(WfActivity activity,
                                    Vector events)
                             throws WTException
Queues a request to complete an activity with a set of user defined events.

Supported API: true

Parameters:
activity -
events -
Throws:
WTException

queueRestoreState

public void queueRestoreState(WfActivity activity,
                              boolean new_thread)
                       throws WTException
Queues the restoration of the state of objects associated with activity passed as argument. Used when a complete transition fails and associated objects are created and/or modified (for example, work items). The action is queued so that this method can be called in a finalize block when a transaction is being rolled back.

Supported API: true

Parameters:
activity -
new_thread -
Throws:
WTException

queueSynchCheck

public void queueSynchCheck(WfSynchRobot robot)
                     throws WTException
Queues the a synchronization checking request. The synchornization robot is specified as parameter. The synchronization expression is retrieved from the robot.

Supported API: true

Parameters:
robot -
Throws:
WTException

getPersistentNode

public WfNode getPersistentNode(WfNode trans_node)
                         throws WTException
Returns the persistent node that corresponds to a transient node, constructed for propagation purposes. It looks in the database if the node exists; otherwise it creates and stores the node. From the transient node it uses only the template and the container.

Supported API: true

Parameters:
trans_node -
Returns:
WfNode
Throws:
WTException

addEventListener

public void addEventListener(WfSynchRobot robot)
Creates and adds a new event listener for the event key passed as argument. The new listener is associated to the robot also passed as argument. It simply forwards the call to the manager service.

Supported API: true

Parameters:
robot -

removeEventListener

public void removeEventListener(WfSynchRobot robot)
Removes an event listener for the event key passed as argument that is also associated to the robot. It simply forwards the call to the manager service.

Supported API: true

Parameters:
robot -

createUserWorkQueue

public ProcessingQueue createUserWorkQueue(WfProcess process)
                                    throws WTException
Creates a queue to hold user work (robot work) associated with the process passed as argument.

Supported API: true

Parameters:
process -
Returns:
ProcessingQueue
Throws:
WTException

createPropagationQueue

public ProcessingQueue createPropagationQueue(WfProcess process)
                                       throws WTException
Creates a queue to hold internal work (propagation, state changes) associated with the process passed as argument.

Supported API: true

Parameters:
process -
Returns:
ProcessingQueue
Throws:
WTException

setPrimaryBusinessObject

public WfProcess setPrimaryBusinessObject(WfProcess process,
                                          WTObject object)
                                   throws WTException
Sets the primary business object to the object passed as argument.

Supported API: true

Parameters:
process -
object -
Returns:
WfProcess
Throws:
WTException

setPrimaryBusinessObject

public WfProcess setPrimaryBusinessObject(WfProcess process,
                                          WTObject object,
                                          boolean persist)
                                   throws WTException
Sets the primary business object to the object passed as an argument.

Supported API: true

Parameters:
process -
object -
persist -
Returns:
WfProcess
Throws:
WTException

emitPastDeadlineEvent

public void emitPastDeadlineEvent(WfExecutionObject object)
                           throws WTException
Emits event that a deadline has come and gone for the execution object passed as argument.

Supported API: false

Parameters:
object -
Throws:
WTException

deleteDedicatedQueues

public void deleteDedicatedQueues(WfProcess process)
                           throws WTException
Deletes dedicated queues associated with the process passed as argument if there are no other process using the queues.

Supported API: true

Parameters:
process -
Throws:
WTException

emitCustomEvent

public void emitCustomEvent(String event_type,
                            Hashtable value_map)
                     throws WTException
Creates and emits a custom event. The type of the event passed as argument must be defined otherwise an exception is thrown.

Supported API: true

Parameters:
event_type -
value_map -
Throws:
WTException

emitCustomEvent

public void emitCustomEvent(String event_type,
                            Object target,
                            Hashtable value_map)
                     throws WTException
Creates and emits a custom event. The type of the event passed as argument must be defined otherwise an exception is thrown.

Supported API: false

Parameters:
event_type -
target -
value_map -
Throws:
WTException

doReteamProcess

public void doReteamProcess(TeamReference teamRef)
                     throws WTException
Method called by lifecycle to cause the WfProcess to add it's roles to the Team. This is usually used when the Team is changed for a LifeCycleManaged Object (a ReTeam).

Supported API: true

Parameters:
teamRef -
Throws:
WTException

getAssociatedProcesses

public Enumeration getAssociatedProcesses(TeamReference team,
                                          WfState state)
                                   throws WTException
Deprecated. use method that takes WTContainerRef as argument.

Returns all process instances associated with the team ref.t passed as argument that are in a given state. If state is null, all process instances are returned, irrespective of the state.

Supported API: true

Parameters:
team -
state -
Returns:
Enumeration
Throws:
WTException

getAssociatedProcesses

public QueryResult getAssociatedProcesses(TeamReference team,
                                          WfState state,
                                          WTContainerRef context_ref)
                                   throws WTException


Supported API: false

Parameters:
team -
state -
context_ref -
Returns:
QueryResult
Throws:
WTException

changeDataEvent

public void changeDataEvent(WfExecutionObject obj,
                            ProcessData old_data,
                            Role role,
                            String instructions)
                     throws WTException
Method called in order to emit a change of data event in an activity.

Supported API: false

Parameters:
obj -
old_data -
role -
instructions -
Throws:
WTException