Package com.atlassian.jira.bc.workflow
Interface WorkflowTransitionService
- All Known Implementing Classes:
DefaultWorkflowTransitionService
@Internal
public interface WorkflowTransitionService
A container-injectable service that provides the ability to add conditions (via
ConditionDescriptor)
and post functions (via FunctionDescriptor) to a JIRA workflow.
Instances of ConditionDescriptor and FunctionDescriptor can be created using
WorkflowConditionDescriptorFactory and WorkflowFunctionDescriptorFactory respectively.
- Since:
- v6.4
-
Method Summary
Modifier and TypeMethodDescriptionaddConditionToWorkflow(String transitionName, com.opensymphony.workflow.loader.ConditionDescriptor condition, JiraWorkflow workflow) Addsconditionto all transitions whose name match the giventransitionNameinworkflow.addPostFunctionToWorkflow(String transitionName, com.opensymphony.workflow.loader.FunctionDescriptor function, JiraWorkflow workflow) Addsfunctionto all transitions whose name match the giventransitionNameinworkflow.setScreen(String transitionName, FieldScreen screen, JiraWorkflow workflow) Sets the givenscreento all transitions whose name match the giventransitionNameinworkflow.
-
Method Details
-
addConditionToWorkflow
ErrorCollection addConditionToWorkflow(@Nonnull String transitionName, @Nonnull com.opensymphony.workflow.loader.ConditionDescriptor condition, @Nonnull JiraWorkflow workflow) Addsconditionto all transitions whose name match the giventransitionNameinworkflow.- Parameters:
transitionName- Name of the transitions to be updated with thecondition. This is case-insensitive.condition- The condition to be applied to all matched transitions.workflow- The JIRA workflow to be updated.- Returns:
- A resulting
ErrorCollectionfor the operation. UseErrorCollection.hasAnyErrors()to check whether there are any errors.
-
addPostFunctionToWorkflow
ErrorCollection addPostFunctionToWorkflow(@Nonnull String transitionName, @Nonnull com.opensymphony.workflow.loader.FunctionDescriptor function, @Nonnull JiraWorkflow workflow) Addsfunctionto all transitions whose name match the giventransitionNameinworkflow.- Parameters:
transitionName- Name of the transitions to be updated with thefunction. This is case-insensitive.function- The function to be applied to all matched transitions.workflow- The JIRA workflow to be updated.- Returns:
- A resulting
ErrorCollectionfor the operation. UseErrorCollection.hasAnyErrors()to check whether there are any errors.
-
setScreen
ErrorCollection setScreen(@Nonnull String transitionName, @Nullable FieldScreen screen, @Nonnull JiraWorkflow workflow) Sets the givenscreento all transitions whose name match the giventransitionNameinworkflow.- Parameters:
transitionName- Name of the transitions to be updated with thecondition. This is case-insensitive.screen- The screen to be set for all matched transitions.workflow- The JIRA workflow to be updated.- Returns:
- A resulting
ErrorCollectionfor the operation. UseErrorCollection.hasAnyErrors()to check whether there are any errors.
-