Documentation for JIRA 4.0. Documentation for other versions of JIRA is available too.

Skip to end of metadata
Go to start of metadata

Purpose of this Module Type

The workflow plugin modules allow you to add new capabilities to JIRA's workflow engine.

JIRA uses OSWorkflow as its workflow engine. The web-based workflow editor has a number of plugin modules which allow you to build workflows more easily.

The modules are:

  • Conditions - check whether or not a given workflow transition can be executed by a given user
  • Functions - perform actions after a workflow transition has been executed
  • Validators - check that the data given to a workflow transition is valid

Condition Configuration

The root element for the workflow condition plugin module is workflow-condition. It allows the following attributes and child elements for configuration:

Attributes

Name

Required

Description

Default

class

 

Unable to render {include} The included page could not be found.
The Java class of the workflow condition, which must implement com.atlassian.jira.plugin.workflow.WorkflowPluginConditionFactory. This class is used to provide context for the rendered Velocity templates that supply the condition's views.

 

key

(tick)

Unable to render {include} The included page could not be found.
I.e. the identifier of the workflow condition.

N/A

i18n-name-key

 

Unable to render {include} The included page could not be found.

 

name

 

Unable to render {include} The included page could not be found.
I.e. the human-readable name of the workflow condition.

The plugin key.

Elements

Name

Required

Description

description

 

A human-readable description of this workflow condition module. May be specified as the value of this element for plain text or with the key attribute to use the value of a key from the i18n system.

condition-class

(tick)

Determines whether the user is allowed to perform this workflow transition. Must implement the OSWorkflow class com.opensymphony.workflow.Condition, but JIRA extensions are strongly recommended to extend com.atlassian.jira.workflow.condition.AbstractJiraCondition; this implementation provides efficient access to the Issue object.

resource type="velocity"

 

Used to render the views for the condition. The template contexts are populated by the workflow-condition's class.

Example

The following condition prohibits all users other than the issue assignee from performing transitions on any given issue.

Function Configuration

Workflow functions always execute after the workflow transition is executed; they might be more properly named _post-_workflow functions.

The root element for the workflow function plugin module is workflow-function. It allows the following attributes and child elements for configuration:

Attributes

Name

Required

Description

Default

class

 

Unable to render {include} The included page could not be found.
The Java class of the workflow function. Functions that don't require input should use com.atlassian.jira.plugin.workflow.WorkflowNoInputPluginFactory; those that do must implement com.atlassian.jira.plugin.workflow.WorkflowPluginFunctionFactory.

 

key

(tick)

Unable to render {include} The included page could not be found.
I.e. the identifier of the workflow function.

N/A

i18n-name-key

 

Unable to render {include} The included page could not be found.

 

name

 

Unable to render {include} The included page could not be found.
I.e. the human-readable name of the workflow function.

The plugin key.

Elements

Name

Required

Description

description

 

A human-readable description of this workflow function module. May be specified as the value of this element for plain text or with the key attribute to use the value of a key from the i18n system.

function-class

(tick)

Class that implements the function's logic. Must extend com.atlassian.jira.workflow.function.issue.AbstractJiraFunctionProvider.

resource type="velocity"

 

Used to render the views for the function.

orderable

 

(true/false) Specifies if this function can be re-ordered within the list of functions associated with a transition. The postion within the list determines when the function actually executes.

unique

 

(true/false) Specifies if this function is unique; i.e., if it is possible to add multiple instances of this post function on a single transition.

deletable

 

(true/false) Specifies if this function can be removed from a transition.

addable

 

Valid values are the ACTION_TYPE constants of the com.atlassian.jira.workflow.JiraWorkflow; multiple values can be specified through comma-delineation.

weight

 

An integer value indicating where this function should be called if it is default (see below).

default

 

(true/false) Specifies if this function should be applied to all workflows.

Example

Validator Configuration

The root element for the workflow validator plugin module is workflow-validator. It allows the following attributes and child elements for configuration:

Attributes

Name

Required

Description

Default

class

 

Unable to render {include} The included page could not be found.
The Java class of the workflow validator, which must implement com.atlassian.jira.plugin.workflow.WorkflowPluginValidatorFactory. This class is used to provide context for the rendered Velocity templates that supply the validator's views.

 

key

(tick)

Unable to render {include} The included page could not be found.
I.e. the identifier of the workflow validator.

N/A

i18n-name-key

 

Unable to render {include} The included page could not be found.

 

name

 

Unable to render {include} The included page could not be found.
I.e. the human-readable name of the workflow validator.

The plugin key.

Elements

Name

Required

Description

description

 

A human-readable description of this workflow validator module. May be specified as the value of this element for plain text or with the key attribute to use the value of a key from the i18n system.

validator-class

(tick)

Class that performs the validation logic. Must extend com.opensymphony.workflow.Validator.

resource type="velocity"

 

Used to render the views for the validator.

Example

Notes

  • The weight and default parameters for workflow functions should not be used by plugin authors and should be considered reserved for JIRA's use.

(info) For more details, see the How to create Custom Workflow Elements for JIRA 3 page.

  • No labels