IRPCObjectOperations.GetWorkflowStates

View as Markdown

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

Gets the states of the given workflow in the appropriate order.

ServiceObjects, versions, properties and files MFiles.IRPCObjectOperations
gRPC method/MFiles.IRPCObjectOperations/GetWorkflowStates
HTTP (mf-http-grpc)POST /grpc/v1/get-workflow-states
RequestGetWorkflowStatesRequest
ResponseGetWorkflowStatesResponse
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 the states of a workflow in their configured order. An unknown or hidden workflow returns an empty list, not an error. The workflow IDs are in Workflow (38) values and in GetWorkflowsForClient.

can_current_user_select is computed against current_state: without it every state is selectable. To change an object's state, set Workflow State (39) with SetProperties.

Request: GetWorkflowStatesRequest

Request for getting workflow states.

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 (states). Set it to get can_current_user_select for the transitions from this state; unset marks every state selectable.
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 states are for. Needed only when transition permissions depend on the object (are_state_permissions_object_specific). It does not replace current_state.
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: GetWorkflowStatesResponse

Response for getting workflow states.

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

FieldTypeDescription
results[]repeated StateBasicStates.
results[].idint32The state ID: the item ID of a Workflow State (39) value (value list 8).
results[].namestringThe name of the state.
results[].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.
results[].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.
results[].descriptionstringThe user description of the state.