Interface IProcessEngineBehavior

All Known Subinterfaces:
IProcessEngine
All Known Implementing Classes:
ProcessEngine, ProcessEngineDelegate, ReadonlyProcessEngine

public interface IProcessEngineBehavior
  • Method Details

    • closeCase

      void closeCase(IUserData userData, long caseId)
      This method may be used to close an existing case and cancel all its tasks.
      Parameters:
      userData - Object containing information about the current user.
      caseId - The ID of the case that should be closed.
      Throws:
      CloseProcessCaseException - This exception is thrown when the case could not be closed.
    • notifyEvent

      void notifyEvent(IMessageEvent messageEvent, IUserData user, IProcessCaseChangeListener listener)
      This method notifies the process engine about an event.
      Parameters:
      messageEvent - The message event, may not be null.
      user - The user, may not be null.
      listener - A listener to trace the modified cases, may be null.
      Throws:
      InvalidMessageEventException - This exception is thrown in case of an invalid message event.
      AppException - This exception is thrown when the event could not be processed.
    • notifyEvent

      void notifyEvent(IMessageEvent messageEvent, IUserData user, IProcessCaseChangeListener listener, Set<Long> specificCaseIds)
      This method notifies the process engine about an event.
      Parameters:
      messageEvent - The message event, may not be null.
      user - The user, may not be null.
      listener - A listener to trace the modified cases, may be null.
      specificCaseIds - A set of case ids, may be null. If not null, only those cases are processed.
      Throws:
      InvalidMessageEventException - This exception is thrown in case of an invalid message event.
      AppException - This exception is thrown when the event could not be processed.
    • evaluateTimer

      void evaluateTimer(DateTimeValue currentTime)
      This method (re)evaluates all open timer tasks.
      Parameters:
      currentTime - The current time.
    • reopenTask

      void reopenTask(long taskId)
      Reopens a task which is stuck in the started state. The case of the task is also opened if it is locked.
      Parameters:
      taskId - the id of the task to be re-opened
      Throws:
      UnknownProcessCaseException - if the task is linked to an unknown case
      UnknownProcessTaskException - if a task with the given id is not found
      OpenProcessTaskException - if a node with the given id is found but it is not task, or its status is not started
      ProcessException - if any other error is encountered while reopening the task
    • reopenTask

      void reopenTask(long taskId, IUserData userData)
      Reopens a task which is stuck in the started state. The case of the task is also opened if it is locked.
      Parameters:
      taskId - the id of the task to be re-opened
      userData - the data of the current user
      Throws:
      UnknownProcessCaseException - if the task is linked to an unknown case
      UnknownProcessTaskException - if a task with the given id is not found
      OpenProcessTaskException - if a node with the given id is found but it is not task, or its status is not started
      ProcessException - if any other error is encountered while reopening the task
    • replayMessageEvent

      long replayMessageEvent(long eventId, Long caseId)
      Replays (re-triggers) a message event.
      Parameters:
      eventId - the id of the original message event which should be replayed
      caseId - the optional ID of the case in which the message event will be replayed (if null, the message event will be broadcast to all waiting cases)
      Returns:
      the id of the newly created event
      Throws:
      UnknownCaseEventException - if the message event with the given id could not be found
      UnknownProcessCaseException - if the process case in which the event should be replayed could not be found
      ReplayCaseEventException - if an error occurs during replay
    • replayMessageEvent

      long replayMessageEvent(long eventId, Long caseId, IUserData userData)
      Replays (re-triggers) a message event.
      Parameters:
      eventId - the id of the original message event which should be replayed
      caseId - the optional ID of the case in which the message event will be replayed (if null, the message event will be broadcast to all waiting cases)
      userData - the data of the current user
      Returns:
      the id of the newly created event
      Throws:
      UnknownCaseEventException - if the message event with the given id could not be found
      UnknownProcessCaseException - if the process case in which the event should be replayed could not be found
      ReplayCaseEventException - if an error occurs during replay
    • replayTimerEvent

      long replayTimerEvent(long eventId)
      Replays (re-triggers) a timer event.
      Parameters:
      eventId - the id of the original timer event which should be replayed
      Returns:
      the id of the newly created event
      Throws:
      UnknownCaseEventException - if the timer event with the given id could not be found
      ReplayCaseEventException - if an error occurs during replay
      UnknownProcessCaseException - if the process case in which the event should be replayed could not be found
    • replayTimerEvent

      long replayTimerEvent(long eventId, IUserData userData)
      Replays (re-triggers) a timer event.
      Parameters:
      eventId - the id of the original timer event which should be replayed
      userData - the data of the current user
      Returns:
      the id of the newly created event
      Throws:
      UnknownCaseEventException - if the timer event with the given id could not be found
      ReplayCaseEventException - if an error occurs during replay
      UnknownProcessCaseException - if the process case in which the event should be replayed could not be found
    • cancelStartedTasks

      void cancelStartedTasks()
      This method may be used to cancel started tasks that were abandoned, for example due to an unexpected server shutdown
      Since:
      9.2