Interface ActionTrackingService

All Known Implementing Classes:
ActionTrackingServiceImpl

public interface ActionTrackingService
Service interface for tracking when actions begin to run, complete or fail.
Author:
Nick Burch
  • Method Details

    • recordActionPending

      void recordActionPending(Action action)
      Record that an action has been scheduled for asynchronous execution, and is pending being executed.
      Parameters:
      action - the action that has been scheduled
    • recordActionPending

      void recordActionPending(Action action, NodeRef actionedUponNodeRef)
      Record that an action against a NodeRef has been scheduled for asynchronous execution, and is pending being executed.
      Parameters:
      action - the action that has been scheduled
      actionedUponNodeRef - the NodeRef the action is acting on
      Since:
      4.1.6
    • recordActionExecuting

      void recordActionExecuting(Action action)
      Record that an action has begun execution.
      Parameters:
      action - the action that has begun execution
    • recordActionExecuting

      void recordActionExecuting(Action action, NodeRef actionedUponNodeRef)
      Record that an action has begun execution.
      Parameters:
      action - the action that has been scheduled
      actionedUponNodeRef - the NodeRef the action is acting on
      Since:
      4.1.6
    • recordActionComplete

      void recordActionComplete(Action action)
      Record that an action has completed execution without error.
      Parameters:
      action - the action that has been finished
    • recordActionFailure

      void recordActionFailure(Action action, Throwable problem)
      Record that an action failed during execution
      Parameters:
      action - the action that has failed
    • requestActionCancellation

      void requestActionCancellation(CancellableAction action)
      Requests that the specified Action cancel itself and aborts execution, as soon as possible. Cancellable actions periodically check to see if a cancel has been requested, and will take note of the cancel request once seen.
      Parameters:
      action - The action to request the cancel of
    • requestActionCancellation

      void requestActionCancellation(ExecutionSummary executionSummary)
      Requests that the specified Action cancel itself and aborts execution, as soon as possible. Cancellable actions periodically check to see if a cancel has been requested, and will take note of the cancel request once seen. If the specified action is not a cancellable action, nothing will happen.
      Parameters:
      executionSummary - ExecutionSummary
    • isCancellationRequested

      boolean isCancellationRequested(CancellableAction action)
      Has cancellation been requested for the given action? This method is most commonly called by the action in question, to check to see if someone has called requestActionCancellation(CancellableAction) for them.
      Parameters:
      action - The action to check about
      Returns:
      if cancellation has been requested or not
    • getExecutionDetails

      ExecutionDetails getExecutionDetails(ExecutionSummary executionSummary)
      Retrieves the execution details on the given executing action, such as when it started, and what machine it is executing on.
      Parameters:
      executionSummary - the execution summary
      Returns:
      the execution details
    • getAllExecutingActions

      List<ExecutionSummary> getAllExecutingActions()
      Retrieve summary details of all the actions currently executing.
      Returns:
      the execution summaries
    • getExecutingActions

      List<ExecutionSummary> getExecutingActions(String type)
      Retrieve summary details of all the actions of the given type that are currently executing.
      Parameters:
      type - the action type
      Returns:
      the execution summaries
    • getExecutingActions

      List<ExecutionSummary> getExecutingActions(Action action)
      Retrieve summary details of all instances of the specified action that are currently executing.
      Returns:
      the execution summaries
    • getExecutingActions

      List<ExecutionSummary> getExecutingActions(String type, NodeRef actionedUponNodeRef)
      Retrieve summary details of all the actions of the given type acting on the given NodeRef that are currently executing.
      Parameters:
      type - the action type
      actionedUponNodeRef - the node the action is acting on
      Returns:
      the execution summaries
      Since:
      4.1.6