Interface JiraWorkflow

All Superinterfaces:
Comparable<JiraWorkflow>
All Known Implementing Classes:
AbstractJiraWorkflow, ConfigurableJiraWorkflow, DefaultJiraWorkflow, JiraDraftWorkflow, MockJiraWorkflow, MockXmlLoadableJiraWorkflow, Workflow

@PublicApi public interface JiraWorkflow extends Comparable<JiraWorkflow>
Domain object representing the permitted states and transitions of issues.
  • Field Details

  • Method Details

    • getName

      String getName()
    • getDisplayName

      String getDisplayName()
    • getDescription

      String getDescription()
    • getDescriptor

      com.opensymphony.workflow.loader.WorkflowDescriptor getDescriptor()
    • getAllActions

      Collection<com.opensymphony.workflow.loader.ActionDescriptor> getAllActions()
      Get all the actions in this workflow, global, common and from steps.
      Returns:
      A collection of ActionDescriptors.
    • getActionsByName

      Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsByName(String name)
      Get all actions in this workflow, global, common and from steps, whose name matched name.
      Parameters:
      name - of the action to match. This is case-insensitive.
      Returns:
      A collection of ActionDescriptor whose name matched the given name.
    • getActionsWithResult

      Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsWithResult(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
      Get all the actions which have a particular step as their unconditional result.
      Returns:
      all the actions which have a particular step as their unconditional result.
    • removeStep

      boolean removeStep(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
      Remove a step from the workflow.

      This method will also remove all actions with this step ID as their unconditional result.

      Returns:
      true if the remove was successful
    • getLinkedStep

      com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(org.ofbiz.core.entity.GenericValue status)
      Deprecated.
      Get the StepDescriptor linked to the given status for this workflow.
      Parameters:
      status - the Status
      Returns:
      The StepDescriptor linked, or null if no steps are linked to this status.
    • getLinkedStep

      com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(Status status)
      Get the StepDescriptor linked to the given status for this workflow.
      Parameters:
      status - the Status
      Returns:
      The StepDescriptor linked, or null if no steps are linked to this status.
    • getLinkedStatuses

      List<org.ofbiz.core.entity.GenericValue> getLinkedStatuses()
      Deprecated.
      Use getLinkedStatusObjects() instead. Since v5.0.
      Returns all statuses for this workflow
      Returns:
      a List of GenericValue
    • getLinkedStatusObjects

      List<Status> getLinkedStatusObjects()
      Returns all statuses for this workflow
      Returns:
      a List of Status objects
    • getLinkedStatusIds

      Set<String> getLinkedStatusIds()
      Returns all status ids for this workflow
      Returns:
      a Set of String status id's
    • isActive

      boolean isActive() throws WorkflowException
      Determine whether this workflow object is currently active.
      Returns:
      true if this workflow object is active.
      Throws:
      WorkflowException - Runtime Exception indicating a problem in the WorkflowManager.
    • isSystemWorkflow

      boolean isSystemWorkflow() throws WorkflowException
      Determines if the workflow is loaded from XML or the database
      Returns:
      true if this workflow object is the uneditable system workflow.
      Throws:
      WorkflowException - Runtime Exception indicating a problem in the WorkflowManager.
    • isEditable

      boolean isEditable() throws WorkflowException
      Determines if the workflow can be modifed within JIRA.

      System workflows are never editable. The "published" version of an active workflow is not editable, but the draft version is. Inactive workflows are editable.

      Returns:
      true if this workflow is editable.
      Throws:
      WorkflowException - Runtime Exception indicating a problem in the WorkflowManager.
    • isDefault

      boolean isDefault()
      Determines if the workflow is the default JIRA workflow
      Returns:
      true if this is the workflow is the default JIRA workflow.
    • isDraftWorkflow

      boolean isDraftWorkflow()
      Determines if the workflow is an draft edit of an active workflow.
      Returns:
      true if an draft workflow, false otherwise.
      Since:
      v3.13
    • hasDraftWorkflow

      boolean hasDraftWorkflow()
      Determines if this workflow has a draft edit copy.
      Returns:
      true if this workflow has a draft edit copy.
      Since:
      v3.13
    • getNextActionId

      int getNextActionId()
      Get the next available action id
      Returns:
      The next available action id.
    • getStepsForTransition

      Collection<com.opensymphony.workflow.loader.StepDescriptor> getStepsForTransition(com.opensymphony.workflow.loader.ActionDescriptor action)
      Returns a collection of all step descriptors that reference the given common action.
      Returns:
      a collection of all step descriptors that reference the given common action.
    • getPostFunctionsForTransition

      Collection<com.opensymphony.workflow.loader.FunctionDescriptor> getPostFunctionsForTransition(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
      Returns all post-functions of the transition, including the ones on all conditional results, unconditional results and 'global' (non-result) postfunctions.
      Returns:
      all post-functions of the transition, including the ones on all conditional results, unconditional results and 'global' (non-result) postfunctions.
    • isInitialAction

      boolean isInitialAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
    • isCommonAction

      boolean isCommonAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
    • isGlobalAction

      boolean isGlobalAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
    • isOrdinaryAction

      boolean isOrdinaryAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
    • getLinkedStatus

      Status getLinkedStatus(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
      Get the Status associated with the given StepDescriptor.
      Parameters:
      stepDescriptor - the StepDescriptor
      Returns:
      the Status associated with the given StepDescriptor.
    • getLinkedStatusObject

      @Deprecated Status getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
      Get the Status associated with the given StepDescriptor.
      Parameters:
      stepDescriptor - the StepDescriptor
      Returns:
      the Status associated with the given StepDescriptor.
    • getLinkedStatusId

      String getLinkedStatusId(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
      Get the id of the Status associated with the given StepDescriptor
      Parameters:
      stepDescriptor - the StepDescriptor
      Returns:
      the id of the status associated with the given StepDescriptor.
    • getActionType

      String getActionType(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
    • reset

      void reset()
    • getActionsForScreen

      Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsForScreen(FieldScreen fieldScreen)
    • getUpdateAuthorName

      String getUpdateAuthorName()
      Returns the most recent authors username.
      Returns:
      Returns the authors username
      Since:
      v3.13
    • getUpdateAuthor

      ApplicationUser getUpdateAuthor()
      Returns the most recent author

      Notice: This method will also return proxy user even when is not existing. Please use UserManager.isUserExisting(com.atlassian.jira.user.ApplicationUser) if you want to check user's existence.
      Returns:
      The update author.
      Since:
      v6.0
    • getUpdatedDate

      Date getUpdatedDate()
      Returns the date of the most recent update to this workflow.
      Returns:
      date of the most recent update to this workflow
      Since:
      v3.13
    • getMode

      String getMode()
      Returns either DRAFT or LIVE depending on the workflow implementation.
      Returns:
      DRAFT or LIVE
      Since:
      v3.13