# Workflow administration (IRPCWorkflowsAdmin)

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/

Administers workflows: reads their full definitions with states and transitions, and adds,
modifies and removes them.

Use this interface to add, modify and delete workflows in a vault.

- **gRPC service:** `MFiles.IRPCWorkflowsAdmin`
- **Book and level:** [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md), specialized
- **Methods:** 5
- **Proto file:** [`mfiles/IRPCWorkflowsAdmin.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCWorkflowsAdmin.proto)

<a id="overview"></a>

## Overview

This is the administrator's side of workflows. M-Files Admin calls it; applications that move
objects through workflows read them with
[GetWorkflowsForClient](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetWorkflowsForClient/index.md) and
[GetWorkflowStatesAndTransitions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetWorkflowStatesAndTransitions/index.md),
which need no special rights and return what the caller may do (see
[Workflows](https://developer.m-files.com/APIs/gRPC-API/concepts/workflows/index.md)).

| | Vault API (read side) | This service |
| --- | --- | --- |
| Data | names, states and the transitions the user may take | [WorkflowAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WorkflowAdmin/index.md): states with their actions and conditions, transitions with their permissions, triggers and signatures, the workflow ACL, aliases and diagram layout |
| Rights | none | `read_all_metadata_structure` to read, `manage_workflows` to write |

- **Session and rights.** Every method requires a vault session.
  [GetWorkflows](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/GetWorkflows/index.md) needs the vault right
  `read_all_metadata_structure` (a normal user gets "Access denied."). The write methods
  need `manage_workflows` and `license_allows_modifications`. Setting or changing VBScript code in
  states and transitions also needs a code-execution right (see
  [AddWorkflow](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/AddWorkflow/index.md)).
- **Calls**: [GetWorkflows](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/GetWorkflows/index.md), then
  [AddWorkflow](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/AddWorkflow/index.md) or
  [ModifyWorkflow](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/ModifyWorkflow/index.md) with a complete
  [WorkflowAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WorkflowAdmin/index.md), and
  [RemoveWorkflow](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/RemoveWorkflow/index.md) or
  [RemoveWorkflows](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/RemoveWorkflows/index.md).
- **New states and transitions** get negative placeholder IDs in the request (-1, -2, ...);
  transitions refer to new states by these placeholders. The response contains the workflow as
  stored, with real IDs.
- **Metadata structure version.** Every successful add, modify and remove increments the vault's metadata
  version when it commits; clients that cache workflows reload them. The methods do not send the
  `mfiles-metadata-version-bin` trailer; see
  [Metadata structure version and caching](https://developer.m-files.com/APIs/gRPC-API/concepts/metadata-structure-version-and-caching/index.md).

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [AddWorkflow](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/AddWorkflow/index.md) | Creates a workflow with its states and transitions. | `admin` `session` |
| [GetWorkflows](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/GetWorkflows/index.md) | Gets the full administrative definitions of all workflows. | `admin` `session` |
| [ModifyWorkflow](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/ModifyWorkflow/index.md) | Saves a changed workflow with its states and transitions. | `admin` `session` |
| [RemoveWorkflow](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/RemoveWorkflow/index.md) | Deletes a workflow with its states and transitions. | `admin` `session` |
| [RemoveWorkflows](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkflowsAdmin/RemoveWorkflows/index.md) | Deletes several workflows in one transaction. | `admin` `session` |
