Class NeedsActiveTaskCmd<T>

java.lang.Object
org.flowable.engine.impl.cmd.NeedsActiveTaskCmd<T>
All Implemented Interfaces:
Serializable, Command<T>
Direct Known Subclasses:
AddIdentityLinkCmd, ClaimTaskCmd, CompleteTaskCmd, CompleteTaskWithFormCmd, DelegateTaskCmd, DeleteIdentityLinkCmd, RemoveTaskVariablesCmd, ResolveTaskCmd, SetTaskDueDateCmd, SetTaskPriorityCmd, SetTaskVariablesCmd, StartProgressTaskCmd, SubmitTaskFormCmd, SuspendTaskCmd

public abstract class NeedsActiveTaskCmd<T> extends Object implements Command<T>, Serializable
An abstract superclass for Command implementations that want to verify the provided task is always active (ie. not suspended).
Author:
Joram Barrez
See Also:
  • Field Details

    • taskId

      protected String taskId
  • Constructor Details

    • NeedsActiveTaskCmd

      public NeedsActiveTaskCmd(String taskId)
  • Method Details

    • execute

      public T execute(CommandContext commandContext)
      Specified by:
      execute in interface Command<T>
    • execute

      protected abstract T execute(CommandContext commandContext, TaskEntity task)
      Subclasses must implement in this method their normal command logic. The provided task is ensured to be active.
    • getSuspendedTaskExceptionPrefix

      protected String getSuspendedTaskExceptionPrefix()
      Subclasses can override this method to provide a customized exception message that will be thrown when the task is suspended.