Property description

The transitions property defines which workflow states an object can move between and the conditions required for the transition.

Minimal JSON

{
  "fromStateKey": "",
  "toStateKey": ""
}
{
  "key": "basic_workflow",
  "transitions": [
    {
      "name": "Approved",
      "fromStateKey": "draft",
      "toStateKey": "approved",
      "changeThresholdTypeKey": "one_user",
      "translations": [
        {
          "languageKey": "cs-CZ",
          "name": "Schv\u00E1leno"
        }
      ],
      "notifications": [
        {
          "notificationTemplateKey": "web_socket_object_workflow_state_has_changed",
          "recipientUserRelationTypeKey": "admin"
        },
        {
          "notificationTemplateKey": "web_socket_object_workflow_state_has_changed",
          "recipientUserRelationTypeKey": "steward"
        },
        {
          "notificationTemplateKey": "web_socket_object_workflow_state_has_changed",
          "recipientUserRelationTypeKey": "business_owner"
        }
      ]
    }
  ]
}

Example taken from the core package.

Nested properties

PropertyDescriptionValuesMandatory
fromStateKeyKey of the workflow state where the transition begins.stringYes
toStateKeyKey of the workflow state where the transition ends.stringYes
changeThresholdTypeSpecifies how many users need to approve the workflow change. Supported values are:one_user: Only one user is required to change a workflow state., all_users_one_from_groups: All users must approve the workflow state transition. In case of a user group, only one user’s approval from the group is required., all_users_all_from_groups: All users from all user groups must approve the workflow state transition.stringNo
isForceCommentDetermines whether a comment is mandatory when changing workflow states. When multiple users are required for workflow state change, they must all provide a comment when approving the change.booleanNo
nameName of the workflow transition (e.g. From Draft to Approved). Displayed in the workflow change dropdown.stringNo
notificationsArray of notifications sent to the user when changes are made. For more information, see Notifications. Keep in mind that not all properties will be applicable for this configuration.stringNo
triggersArray of workflow state transition triggers. For example, the trigger can assign a different user to the object as the result of the transition.arrayNo
translationsArray of translation keys and their definitions that determine how the text is displayed in the UI for the specific asset. For more information, see Translations.arrayNo
triggersArray of workflow state transition triggers. For example, the trigger can assign a different user to the object as the result of the transition.arrayNo
userRelationTypesArray of keys of user relation types (= “workflow roles” like steward or business owner) allowed to change the workflow state. If not specified, then all users can change the object workflow state. To hide a user relation type from the workflow approval, use the isHidden property.arrayNo