@PublicApi public interface

JiraWorkflow

implements Comparable<T>
com.atlassian.jira.workflow.JiraWorkflow
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Domain object representing the permitted states and transitions of issues.

Summary

Constants
int ACTION_ORIGIN_STEP_ID May be used as the destination step in common actions, if the action should not result in a step change.
String ACTION_TYPE_COMMON
String ACTION_TYPE_GLOBAL
String ACTION_TYPE_INITIAL
String ACTION_TYPE_ORDINARY
String DEFAULT_WORKFLOW_NAME
String DRAFT
String JIRA_META_ATTRIBUTE_EDIT_ALLOWED
String JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION
String JIRA_META_ATTRIBUTE_I18N
String JIRA_META_ATTRIBUTE_I18N_SUBMIT
String JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION
String JIRA_META_ATTRIBUTE_KEY_PREFIX
String JIRA_META_ATTRIBUTE_PERMISSION
String JIRA_META_UPDATED_DATE Key used to store the last modification date in the workflow xml
String JIRA_META_UPDATE_AUTHOR_KEY
String JIRA_META_UPDATE_AUTHOR_NAME This constant is deprecated. Use JIRA_META_UPDATE_AUTHOR_KEY instead. Since v6.0.
String LIVE
String STEP_STATUS_KEY
String WORKFLOW_DESCRIPTION_ATTRIBUTE
String WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE
Fields
public static final Collection<String> ACTION_TYPE_ALL
public static final String[] JIRA_META_ATTRIBUTE_ALLOWED_LIST Allowed 'jira.*' prefixes for workflow properties.
Public Methods
String getActionType(ActionDescriptor actionDescriptor)
Collection<ActionDescriptor> getActionsForScreen(FieldScreen fieldScreen)
Collection<ActionDescriptor> getActionsWithResult(StepDescriptor stepDescriptor)
Get all the actions which have a particular step as their unconditional result.
Collection<ActionDescriptor> getAllActions()
Get all the actions in this workflow, global, common and from steps.
String getDescription()
WorkflowDescriptor getDescriptor()
String getDisplayName()
GenericValue getLinkedStatus(StepDescriptor stepDescriptor)
This method is deprecated. Use getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor) instead. Since v5.0.
Status getLinkedStatusObject(StepDescriptor stepDescriptor)
Get the Status associated with the given StepDescriptor.
List<Status> getLinkedStatusObjects()
Returns all statuses for this workflow
List<GenericValue> getLinkedStatuses()
This method is deprecated. Use getLinkedStatusObjects() instead. Since v5.0.
StepDescriptor getLinkedStep(GenericValue status)
This method is deprecated. Use getLinkedStep(com.atlassian.jira.issue.status.Status) instead. Since v5.0.
StepDescriptor getLinkedStep(Status status)
Get the StepDescriptor linked to the given status for this workflow.
String getMode()
Returns either DRAFT or LIVE depending on the workflow implementation.
String getName()
int getNextActionId()
Get the next available action id
Collection<FunctionDescriptor> getPostFunctionsForTransition(ActionDescriptor actionDescriptor)
Returns all post-functions of the transition, including the ones on all conditional results, unconditional results and 'global' (non-result) postfunctions.
Collection<StepDescriptor> getStepsForTransition(ActionDescriptor action)
Returns a collection of all step descriptors that reference the given common action.
ApplicationUser getUpdateAuthor()
Returns the most recent author

Notice: This method will also return proxy user even when is not existing.
String getUpdateAuthorName()
Returns the most recent authors username.
Date getUpdatedDate()
Returns the date of the most recent update to this workflow.
boolean hasDraftWorkflow()
Determines if this workflow has a draft edit copy.
boolean isActive()
Determine whether this workflow object is currently active.
boolean isCommonAction(ActionDescriptor actionDescriptor)
boolean isDefault()
Determines if the workflow is the default JIRA workflow
boolean isDraftWorkflow()
Determines if the workflow is an draft edit of an active workflow.
boolean isEditable()
Determines if the workflow can be modifed within JIRA.
boolean isGlobalAction(ActionDescriptor actionDescriptor)
boolean isInitialAction(ActionDescriptor actionDescriptor)
boolean isOrdinaryAction(ActionDescriptor actionDescriptor)
boolean isSystemWorkflow()
Determines if the workflow is loaded from XML or the database
boolean removeStep(StepDescriptor stepDescriptor)
Remove a step from the workflow.
void reset()
[Expand]
Inherited Methods
From interface java.lang.Comparable

Constants

public static final int ACTION_ORIGIN_STEP_ID

May be used as the destination step in common actions, if the action should not result in a step change.

Constant Value: -1 (0xffffffff)

public static final String ACTION_TYPE_COMMON

Constant Value: "common"

public static final String ACTION_TYPE_GLOBAL

Constant Value: "global"

public static final String ACTION_TYPE_INITIAL

Constant Value: "initial"

public static final String ACTION_TYPE_ORDINARY

Constant Value: "ordinary"

public static final String DEFAULT_WORKFLOW_NAME

Constant Value: "jira"

public static final String DRAFT

Constant Value: "draft"

public static final String JIRA_META_ATTRIBUTE_EDIT_ALLOWED

Constant Value: "jira.issue.editable"

public static final String JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION

Constant Value: "jira.field.resolution.exclude"

public static final String JIRA_META_ATTRIBUTE_I18N

Constant Value: "jira.i18n.title"

public static final String JIRA_META_ATTRIBUTE_I18N_SUBMIT

Constant Value: "jira.i18n.submit"

public static final String JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION

Constant Value: "jira.field.resolution.include"

public static final String JIRA_META_ATTRIBUTE_KEY_PREFIX

Constant Value: "jira."

public static final String JIRA_META_ATTRIBUTE_PERMISSION

Constant Value: "jira.permission"

public static final String JIRA_META_UPDATED_DATE

Key used to store the last modification date in the workflow xml

Constant Value: "jira.updated.date"

public static final String JIRA_META_UPDATE_AUTHOR_KEY

Constant Value: "jira.update.author.key"

public static final String JIRA_META_UPDATE_AUTHOR_NAME

This constant is deprecated.
Use JIRA_META_UPDATE_AUTHOR_KEY instead. Since v6.0.

Key used to store the last modifications author in the workflow xml

Constant Value: "jira.update.author.name"

public static final String LIVE

Constant Value: "live"

public static final String STEP_STATUS_KEY

Constant Value: "jira.status.id"

public static final String WORKFLOW_DESCRIPTION_ATTRIBUTE

Constant Value: "jira.description"

public static final String WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE

Constant Value: "jira.view.fieldlayout.key"

Fields

public static final Collection<String> ACTION_TYPE_ALL

public static final String[] JIRA_META_ATTRIBUTE_ALLOWED_LIST

Allowed 'jira.*' prefixes for workflow properties.

Public Methods

public String getActionType (ActionDescriptor actionDescriptor)

public Collection<ActionDescriptor> getActionsForScreen (FieldScreen fieldScreen)

public Collection<ActionDescriptor> getActionsWithResult (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.

public Collection<ActionDescriptor> getAllActions ()

Get all the actions in this workflow, global, common and from steps.

Returns
  • A collection of ActionDescriptors.

public String getDescription ()

public WorkflowDescriptor getDescriptor ()

public String getDisplayName ()

public GenericValue getLinkedStatus (StepDescriptor stepDescriptor)

This method is deprecated.
Use getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor) instead. Since v5.0.

Get the Status associated with the given StepDescriptor.

Parameters
stepDescriptor the StepDescriptor
Returns
  • the Status associated with the given StepDescriptor.

public Status getLinkedStatusObject (StepDescriptor stepDescriptor)

Get the Status associated with the given StepDescriptor.

Parameters
stepDescriptor the StepDescriptor
Returns
  • the Status associated with the given StepDescriptor.

public List<Status> getLinkedStatusObjects ()

Returns all statuses for this workflow

Returns

public List<GenericValue> getLinkedStatuses ()

This method is deprecated.
Use getLinkedStatusObjects() instead. Since v5.0.

Returns all statuses for this workflow

Returns
  • a List of GenericValue

public StepDescriptor getLinkedStep (GenericValue status)

This method is deprecated.
Use getLinkedStep(com.atlassian.jira.issue.status.Status) instead. Since v5.0.

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.

public 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.

public String getMode ()

Returns either DRAFT or LIVE depending on the workflow implementation.

Returns

public String getName ()

public int getNextActionId ()

Get the next available action id

Returns
  • The next available action id.

public Collection<FunctionDescriptor> getPostFunctionsForTransition (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.

public Collection<StepDescriptor> getStepsForTransition (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.

public ApplicationUser getUpdateAuthor ()

Returns the most recent author

Notice: This method will also return proxy user even when is not existing. Please use isUserExisting(com.atlassian.jira.user.ApplicationUser) if you want to check user's existence.

Returns
  • The update author.

public String getUpdateAuthorName ()

Returns the most recent authors username.

Returns
  • Returns the authors username

public Date getUpdatedDate ()

Returns the date of the most recent update to this workflow.

Returns
  • date of the most recent update to this workflow

public boolean hasDraftWorkflow ()

Determines if this workflow has a draft edit copy.

Returns
  • true if this workflow has a draft edit copy.

public boolean isActive ()

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.

public boolean isCommonAction (ActionDescriptor actionDescriptor)

public boolean isDefault ()

Determines if the workflow is the default JIRA workflow

Returns
  • true if this is the workflow is the default JIRA workflow.

public boolean isDraftWorkflow ()

Determines if the workflow is an draft edit of an active workflow.

Returns
  • true if an draft workflow, false otherwise.

public boolean isEditable ()

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.

public boolean isGlobalAction (ActionDescriptor actionDescriptor)

public boolean isInitialAction (ActionDescriptor actionDescriptor)

public boolean isOrdinaryAction (ActionDescriptor actionDescriptor)

public boolean isSystemWorkflow ()

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.

public boolean removeStep (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

public void reset ()