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

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

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

## 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}/steps/currentstep`
- Auth: none declared
- TypeScript: <https://skmtc.dev/enviance/apis/restapi/docs/ver2/WorkflowService.svc/workflows/:workflowIdOrUniqueId/steps/currentstep/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates one or more values in the Form Fields of current Workflow Step. Any Form Fields *not* specified are left un-modified. A Step Action to invoke may also be specified, which will move (transition) the Workflow from the current Step to the destination Step of the Step Action. Using step transitions workflow instance can be ended or reopened. See SDK shortcut methods endWorkflow and reopenWorkflow.

**Security:** Allowed for Users with Manage Workflows right or "Report" permission on the Workflow, or User in "Workflow Managers" role of WF, or User with "Manage Workflows" on any objects associated with the workflow.

**SDK API:**  `envianceSdk.workflows.updateWorkflowCurrentStep (workflowIdOrUniqueId, stepInfo, onsuccess, onerror)`

**SDK API shortcut for end workflow:** `envianceSdk.workflows.endWorkflow (workflowIdOrUniqueId, comment, onsuccess, onerror)`

**SDK API shortcut for reopen:** `envianceSdk.workflows.reopenWorkflow (workflowIdOrUniqueId, onsuccess, onerror)`
null


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"
]
```

## 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

- UpdateWorkflowCurrentStep
  - `stepInfo` EnvianceRestServicesVer2WorkflowsWorkflowStepInfo
    - `id` string, guid
    - `name` string
    - `comment` string
    - `fields` EnvianceRestServicesUdfsProperty[]
      - `name` string
      - `urlItems` EnvianceBusinessUdfRestUrlItem[]
        - `label` string
        - `url` string
      - `values` string[]
      - `beginDate` string, date-time
      - `endDate` string, date-time
      - `caption` string
      - `captionLocalized` string
    - `transition` EnvianceRestServicesVer2WorkflowsTransition
      - `stepActionName` string
      - `assignTo` EnvianceRestServicesCommonAssigneeV2[]
        - `userIdOrName` string
        - `groupIdOrName` string
      - `dueDate` string, date-time
      - `closeDate` string, date-time
    - `taskCompletion` EnvianceRestServicesVer2TasksTaskOccurrenceInfo[]
      - `statusChangeDate` string, date-time
      - `objectIdOrPath` string
      - `dismissed` boolean
      - `percentComplete` string, byte
      - `hoursToComplete` number, double
      - `costToComplete` number
      - `comment` string
      - `eventInstanceId` string, guid
      - `compliancePeriodStartDate` string, date-time
      - `compliancePeriodEndDate` string, date-time
      - `comply` string
      - `ObjectId` string, guid

## 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)
