IRPCWorkflowsAdmin.AddWorkflow
Administration API / specialized admin session
Creates a workflow with its states and transitions.
| Service | Workflow administration MFiles.IRPCWorkflowsAdmin |
|---|---|
| gRPC method | /MFiles.IRPCWorkflowsAdmin/AddWorkflow |
| HTTP (mf-http-grpc) | POST /grpc/v1/add-workflow |
| Request | AddWorkflowRequest |
| Response | AddWorkflowResponse |
| Book and level | Administration API, specialized |
| Kind | admin |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | no |
| Returns metadata structure version | no |
| Streaming | none (unary) |
Remarks
- Requires
manage_workflowsandlicense_allows_modifications. - VBScript code in states (actions, pre- and postconditions) and transitions also requires the
server right
run_code; code with a valid signature needs only the vault rightrun_signed_code. - The session language must be the vault's default language; otherwise the call fails with "Not implemented.".
- Fails when another workflow has the same name (case-insensitive).
- Increments the metadata structure version.
Request: AddWorkflowRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.
| Field | Type | Description |
|---|---|---|
workflow | WorkflowAdmin | The new workflow. workflow.workflow.id is ignored; give the states and transitions negative placeholder IDs. |
workflow.workflow | Workflow | Basic information on the workflow. |
workflow.workflow.id | int32 | Workflow ID. |
workflow.workflow.name | string | The name of the workflow. |
workflow.workflow.object_class_id | int32 | The class this workflow can be used with. |
workflow.workflow.description | string | The user description of the workflow. |
workflow.workflow.reserved1_obsolete | uint32 | Reserved, must be zero. |
workflow.workflow.reserved2_obsolete | uint32 | Reserved, must be zero. |
workflow.description | string | The description of the workflow. |
workflow.states[] | repeated State | The states of this workflow. |
workflow.states[].id | int32 | State ID. |
workflow.states[].name | string | The name of the state. |
workflow.states[].description | string | The description of the state. |
workflow.states[].options | ACTIONFLAGS | Flags that tell which actions are enabled for this state. |
workflow.states[].action_set_acl | ActionSetACL | The properties of the Set Permissions action. |
workflow.states[].action_assign_to_user | ActionSetAssignment | The properties of the Assign to User action. |
workflow.states[].actions[] | repeated ActionSetAssignment | Action array. |
workflow.states[].action_send_notification | ActionSendNotification | The properties of the Send Notification action. |
workflow.states[].action_set_properties | ActionSetProperties | Action: set properties. |
workflow.states[].action_convert_to_pdf | ActionConvertToPDF | Action: convert to PDF. |
workflow.states[].action_code | string | Action: run VBScript code. |
workflow.states[].restrict_transitions | bool | True if transitions involving this state must be individually allowed. |
workflow.states[].transitions_require_edit_access_to_object | bool | True if state transitions require edit access to the object. |
workflow.states[].check_in_out_acl | bool | True if the in/out permissions of this state should be checked. |
workflow.states[].in_out_acl | AccessControlList | The in/out permissions of this state. |
workflow.states[].preconditions | StateConditions | State preconditions. (rules) |
workflow.states[].postconditions | StateConditions | State postconditions. (rules) |
workflow.states[].aliases | string | Semicolon-separated list of semantic aliases. |
workflow.states[].user_description | string | The user description of the state. |
workflow.states[].state_flags | STATEFLAGS | Flags that tell different options set for this state. |
workflow.states[].agent_action_guid | string | The agent action GUID of the state, or GUID_NULL if not set. |
workflow.transitions[] | repeated StateTransition | The state transitions of this workflow. |
workflow.transitions[].id | int32 | State transition ID. |
workflow.transitions[].from_state | int32 | The source state. |
workflow.transitions[].to_state | int32 | The target state. |
workflow.transitions[].evaluation_order | int32 | The evaluation order. |
workflow.transitions[].name | string | The name of the state. |
workflow.transitions[].description | string | The description of the state. |
workflow.transitions[].acl | AccessControlList | Transition permissions. |
workflow.transitions[].signature_settings | ElectronicSignatureSettings | Signature settings for this state transition. |
workflow.transitions[].trigger_mode | AutoStateTransitionMode | The selected mode for automatically triggered state transition.Values: AUTO_STATE_TRANSITION_MODE_NONE (0), AUTO_STATE_TRANSITION_MODE_RELATIVE_TIME (1), AUTO_STATE_TRANSITION_MODE_CRITERIA_FULFILLED (4), AUTO_STATE_TRANSITION_MODE_SCRIPT_FULFILLED (5), AUTO_STATE_TRANSITION_MODE_ASSIGNMENT_COMPLETE (6), AUTO_STATE_TRANSITION_MODE_ASSIGNMENT_REJECTED (7). |
workflow.transitions[].trigger_in_days | uint32 | The number of days before automatically triggered state transition. |
workflow.transitions[].trigger_criteria[] | repeated SearchCondition | The criteria for automatically triggered state transition. |
workflow.transitions[].trigger_code | string | The VB script for automatically triggered state transition. |
workflow.transitions[].aliases | string | Semicolon-separated list of semantic aliases. |
workflow.transitions[].vault_guids[] | repeated string | An array of GUIDS of vaults where this state transition will be triggered. |
workflow.transitions[].user_description | string | The user description of the state. |
workflow.acl | AccessControlList | Permissions. |
workflow.acl.checked_out_to_user | int32 | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
workflow.acl.is_fully_authoritative | bool | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
workflow.acl.custom_component | AccessControlListComponent | Accesses the custom component of this ACL. |
workflow.acl.restrictive_components[] | repeated AccessControlListComponentMapEntry | Accesses the restrictive automatic components of this ACL. |
workflow.acl.secondary_access_control_list | AccessControlList (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
workflow.acl.additive_components[] | repeated AccessControlListComponentMapEntry | Accesses the additive automatic components of this ACL. |
workflow.aliases | string | Semicolon-separated list of semantic aliases. |
workflow.graphical_layout_data | string | Layout data of the workflow. |
Response: AddWorkflowResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.
| Field | Type | Description |
|---|---|---|
workflow_result | WorkflowAdmin | The workflow as stored, with real IDs for the workflow, its states and its transitions. |
workflow_result.workflow | Workflow | Basic information on the workflow. |
workflow_result.workflow.id | int32 | Workflow ID. |
workflow_result.workflow.name | string | The name of the workflow. |
workflow_result.workflow.object_class_id | int32 | The class this workflow can be used with. |
workflow_result.workflow.description | string | The user description of the workflow. |
workflow_result.workflow.reserved1_obsolete | uint32 | Reserved, must be zero. |
workflow_result.workflow.reserved2_obsolete | uint32 | Reserved, must be zero. |
workflow_result.description | string | The description of the workflow. |
workflow_result.states[] | repeated State | The states of this workflow. |
workflow_result.states[].id | int32 | State ID. |
workflow_result.states[].name | string | The name of the state. |
workflow_result.states[].description | string | The description of the state. |
workflow_result.states[].options | ACTIONFLAGS | Flags that tell which actions are enabled for this state. |
workflow_result.states[].action_set_acl | ActionSetACL | The properties of the Set Permissions action. |
workflow_result.states[].action_assign_to_user | ActionSetAssignment | The properties of the Assign to User action. |
workflow_result.states[].actions[] | repeated ActionSetAssignment | Action array. |
workflow_result.states[].action_send_notification | ActionSendNotification | The properties of the Send Notification action. |
workflow_result.states[].action_set_properties | ActionSetProperties | Action: set properties. |
workflow_result.states[].action_convert_to_pdf | ActionConvertToPDF | Action: convert to PDF. |
workflow_result.states[].action_code | string | Action: run VBScript code. |
workflow_result.states[].restrict_transitions | bool | True if transitions involving this state must be individually allowed. |
workflow_result.states[].transitions_require_edit_access_to_object | bool | True if state transitions require edit access to the object. |
workflow_result.states[].check_in_out_acl | bool | True if the in/out permissions of this state should be checked. |
workflow_result.states[].in_out_acl | AccessControlList | The in/out permissions of this state. |
workflow_result.states[].preconditions | StateConditions | State preconditions. (rules) |
workflow_result.states[].postconditions | StateConditions | State postconditions. (rules) |
workflow_result.states[].aliases | string | Semicolon-separated list of semantic aliases. |
workflow_result.states[].user_description | string | The user description of the state. |
workflow_result.states[].state_flags | STATEFLAGS | Flags that tell different options set for this state. |
workflow_result.states[].agent_action_guid | string | The agent action GUID of the state, or GUID_NULL if not set. |
workflow_result.transitions[] | repeated StateTransition | The state transitions of this workflow. |
workflow_result.transitions[].id | int32 | State transition ID. |
workflow_result.transitions[].from_state | int32 | The source state. |
workflow_result.transitions[].to_state | int32 | The target state. |
workflow_result.transitions[].evaluation_order | int32 | The evaluation order. |
workflow_result.transitions[].name | string | The name of the state. |
workflow_result.transitions[].description | string | The description of the state. |
workflow_result.transitions[].acl | AccessControlList | Transition permissions. |
workflow_result.transitions[].signature_settings | ElectronicSignatureSettings | Signature settings for this state transition. |
workflow_result.transitions[].trigger_mode | AutoStateTransitionMode | The selected mode for automatically triggered state transition.Values: AUTO_STATE_TRANSITION_MODE_NONE (0), AUTO_STATE_TRANSITION_MODE_RELATIVE_TIME (1), AUTO_STATE_TRANSITION_MODE_CRITERIA_FULFILLED (4), AUTO_STATE_TRANSITION_MODE_SCRIPT_FULFILLED (5), AUTO_STATE_TRANSITION_MODE_ASSIGNMENT_COMPLETE (6), AUTO_STATE_TRANSITION_MODE_ASSIGNMENT_REJECTED (7). |
workflow_result.transitions[].trigger_in_days | uint32 | The number of days before automatically triggered state transition. |
workflow_result.transitions[].trigger_criteria[] | repeated SearchCondition | The criteria for automatically triggered state transition. |
workflow_result.transitions[].trigger_code | string | The VB script for automatically triggered state transition. |
workflow_result.transitions[].aliases | string | Semicolon-separated list of semantic aliases. |
workflow_result.transitions[].vault_guids[] | repeated string | An array of GUIDS of vaults where this state transition will be triggered. |
workflow_result.transitions[].user_description | string | The user description of the state. |
workflow_result.acl | AccessControlList | Permissions. |
workflow_result.acl.checked_out_to_user | int32 | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
workflow_result.acl.is_fully_authoritative | bool | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
workflow_result.acl.custom_component | AccessControlListComponent | Accesses the custom component of this ACL. |
workflow_result.acl.restrictive_components[] | repeated AccessControlListComponentMapEntry | Accesses the restrictive automatic components of this ACL. |
workflow_result.acl.secondary_access_control_list | AccessControlList (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
workflow_result.acl.additive_components[] | repeated AccessControlListComponentMapEntry | Accesses the additive automatic components of this ACL. |
workflow_result.aliases | string | Semicolon-separated list of semantic aliases. |
workflow_result.graphical_layout_data | string | Layout data of the workflow. |