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 Details

    • addConditionToWorkflow

      ErrorCollection addConditionToWorkflow(@Nonnull String transitionName, @Nonnull com.opensymphony.workflow.loader.ConditionDescriptor condition, @Nonnull JiraWorkflow workflow)
      Adds condition to all transitions whose name match the given transitionName in workflow.
      Parameters:
      transitionName - Name of the transitions to be updated with the condition. This is case-insensitive.
      condition - The condition to be applied to all matched transitions.
      workflow - The JIRA workflow to be updated.
      Returns:
      A resulting ErrorCollection for the operation. Use ErrorCollection.hasAnyErrors() to check whether there are any errors.
    • addPostFunctionToWorkflow

      ErrorCollection addPostFunctionToWorkflow(@Nonnull String transitionName, @Nonnull com.opensymphony.workflow.loader.FunctionDescriptor function, @Nonnull JiraWorkflow workflow)
      Adds function to all transitions whose name match the given transitionName in workflow.
      Parameters:
      transitionName - Name of the transitions to be updated with the function. This is case-insensitive.
      function - The function to be applied to all matched transitions.
      workflow - The JIRA workflow to be updated.
      Returns:
      A resulting ErrorCollection for the operation. Use ErrorCollection.hasAnyErrors() to check whether there are any errors.
    • setScreen

      ErrorCollection setScreen(@Nonnull String transitionName, @Nullable FieldScreen screen, @Nonnull JiraWorkflow workflow)
      Sets the given screen to all transitions whose name match the given transitionName in workflow.
      Parameters:
      transitionName - Name of the transitions to be updated with the condition. This is case-insensitive.
      screen - The screen to be set for all matched transitions.
      workflow - The JIRA workflow to be updated.
      Returns:
      A resulting ErrorCollection for the operation. Use ErrorCollection.hasAnyErrors() to check whether there are any errors.