---
title: "PATCH /ver2/WorkflowService.svc/workflows/{workflowIdOrUniqueId}"
method: PATCH
path: "/ver2/WorkflowService.svc/workflows/{workflowIdOrUniqueId}"
tags: ["Workflow"]
---

# PATCH /ver2/WorkflowService.svc/workflows/{workflowIdOrUniqueId}

`PATCH /ver2/WorkflowService.svc/workflows/{workflowIdOrUniqueId}`

## Request

- Base URL: `https://api.enviance.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.enviance.com/ver2/WorkflowService.svc/workflows/{workflowIdOrUniqueId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/enviance/apis/restapi/docs/ver2/WorkflowService.svc/workflows/:workflowIdOrUniqueId/patch.ts> (a function with typed inputs; its response is checked against the schema)

envianceSdk.workflows.updateWorkflowStep
```
[
  "22cf40b5-b001-47ce-8853-020dc9e9aa8e",
  "Oleg FT Step1",
  {
    "comment": "my comment",
    "transition": {
      "dueDate": "2013-02-15T00:00:00",
      "stepActionName": "Oleg FT Step1 Action1",
      "assignTo": [
        {
          "userIdOrName": "oleg"
        },
        {
          "userIdOrName": "vitek"
        },
        {
          "groupIdOrName": "Administrators"
        },
        {
          "groupIdOrName": "BL Group"
        }
      ]
    },
    "fields": [
      {
        "name": "Oleg FT 1 = dt date",
        "values": [
          "2013-02-01T00:00:00"
        ]
      },
      {
        "name": "Oleg FT 1 = url",
        "urlItems": [
          {
            "label": "may label",
            "url": "http://mail.ru"
          }
        ]
      },
      {
        "name": "oleg FT 1 = num ddl linked 2",
        "values": [
          "100",
          "100"
        ]
      },
      {
        "name": "oleg FT 1 = text multi",
        "values": [
          "val1",
          "val3"
        ]
      }
    ]
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflowStepExt
```
[
  {
    "workflowIdOrUniqueId": "22cf40b5-b001-47ce-8853-020dc9e9aa8e",
    "stepIdOrName": "Oleg FT Step1",
    "stepInfo": {
      "comment": "my comment",
      "transition": {
        "dueDate": "2013-02-15T00:00:00",
        "stepActionName": "Oleg FT Step1 Action1",
        "assignTo": [
          {
            "userIdOrName": "oleg"
          },
          {
            "userIdOrName": "vitek"
          },
          {
            "groupIdOrName": "Administrators"
          },
          {
            "groupIdOrName": "BL Group"
          }
        ]
      },
      "fields": [
        {
          "name": "Oleg FT 1 = dt date",
          "values": [
            "2013-02-01T00:00:00"
          ]
        },
        {
          "name": "Oleg FT 1 = url",
          "urlItems": [
            {
              "label": "may label",
              "url": "http://mail.ru"
            }
          ]
        },
        {
          "name": "oleg FT 1 = num ddl linked 2",
          "values": [
            "100",
            "100"
          ]
        },
        {
          "name": "oleg FT 1 = text multi",
          "values": [
            "val1",
            "val3"
          ]
        }
      ]
    },
    "clientRequestId": "64AA5290-15F2-451B-9EF3-4494F66FE59E"
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflowCurrentStep
```
[
  "22cf40b5-b001-47ce-8853-020dc9e9aa8e",
  {
    "comment": "my comment",
    "transition": {
      "dueDate": "2013-02-15T00:00:00",
      "stepActionName": "Oleg FT Step1 Action1",
      "assignTo": [
        {
          "userIdOrName": "oleg"
        },
        {
          "userIdOrName": "vitek"
        },
        {
          "groupIdOrName": "Administrators"
        },
        {
          "groupIdOrName": "BL Group"
        }
      ]
    },
    "fields": [
      {
        "name": "Oleg FT 1 = dt date",
        "values": [
          "2013-02-01T00:00:00"
        ]
      },
      {
        "name": "Oleg FT 1 = url",
        "urlItems": [
          {
            "label": "may label",
            "url": "http://mail.ru"
          }
        ]
      },
      {
        "name": "oleg FT 1 = num ddl linked 2",
        "values": [
          "100",
          "100"
        ]
      },
      {
        "name": "oleg FT 1 = text multi",
        "values": [
          "val1",
          "val3"
        ]
      }
    ]
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflowCurrentStepExt
```
[
  {
    "workflowIdOrUniqueId": "a4f13c99-5c2c-46dc-bbff-4aea388ef3ca",
    "stepInfo": {
      "comment": "my comment",
      "transition": {
        "stepActionName": "go to step 2",
        "assignTo": [
          {
            "userIdOrName": "oleg"
          },
          {
            "userIdOrName": "vitek"
          },
          {
            "groupIdOrName": "Administrators"
          },
          {
            "groupIdOrName": "BL Group"
          }
        ]
      },
      "fields": [
        {
          "name": "Date",
          "values": [
            "2013-02-01T00:00:00"
          ]
        },
        {
          "name": "CitationHyperlink",
          "urlItems": [
            {
              "label": "may label",
              "url": "http://test.com"
            }
          ]
        },
        {
          "name": "NumberDDL linked",
          "values": [
            "1.23456E-05",
            "1.23456E-05"
          ]
        },
        {
          "name": "Text(MSLB)",
          "values": [
            "test1",
            "test2"
          ]
        }
      ]
    },
    "clientRequestId": "19AA5290-15F2-451B-9EF3-4494F66FE59F"
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflow
```
[
  "5bfdbd05-225f-40ee-bff1-2efe18a75375",
  {
    "dueDate": "2012-09-19T18:00:00",
    "parentWorkflowSourceCustomField": {
      "id": null,
      "name": "UDF name"
    },
    "name": "test",
    "objects": [
      "/Generation - 1/NE TV"
    ],
    "documents": [
      "/Folder/Folder/Doc.txt"
    ]
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflowExt
```
[
  {
    "workflowIdOrUniqueId": "5bfdbd05-225f-40ee-bff1-2efe18a75375",
    "workflowInfo": {
      "dueDate": "2012-09-19T18:00:00",
      "parentWorkflowSourceCustomField": {
        "id": null,
        "name": "UDF name"
      },
      "name": "test",
      "objects": [
        "/Generation - 1/NE TV"
      ],
      "documents": [
        "/Folder/Folder/Doc.txt"
      ]
    },
    "clientRequestId": "64AA5290-15F2-451B-9EF3-4494F66FE59E"
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflow21
```
[
  "5bfdbd05-225f-40ee-bff1-2efe18a75375",
  {
    "dueDate": "2012-09-19T18:00:00",
    "parentWorkflowSourceCustomField": {
      "id": null,
      "name": "UDF name"
    },
    "name": "test",
    "objects": [
      "/Generation - 1/NE TV"
    ],
    "documents": [
      {
        "documentIdOrPath": "Folder1Document1.txt"
      },
      {
        "documentIdOrPath": "Folder1Document2.txt",
        "customFieldIdOrName": "udf-textbox-numeric"
      }
    ]
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflow21Ext
```
[
  {
    "workflowIdOrUniqueId": "5bfdbd05-225f-40ee-bff1-2efe18a75375",
    "workflowInfo": {
      "dueDate": "2012-09-19T18:00:00",
      "parentWorkflowSourceCustomField": {
        "id": null,
        "name": "UDF name"
      },
      "name": "test",
      "objects": [
        "/Generation - 1/NE TV"
      ],
      "documents": [
        {
          "documentIdOrPath": "Folder1Document1.txt"
        },
        {
          "documentIdOrPath": "Folder1Document2.txt",
          "customFieldIdOrName": "udf-textbox-numeric"
        }
      ]
    },
    "clientRequestId": "64AA5290-15F2-451B-9EF3-4494F66FE49F"
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflows
```
[
  [
    {
      "workflowIdOrUniqueId": "2022.01.24.02.37D8CC867814",
      "dueDate": "2021-01-24T04:00:00",
      "name": "ryWIbulk-1-rename",
      "assignedTo": [
        {
          "userIdOrName": "yuromanova"
        },
        {
          "groupIdOrName": "TESTGroup"
        }
      ],
      "objects": [
        "/-- div"
      ],
      "calendars": [
        "My",
        "Object",
        "System"
      ],
      "comment": "commentstest",
      "documents": [
        "/RY Folder WF/RY Folder 2/eql.txt"
      ],
      "step": {
        "fields": [
          {
            "name": "GX2BooleanCB",
            "values": [
              "true"
            ]
          },
          {
            "name": "GX2NumberTextBox",
            "values": [
              "0"
            ]
          }
        ]
      }
    },
    {
      "workflowIdOrUniqueId": "2022.01.24.02.37D8CC867815",
      "dueDate": "2021-01-24T04:00:00",
      "name": "ryWIbulk-2-rename",
      "assignedTo": [
        {
          "userIdOrName": "yuromanova"
        }
      ],
      "objects": [
        "/-- div"
      ],
      "step": {
        "fields": [
          {
            "name": "GX2BooleanCB",
            "values": [
              "true"
            ]
          }
        ]
      }
    }
  ],
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflowType
```
[
  "Workflow Type",
  {
    "name": "Workflow Type updated",
    "description": "Workflow Type from preconditions should be updated successfully.",
    "shouldCreateNewVersion": "true",
    "versionComments": "New Comment for version",
    "idGenScheme": "{Day}.{Hour}.{AlphaID}",
    "workflowSteps": [
      {
        "name": "Step1",
        "status": "Step 1 Status ",
        "formTemplate": {
          "name": "FT-1"
        },
        "assignedRole": "R-1"
      }
    ],
    "workflowPermissions": [
      {
        "role": "R-1",
        "flags": [
          "FullAccess",
          "AllFormFieldAccess"
        ]
      }
    ]
  },
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.updateWorkflowTypeInfo
```
[
  "workflowTypeIdOrName",
  "newName",
  "{Year}.{Month}.{Day}.{Hour}.{AlphaID}",
  "description example",
  "true",
  "onsuccess",
  "onerror"
]
```
envianceSdk.workflows.partialUpdateWorkflowType
```
[
  "WT test",
  {
    "description": "Workflow 1",
    "shouldCreateNewVersion": "false",
    "versionComments": "Version 3",
    "idGenScheme": "{Year}.{Month}.{Day}.{Hour}.{AlphaID}",
    "workflowSteps": [
      {
        "name": "Step1",
        "status": "Open",
        "associatedFormTemplate": {
          "name": "FT-1"
        },
        "assignedRole": "R-1",
        "stepActions": [
          {
            "name": "go to step 2",
            "destinationStep": "Step2",
            "allowedRoles": [
              "R-1"
            ]
          }
        ]
      },
      {
        "name": "Step2",
        "status": " In progress",
        "associatedFormTemplate": {
          "name": "FT-1"
        },
        "assignedRole": "R-1"
      }
    ],
    "stepRoles": [
      {
        "name": "R-1",
        "users": [
          {
            "name": "primeAdmin"
          }
        ]
      }
    ],
    "workflowPermissions": [
      {
        "role": "R-1",
        "flags": [
          "ViewAllFormFields"
        ]
      }
    ],
    "policies": [
      {
        "name": "Pol-1"
      }
    ]
  },
  "onsuccess",
  "onerror"
]
```
["7bd06df1-041b-4d1e-8091-1e74f7dd7219",{"name":"WorkflowRole1update""description": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo","defaultMembers": {"userIdsOrNames": ["User1"],"groupIdsOrNames": ["group1"]},"onsuccess","onerror"]["7bd06df1-041b-4d1e-8091-1e74f7dd7219",{"name":"WorkflowRole1update""description": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo","defaultMembers": {"userIdsOrNames": ["User1"],"groupIdsOrNames": ["group1"]},"onsuccess","onerror"]

## Path parameters

- `workflowIdOrUniqueId` string, required

## Headers

- `EnvApi-Systemid` string
- `EnvApi-Packageid` string
- `EnvApi-Udf-DateTime-Iso-In-CustomFields` string
- `EnvApi-Udf-DateTime-ReadInUserTz` string
- `EnvApi-Udf-Value-Invariant` string
- `EnvApi-Localization-All` string
- `x-client-request-id` string

## Request body

- UpdateWorkflow
  - `workflowInfo` EnvianceRestServicesVer2WorkflowsWorkflowInfo
    - `id` string, guid
    - `uniqueId` string
    - `name` string
    - `workflowTypeName` string
    - `parentUniqueId` string, guid
    - `parentWorkflowSourceCustomField` EnvianceRestServicesCommonCustomFieldInfo
      - `id` string, guid
      - `name` string
    - `dueDate` string, date-time
    - `status` string
    - `creator` string
    - `created` string, date-time
    - `lastRun` string, date-time
    - `assignedBy` string
    - `assignedTo` EnvianceRestServicesCommonAssigneeV2[]
      - `userIdOrName` string
      - `groupIdOrName` string
    - `objects` string[]
    - `documents` string[]
    - `calendars` string[]
    - `comment` string
    - `closeDate` string, date-time
    - `jsonData` object

## Response `default`

not available

---

[API](https://skmtc.dev/enviance/apis/restapi.md) - [All operations](https://skmtc.dev/enviance/apis/restapi/llms.txt) - [OpenAPI document](https://skmtc.dev/enviance/apis/restapi/revisions/45b2200a8cf2?raw)
