Interface IWorkflowObject

All Superinterfaces:
IAdaptable, IChangeListener, IHasCustomValues, IHasValues, IPObject, IUniqueObject
All Known Subinterfaces:
IModule, ITestRun, IWithLinkedOslcResources, IWorkItem

public interface IWorkflowObject extends IUniqueObject
Since:
3.8.1
  • Field Details

  • Method Details

    • setType

      void setType(@Nullable ITypeOpt newType)
      Sets type of the object and resets its workflow, so that the object enters initial workflow state.

      Open transaction is required to call this method.

      Parameters:
      newType -
    • getType

      @Nullable ITypeOpt getType()
    • getStatus

      @Nullable IStatusOpt getStatus()
    • getAvailableActions

      @NotNull IWorkflowAction[] getAvailableActions()
      Returns:
      The list of available workflow actions to be performed on this item. Can be empty array, but never null.
    • getUnavailableActions

      @NotNull Map<IWorkflowAction,String> getUnavailableActions()
      Returns map of unavailable workflow actions for current state of Work Item. Keys are IWorkflowActions. Values contains message why the actions is unavailable.
      Returns:
      Map of IWorkflowAction to String messages.
      Since:
      3.6.1
    • getInitialAction

      @Nullable IWorkflowAction getInitialAction()
      Returns initial workflow action if it is defined for this workflow. Initial action is always called implicitly by the system, it is made available through this method so that interested clients can check e.g. list of required features.
      Returns:
      initial action or null
      Since:
      3.3.0
    • performAction

      @NotNull IPObjectList performAction(int actionId)
      Performs the given worflow action. The action might modify some other objects as well - in such a case the list with the modified objects is returned.

      This allows client to correctly handle that - e.g. present this list to the user for approval, etc.

      Parameters:
      actionId -
      Returns:
      a List containing all modified IPObjects expect this work item
    • resetWorkflow

      void resetWorkflow()
      Resets the workflow so that the Work Item enters the initial status. If there is initial workflow action defined, it will be registered and called on commit or before next workflow (whatever comes first).

      Open transaction is required to call this method.

      Since:
      3.5.3
    • getTrackerService

      @NotNull ITrackerService getTrackerService()
      Since:
      3.6.1
    • getProject

      ITrackerProject getProject()
      Specified by:
      getProject in interface IUniqueObject
      Since:
      3.8.3
    • can

      Specified by:
      can in interface IPObject
      Since:
      3.9.0
    • getWorkflowSignaturesManager

      @NotNull <T extends IWorkflowSignature> IWorkflowSignaturesManager<T> getWorkflowSignaturesManager()
      Returns signatures manager that can be used for all signature related tasks.
      Throws:
      UnsupportedOperationException - if signatures are not supported for this object type (on IWorkItem).
      Since:
      3.10.0
    • getWorkflowSignatures

      @NotNull <T extends IWorkflowSignature> List<T> getWorkflowSignatures()
      Returns all workflow signatures in the creation order. Usually the clients will use the signatures manager to work with signatures.
      Throws:
      UnsupportedOperationException - if signatures are not supported for this object type (on IWorkItem)
      Since:
      3.10.0
      See Also: