IRPCObjectOperations.GetWorkflowStatesAndTransitions

View as Markdown

Vault API / core read session or assertion idempotent returns metadata structure version

Gets the states and transitions of the given workflow.

ServiceObjects, versions, properties and files MFiles.IRPCObjectOperations
gRPC method/MFiles.IRPCObjectOperations/GetWorkflowStatesAndTransitions
HTTP (mf-http-grpc)POST /grpc/v1/get-workflow-states-and-transitions
RequestGetWorkflowStatesAndTransitionsRequest
ResponseGetWorkflowStatesAndTransitionsResponse
Book and levelVault API, core
Kindread
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentyes
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Returns all states of the workflow and the transitions out of current_state. Without current_state, transitions is empty, even if obj_ver is set. Each transition's id can be set as State transition (99), a lookup into value list 17, with SetProperties; setting Workflow State (39) to the target state works too. An unknown workflow returns empty lists.

Example from the Sample Vault: workflow 102 with current_state 108 returned all five states, with the two reachable ones and the current one selectable, and the two transitions from state 108.

Request: GetWorkflowStatesAndTransitionsRequest

Request for getting workflow states and transitions.

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
workflow_idint32The workflow, the item ID of a Workflow (38) value.
current_stateTypedValueThe object's current state as a lookup value into value list 8. Required to get any transitions.
current_state.is_null_valueboolTrue if the value is empty. data is then unset.
current_state.typeDatatypeThe data type of the value.
current_state.dataTypedValueUnionThe value, in the member that matches type. Unset for an empty value.
current_state.data.textstring (oneof data)The value of DATATYPE_TEXT.
current_state.data.integerint32 (oneof data)The value of DATATYPE_INTEGER.
current_state.data.real_numberdouble (oneof data)The value of DATATYPE_REAL_NUMBER.
current_state.data.decimal_numberstring (oneof data)Fixed precision number.
current_state.data.dategoogle.protobuf.Timestamp (oneof data)The value of DATATYPE_DATE: midnight UTC of the date.
current_state.data.timegoogle.protobuf.Timestamp (oneof data)Time.
current_state.data.timestampgoogle.protobuf.Timestamp (oneof data)The value of DATATYPE_TIMESTAMP, in UTC.
current_state.data.booleanbool (oneof data)The value of DATATYPE_BOOLEAN.
current_state.data.lookupLookup (oneof data)The value of DATATYPE_LOOKUP: one value list item or object.
current_state.data.multi_select_lookupMultiSelectLookup (oneof data)The value of DATATYPE_MULTI_SELECT_LOOKUP: any number of value list items or objects.
current_state.data.integer64int64 (oneof data)Integer (8 bytes).
current_state.data.filetimegoogle.protobuf.Timestamp (oneof data)FILETIME (64-bit integer).
current_state.data.multi_line_textstring (oneof data)The value of DATATYPE_MULTI_LINE_TEXT.
current_state.data.aclAccessControlList (oneof data)Access Control List.
obj_verObjVerThe object the transitions are for. Needed only when permissions depend on the object.
obj_ver.obj_idObjIDThe object.
obj_ver.obj_id.typeint32The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID).
obj_ver.obj_id.item_idItemIDThe ID of the object within its type, in item_id.internal_id.
obj_ver.versionObjVerVersionThe version. Usually OBJ_VER_VERSION_TYPE_SPECIFIC with internal_version.
obj_ver.version.typeObjVerVersionTypeWhat internal_version means. OBJ_VER_VERSION_TYPE_SPECIFIC for a version number.Values: OBJ_VER_VERSION_TYPE_UNINITIALIZED (0), OBJ_VER_VERSION_TYPE_LATEST (1), OBJ_VER_VERSION_TYPE_ANY (2), OBJ_VER_VERSION_TYPE_ALL (3), OBJ_VER_VERSION_TYPE_SPECIFIC (4), OBJ_VER_VERSION_TYPE_VALUE_LIST_ITEM (6), OBJ_VER_VERSION_TYPE_OBJECT_LEVEL_REFERENCE (7).
obj_ver.version.internal_versionint32The version number, starting from 1, when type is OBJ_VER_VERSION_TYPE_SPECIFIC. The server returns -1 with OBJ_VER_VERSION_TYPE_LATEST.
obj_ver.version.external_repository_versionstringUsed only for objects in external repositories. Leave empty.
obj_ver.version.external_repository_sort_keyint64Used only for objects in external repositories. Leave 0.

Response: GetWorkflowStatesAndTransitionsResponse

Request for getting workflow states and transitions.

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
states[]repeated StateBasicAll states of the workflow, in order.
states[].idint32The state ID: the item ID of a Workflow State (39) value (value list 8).
states[].namestringThe name of the state.
states[].can_current_user_selectboolTrue if the caller can move an object into this state from the current_state given in the request. Without current_state, every state is true.
states[].are_state_permissions_object_specificboolSpecifies if the selectable flag is affected by pseudo users. If true, the selectable flag can be trusted only if the available state transitions are requested for a specific objver.
states[].descriptionstringThe user description of the state.
transitions[]repeated StateTransitionBasicThe transitions out of current_state; empty if it is unset.
transitions[].idint32The transition ID: the item ID of a State transition (99) value (value list 17).
transitions[].namestringThe name of the state transition.
transitions[].from_state_idint32From state ID.
transitions[].to_state_idint32To state ID.
transitions[].can_current_user_selectboolTrue if the caller can use this transition.
transitions[].are_state_transition_permissions_object_specificboolSpecifies if the selectable flag is affected by pseudo users. If true, the selectable flag can be trusted only if the available state transitions are requested for a specific objver.
transitions[].descriptionstringThe client description of the state transition.