Skip to main content

GetWorkflowStatesAndTransitions

Gets the states and transitions of the given workflow.

Syntax

// Assumes shellUI has been initialized with IShellUI instance
const results =
await shellUI.Vault.ObjectOperations.GetWorkflowStatesAndTransitions({
workflow_id: 0,
current_state: {
is_null_value: false,
type: 15 /* Enum: Datatype */,
data: {
acl: {
checked_out_to_user: 0,
is_fully_authoritative: false,
custom_component: {
named_acl_id: 0,
has_named_acl: false,
current_user_id: 0,
has_current_user: false,
permissions: [] /* Array of AccessControlEntry */,
overridability_permissions: [] /* Array of AccessControlEntry */,
status: {
all: false,
deleted: false,
source_item_linked_via_pseudo_users: false,
},
},
restrictive_components:
[] /* Array of AccessControlListComponentMapEntry */,
secondary_access_control_list: {} /* AccessControlList */,
additive_components:
[] /* Array of AccessControlListComponentMapEntry */,
},
},
},
obj_ver: {
obj_id: {
type: 0,
item_id: {
internal_id: 0,
external_repository_id: {
connection: "<connection>",
item: "<item>",
},
},
},
version: {
type: 7 /* Enum: ObjVerVersionType */,
internal_version: 0,
external_repository_version: "<external repository version>",
external_repository_sort_key: 0,
},
},
});

Message

NameDescriptionType
workflow_idThe ID of the workflow.number
current_stateThe current workflow state to check transitions from, as a TypedValue. When null, all states are treated as selectable because transition rights cannot be determined.TypedValue
obj_verThe object version for which to retrieve workflow state transitions, as an ObjVer. When null, all transitions involving pseudo users are treated as selectable.ObjVer

Return type

NameDescriptionType
statesResults.StateBasic[]
transitionsResults.StateTransitionBasic[]

Example

{
"states": [] /* Array of StateBasic */,
"transitions": [] /* Array of StateTransitionBasic */
}