This resource represents workflow transition rules. Workflow transition rules define a Connect or a Forge app routine, such as a workflow post functions that is executed in association with the workflow. Use it to read and modify configuration of workflow transition rules.

Hierarchy

  • CommonHttpService
    • WorkflowTransitionRulesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns WorkflowTransitionRulesService

Methods

  • Returns a paginated list of workflows with transition rules. The workflows can be filtered to return only those containing workflow transition rules:

    • of one or more transition rule types, such as workflow post functions.
    • matching one or more transition rule keys.

    Only workflows containing transition rules created by the calling Connect or Forge app are returned.

    Due to server-side optimizations, workflows with an empty list of rules may be returned; these workflows can be ignored.

    Permissions required: Only Connect or Forge apps can use this operation.

    Parameters

    • params: {
          draft?: boolean;
          expand?: string;
          keys?: string[];
          maxResults?: number;
          startAt?: number;
          types: ("postfunction" | "condition" | "validator")[];
          withTags?: string[];
          workflowNames?: string[];
      }
      • Optionaldraft?: boolean

        Whether draft or published workflows are returned. If not provided, both workflow types are returned.

      • Optionalexpand?: string

        Use expand to include additional information in the response. This parameter accepts transition, which, for each rule, returns information about the transition the rule is assigned to.

      • Optionalkeys?: string[]

        The transition rule class keys, as defined in the Connect or the Forge app descriptor, of the transition rules to return.

      • OptionalmaxResults?: number

        The maximum number of items to return per page.

      • OptionalstartAt?: number

        The index of the first item to return in a page of results (page offset).

      • types: ("postfunction" | "condition" | "validator")[]

        The types of the transition rules to return.

      • OptionalwithTags?: string[]

        The list of tags to filter by.

      • OptionalworkflowNames?: string[]

        The list of workflow names to filter by.

    Returns Promise<PageBeanWorkflowTransitionRules>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 10,
    "startAt": 0,
    "total": 1,
    "values": [
    {
    "workflowId": {
    "name": "My Workflow name",
    "draft": false
    },
    "postFunctions": [
    {
    "id": "b4d6cbdc-59f5-11e9-8647-d663bd873d93",
    "key": "postfunction-key",
    "configuration": {
    "value": "{ \"color\": \"red\" }",
    "disabled": false,
    "tag": "Sample tag"
    },
    "transition": {
    "id": 1,
    "name": "Open"
    }
    }
    ],
    "conditions": [
    {
    "id": "d663bd873d93-59f5-11e9-8647-b4d6cbdc",
    "key": "condition-key",
    "configuration": {
    "value": "{ \"size\": \"medium\" }",
    "disabled": false,
    "tag": "Another tag"
    },
    "transition": {
    "id": 1,
    "name": "Open"
    }
    }
    ],
    "validators": [
    {
    "id": "11e9-59f5-b4d6cbdc-8647-d663bd873d93",
    "key": "validator-key",
    "configuration": {
    "value": "\"{ \\\"shape\\\": \\\"square\\\" }\"",
    "disabled": false
    },
    "transition": {
    "id": 1,
    "name": "Open"
    }
    }
    ]
    }
    ]
    }

    GET /rest/api/3/workflow/rule/config @scopes-current manage:jira-configuration @scopes-beta read:workflow:jira

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void