IRPCObjectOperations.GetWorkflowStates
Vault API / core read session or assertion idempotent returns metadata structure version
Gets the states of the given workflow in the appropriate order.
| Service | Objects, versions, properties and files MFiles.IRPCObjectOperations |
|---|---|
| gRPC method | /MFiles.IRPCObjectOperations/GetWorkflowStates |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-workflow-states |
| Request | GetWorkflowStatesRequest |
| Response | GetWorkflowStatesResponse |
| Book and level | Vault API, core |
| Kind | read |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | yes |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (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.
| Field | Type | Description |
|---|---|---|
workflow_id | int32 | The workflow, the item ID of a Workflow (38) value. |
current_state | TypedValue | The 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_value | bool | True if the value is empty. data is then unset. |
current_state.type | Datatype | The data type of the value. |
current_state.data | TypedValueUnion | The value, in the member that matches type. Unset for an empty value. |
current_state.data.text | string (oneof data) | The value of DATATYPE_TEXT. |
current_state.data.integer | int32 (oneof data) | The value of DATATYPE_INTEGER. |
current_state.data.real_number | double (oneof data) | The value of DATATYPE_REAL_NUMBER. |
current_state.data.decimal_number | string (oneof data) | Fixed precision number. |
current_state.data.date | google.protobuf.Timestamp (oneof data) | The value of DATATYPE_DATE: midnight UTC of the date. |
current_state.data.time | google.protobuf.Timestamp (oneof data) | Time. |
current_state.data.timestamp | google.protobuf.Timestamp (oneof data) | The value of DATATYPE_TIMESTAMP, in UTC. |
current_state.data.boolean | bool (oneof data) | The value of DATATYPE_BOOLEAN. |
current_state.data.lookup | Lookup (oneof data) | The value of DATATYPE_LOOKUP: one value list item or object. |
current_state.data.multi_select_lookup | MultiSelectLookup (oneof data) | The value of DATATYPE_MULTI_SELECT_LOOKUP: any number of value list items or objects. |
current_state.data.integer64 | int64 (oneof data) | Integer (8 bytes). |
current_state.data.filetime | google.protobuf.Timestamp (oneof data) | FILETIME (64-bit integer). |
current_state.data.multi_line_text | string (oneof data) | The value of DATATYPE_MULTI_LINE_TEXT. |
current_state.data.acl | AccessControlList (oneof data) | Access Control List. |
obj_ver | ObjVer | The 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_id | ObjID | The object. |
obj_ver.obj_id.type | int32 | The 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_id | ItemID | The ID of the object within its type, in item_id.internal_id. |
obj_ver.version | ObjVerVersion | The version. Usually OBJ_VER_VERSION_TYPE_SPECIFIC with internal_version. |
obj_ver.version.type | ObjVerVersionType | What 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_version | int32 | The 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_version | string | Used only for objects in external repositories. Leave empty. |
obj_ver.version.external_repository_sort_key | int64 | Used 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.
| Field | Type | Description |
|---|---|---|
results[] | repeated StateBasic | States. |
results[].id | int32 | The state ID: the item ID of a Workflow State (39) value (value list 8). |
results[].name | string | The name of the state. |
results[].can_current_user_select | bool | True 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_specific | bool | Specifies 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[].description | string | The user description of the state. |
Related methods
- GetWorkflowsForClient -- Gets all the workflows in a format suitable for client.
- SetProperties -- Adds, replaces or removes property values of an object.
- GetWorkflowStatesAndTransitions -- Gets the states and transitions of the given workflow.