Package wt.workflow.engine
Interface WfEngineServiceSvr
- All Known Implementing Classes:
StandardWfEngineService
public interface WfEngineServiceSvr
The
Supported API: true
Extendable: false
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
Modifier and TypeMethodDescriptionvoidaddEventListener(WfSynchRobot robot) Creates and adds a new event listener for the event key passed as argument.voidchangeAssignmentEvent(WfAssignedActivity obj, WTPrincipal new_assignee, WTPrincipal old_assignee, Role role) Used to notify the service that an activity assignment changed.voidchangeDataEvent(WfExecutionObject obj, ProcessData old_data) Method called in order to emit a change of data event.voidchangeResultEvent(WfExecutionObject obj, ProcessData old_data) This method is used to communicate that the result of an execution process (mostly activity) was set.voidchangeStateEvent(WfExecutionObject obj, WfState old_state, Vector events) Method called in order to emit a change of state event.voidUsed to notify the service that a process was created.createPropagationQueue(WfProcess process) Creates a queue to hold internal work (propagation, state changes) associated with the process passed as argument.createUserWorkQueue(WfProcess process) Creates a queue to hold user work (robot work) associated with the process passed as argument.voiddeleteDedicatedQueues(WfProcess process) Deletes dedicated queues associated with the process passed as argument if there are no other process using the queues.voiddoReteamProcess(TeamReference teamRef) Method called by lifecycle to cause the WfProcess to add it's roles to the Team.voiddoRobotWork(WfRobotActivity robot) Method called by robot activities to do the work associated with a robot activity.voidemitCustomEvent(String event_type, Hashtable value_map) Creates and emits a custom event.voidemitCustomObjectEvent(String event_type, Object target, Hashtable value_map) Creates and emits a custom event.voidexecutionErrorEvent(WfExecutionObject obj, Exception exception) Used to notify the service that an exception occurred.getAssociatedProcesses(TeamReference team, WfState state) Deprecated.getPersistentNode(WfNode trans_node) Returns the persistent node that corresponds to a transient node, constructed for propagation purposes.getPredecessors(WfNode node) Returns all predecessor nodes to a node passed as argument.getSuccessors(WfNode node) Instantiates the successors of a given workflow node.voidqueueCompleteTransition(WfActivity activity, Vector events) Queues a request to complete an activity with a set of user defined events.voidQueues the checking the execution object's deadline.voidqueueRestoreState(WfActivity activity, boolean new_thread) Queues the restoration of the state of objects associated with activity passed as argument.voidqueueStateChange(WfExecutionObject obj, WfTransition transition, boolean new_thread, boolean propagate) Queues the state change.voidqueueSynchCheck(WfSynchRobot robot) Queues the a synchronization checking request.voidqueueTimeEvent(WfExecutionObject obj, Timestamp time, WfTransition transition) Queues a request to effect a state change at a given time to a a given execution object.voidQueues the checking the execution object's time past deadline.voidQueues the checking the execution object's time to deadline.voidremoveEventListener(WfSynchRobot robot) Removes an event listener for the event key passed as argument that is also associated to the robot.resetReachableNodes(WfLink start_node) Resets all nodes that can be reached from node passed as argument.resetReachableNodes(WfNode start_node) Resets all nodes that can be reached from node passed as argument.voidsendEventToSuccessors(ObjectReference node_ref, Object event, boolean is_immediate) Propagate event to successors of the given node.setPrimaryBusinessObject(WfProcess process, WTObject object) Sets the primary business object to the object passed as argument.setPrimaryBusinessObject(WfProcess process, WTObject object, boolean persist) Sets the primary business object to the object passed as an argument.
-
Method Details
-
changeStateEvent
Method called in order to emit a change of state event.
Supported API: true- Parameters:
obj-old_state-events-- Throws:
WTException
-
changeDataEvent
Method called in order to emit a change of data event.
Supported API: true- Parameters:
obj-old_data-- Throws:
WTException
-
getSuccessors
Instantiates the successors of a given workflow node. Returns a enumeration of instantiated links.
Supported API: true- Parameters:
node-- Returns:
- Enumeration
- Throws:
WTException
-
getPredecessors
Returns all predecessor nodes to a node passed as argument.
Supported API: true- Parameters:
node-- Returns:
- Enumeration
- Throws:
WTException
-
sendEventToSuccessors
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
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
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
Used to notify the service that an exception occurred. Manages event associated with the creation of a new process. This entails the following:- recording an event audit
- emitting a corresponding keyed event
- sending notification to process creator that an exception occurred
- aborting object
- aborting hsot process in case the object is nested
Supported API: true- Parameters:
obj-exception-
-
changeResultEvent
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
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
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
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
-
queueTimeEvent
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
Queues the checking the execution object's deadline. The execution object is specified as parameter.
Supported API: true- Parameters:
obj-- Throws:
WTException
-
queueTimeToDeadlineCheck
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
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
Queues a request to complete an activity with a set of user defined events.
Supported API: true- Parameters:
activity-events-- Throws:
WTException
-
queueRestoreState
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
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
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
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
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
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
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
Sets the primary business object to the object passed as argument.
Supported API: true- Parameters:
process-object-- Returns:
- WfProcess
- Throws:
WTException
-
setPrimaryBusinessObject
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
-
deleteDedicatedQueues
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
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
-
doReteamProcess
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
Deprecated.use method that takesWTContainerRefas 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
-
emitCustomObjectEvent
void emitCustomObjectEvent(String event_type, Object target, Hashtable value_map) throws WTException Creates and emits a custom event. This method can be used to emit object based event. The type of the event passed as argument must be defined otherwise an exception is thrown.
Supported API: true- Parameters:
event_type-target-value_map-- Throws:
WTException
-
resetReachableNodes
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:
- WfLink
- Throws:
WTException
-
WTContainerRefas argument.