Package com.atlassian.jira.workflow
Interface JiraWorkflow
- All Superinterfaces:
Comparable<JiraWorkflow>
- All Known Implementing Classes:
AbstractJiraWorkflow
,ConfigurableJiraWorkflow
,DefaultJiraWorkflow
,JiraDraftWorkflow
,MockJiraWorkflow
,MockXmlLoadableJiraWorkflow
,Workflow
Domain object representing the permitted states and transitions of issues.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
May be used as the destination step in common actions, if the action should not result in a step change.static final String
static final Collection<String>
static final String
static final String
static final String
static final String
static final String
static final String
static final String[]
Allowed 'jira.*' prefixes for workflow properties.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.static final String
Key used to store the last modification date in the workflow xmlstatic final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionCollection<com.opensymphony.workflow.loader.ActionDescriptor>
getActionsByName
(String name) Get all actions in this workflow, global, common and from steps, whose name matchedname
.Collection<com.opensymphony.workflow.loader.ActionDescriptor>
getActionsForScreen
(FieldScreen fieldScreen) 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.getActionType
(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor) Collection<com.opensymphony.workflow.loader.ActionDescriptor>
Get all the actions in this workflow, global, common and from steps.com.opensymphony.workflow.loader.WorkflowDescriptor
getLinkedStatus
(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor) Get the Status associated with the given StepDescriptor.List<org.ofbiz.core.entity.GenericValue>
Deprecated.UsegetLinkedStatusObjects()
instead.getLinkedStatusId
(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor) Get the id of theStatus
associated with the givenStepDescriptor
Returns all status ids for this workflowgetLinkedStatusObject
(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor) Deprecated.Returns all statuses for this workflowcom.opensymphony.workflow.loader.StepDescriptor
getLinkedStep
(Status status) Get the StepDescriptor linked to the given status for this workflow.com.opensymphony.workflow.loader.StepDescriptor
getLinkedStep
(org.ofbiz.core.entity.GenericValue status) Deprecated.getMode()
getName()
int
Get the next available action idCollection<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.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 the most recent authorReturns the most recent authors username.Returns the date of the most recent update to this workflow.boolean
Determines if this workflow has a draft edit copy.boolean
isActive()
Determine whether this workflow object is currently active.boolean
isCommonAction
(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor) boolean
Determines if the workflow is the default JIRA workflowboolean
Determines if the workflow is an draft edit of an active workflow.boolean
Determines if the workflow can be modifed within JIRA.boolean
isGlobalAction
(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor) boolean
isInitialAction
(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor) boolean
isOrdinaryAction
(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor) boolean
Determines if the workflow is loaded from XML or the databaseboolean
removeStep
(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor) Remove a step from the workflow.void
reset()
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
JIRA_META_ATTRIBUTE_KEY_PREFIX
- See Also:
-
JIRA_META_ATTRIBUTE_PERMISSION
- See Also:
-
JIRA_META_ATTRIBUTE_EDIT_ALLOWED
- See Also:
-
JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION
- See Also:
-
JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION
- See Also:
-
JIRA_META_ATTRIBUTE_I18N
- See Also:
-
JIRA_META_ATTRIBUTE_I18N_SUBMIT
- See Also:
-
JIRA_META_UPDATE_AUTHOR_NAME
Deprecated.UseJIRA_META_UPDATE_AUTHOR_KEY
instead. Since v6.0.Key used to store the last modifications author in the workflow xml- See Also:
-
JIRA_META_UPDATE_AUTHOR_KEY
- See Also:
-
JIRA_META_UPDATED_DATE
Key used to store the last modification date in the workflow xml- See Also:
-
JIRA_META_ATTRIBUTE_ALLOWED_LIST
Allowed 'jira.*' prefixes for workflow properties. -
STEP_STATUS_KEY
- See Also:
-
WORKFLOW_DESCRIPTION_ATTRIBUTE
- See Also:
-
WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE
- See Also:
-
ACTION_SCREEN_ATTRIBUTE
- See Also:
-
DEFAULT_WORKFLOW_NAME
- See Also:
-
ACTION_TYPE_INITIAL
- See Also:
-
ACTION_TYPE_GLOBAL
- See Also:
-
ACTION_TYPE_COMMON
- See Also:
-
ACTION_TYPE_ORDINARY
- See Also:
-
DRAFT
- See Also:
-
LIVE
- See Also:
-
ACTION_TYPE_ALL
-
ACTION_ORIGIN_STEP_ID
static final int ACTION_ORIGIN_STEP_IDMay be used as the destination step in common actions, if the action should not result in a step change.- See Also:
-
-
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
ActionDescriptor
s.
-
getActionsByName
Get all actions in this workflow, global, common and from steps, whose name matchedname
.- Parameters:
name
- of the action to match. This is case-insensitive.- Returns:
- A collection of
ActionDescriptor
whose name matched the givenname
.
-
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.UsegetLinkedStep(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.
-
getLinkedStep
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.UsegetLinkedStatusObjects()
instead. Since v5.0.Returns all statuses for this workflow- Returns:
- a
List
ofGenericValue
-
getLinkedStatusObjects
Returns all statuses for this workflow -
getLinkedStatusIds
Returns all status ids for this workflow -
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.
-
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.
-
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.
-
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
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) Deprecated.UsegetLinkedStatus(com.opensymphony.workflow.loader.StepDescriptor)
instead. Since v7.0.Get the Status associated with the given StepDescriptor.- Parameters:
stepDescriptor
- the StepDescriptor- Returns:
- the Status associated with the given StepDescriptor.
-
getLinkedStatusId
Get the id of theStatus
associated with the givenStepDescriptor
- Parameters:
stepDescriptor
- the StepDescriptor- Returns:
- the id of the status associated with the given StepDescriptor.
-
getActionType
-
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 useUserManager.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()
-
JIRA_META_UPDATE_AUTHOR_KEY
instead.