Package com.atlassian.jira.workflow.edit
Interface WorkflowGlobalTransitions
- All Known Implementing Classes:
WorkflowGlobalTransitionsImpl
@Internal
public interface WorkflowGlobalTransitions
Provides operations on workflow global transitions.
This class deals with the business logic pertaining to creating, updating, deleting global transitions, i.e.
validation logic, persistence and dealing with ServiceOutcomes.
- Since:
- 7.4
-
Method Summary
Modifier and TypeMethodDescriptionaddGlobalTransitionToWorkflow(String workflowName, String statusId, String globalTransitionName, String globalTransitionDescription, Long screenId) Add a global transition with the specified properties to the named workflow.createGlobalTransition(String statusId, String workflowName, String globalTransitionName, String globalTransitionDescription, Long screenId) Create a global transition to a specified status on a workflow.deleteGlobalTransition(String globalTransitionId, String workflowName) Delete the global transition in the specified workflow.resolveUniqueGlobalTransitionName(Workflow workflow, String globalTransitionName) Checks if a global transition name conflict occurs, returns a generated unique name if it doesupdateGlobalTransition(int transitionId, String name, String description, Long screenId, String workflowName) Update the global transition identified by the specified transition id with the supplied properties.verifyGlobalTransitionCanBeUpdated(int transitionId, String name, String workflowName, Long screenId)
-
Method Details
-
createGlobalTransition
ServiceOutcome<Workflow> createGlobalTransition(String statusId, String workflowName, String globalTransitionName, String globalTransitionDescription, Long screenId) Create a global transition to a specified status on a workflow. An error will be returned in the case of:- the status already existing on the workflow
- duplicate name of existing global transition
- failing validation due to workflow, status not existing or a blank global transition name
- Parameters:
statusId-workflowName-globalTransitionName-globalTransitionDescription-screenId-- Returns:
- A
ServiceOutcomecontaining the updated workflow.
-
addGlobalTransitionToWorkflow
ServiceOutcome<TransitionData> addGlobalTransitionToWorkflow(String workflowName, String statusId, String globalTransitionName, String globalTransitionDescription, Long screenId) Add a global transition with the specified properties to the named workflow.- Returns:
- ServiceOutcome
New transition data.
-
deleteGlobalTransition
Delete the global transition in the specified workflow.- Parameters:
globalTransitionId- The global transition to delete.workflowName- The workflow to delete the global transition from.- Returns:
- A
ServiceOutcomecontaining the updated workflow.
-
updateGlobalTransition
ServiceOutcome<Workflow> updateGlobalTransition(int transitionId, String name, String description, Long screenId, String workflowName) Update the global transition identified by the specified transition id with the supplied properties.- Parameters:
transitionId-name-description-screenId-workflowName-- Returns:
- ServiceOutcome
The updated workflow.
-
verifyGlobalTransitionCanBeUpdated
ServiceOutcome<Workflow> verifyGlobalTransitionCanBeUpdated(int transitionId, String name, String workflowName, Long screenId) -
resolveUniqueGlobalTransitionName
Checks if a global transition name conflict occurs, returns a generated unique name if it does- Parameters:
workflow- derived names are only unique within this workflowglobalTransitionName- The desired name for the global transition- Returns:
- String a unique global transition name
-