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 Details

    • changeStateEvent

      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

      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

      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

      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

      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

      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

      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

      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:
      • 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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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
    • doReteamProcess

      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

      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
    • 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

      WfNode resetReachableNodes(WfLink 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:
      WfLink
      Throws:
      WTException