# Replace Operator{docsify-ignore-all}
> Replace the operator of the current node.

Interface Request Invoking Description <br>
HTTP Request Method: POST <br>
Request Address: http://127.0.0.1:8080/demo/horizon/workflow/rest/flow/support/action${suffix} <br>
**Post data description:**
```
{
  "accessToken": "",
  "trackId": "HZ28858f8103505e018104d8a1dc0110",
  "workId": "HZ28858f8103505e018104d8a1dc010f",
  "actionData": { 
    "operate": "replace",
    "operateFlag": 0,
    "operateClazz": "com.horizon.wf.action.ActionReplaceAuthor",
    "nextNodes": [
      {
        "authors": {
          "Author": {
            "selectAuthor": "U_HZ28821856ef63420156ef6342a20007/D_HZ28821856ef63420156ef6342a20001",
            "selectAuthorName": "User06(Test Department0)"
          }
        },
        "isSelect": "true",
        "nodeId": "Node1",
        "nodeKey": "Node1",
        "selectId": "Node1"
      }
    ]
  }
}
```
Request parameter description:

| Parameter   | Required | Description                                    |
|-------------|----------|------------------------------------------------|
| accessToken | Yes      | Invoking interface credentials, unique user ID |
| workId      | Yes      | Instance ID                                    |
| trackId     | Yes      | Track ID                                       |
| nodeId      | Yes      | Node ID                                        |
| actionData  | Yes      | Process operation JSON data                    |
actionData   parameter

| Parameter    | Required | Description                                                                               |
|--------------|----------|-------------------------------------------------------------------------------------------|
| operate      | Yes      | Operation name, limit value:'replace'                                                     |
| operateFlag  | Yes      | Operation identification, limit value:'0'                                                 |
| operateClazz | Yes      | Operation implementation class, limited value:'com.horizon.wf.action.ActionReplaceAuthor' |
| nextNodes    | Yes      | List of next nodes to be selected                                                         |
nextNodes  parameter description

| Parameter  | Required | Description                                                                                                              |
|------------|----------|--------------------------------------------------------------------------------------------------------------------------|
| nodeKey    | Yes      | Current node primary key                                                                                                 |
| selectId   | Yes      | Next node id to be selected                                                                                              |
| selectName | Yes      | Next node name to be selected                                                                                            |
| nodeId     | Yes      | Current node ID                                                                                                          |
| authors    | Yes      | The key in the operator object of the next node is Primary Operator, and value is the Primary Operator object parameter. |
Primary Operator Object Parameter Description in Authors：

| Parameter        | Required | Description                                                                                                        |
|------------------|----------|--------------------------------------------------------------------------------------------------------------------|
| selectAuthor     | Yes      | The selected operator ID of the node. it can be left blank when the operator does not have a Secondary or Reader   |
| selectAuthorName | Yes      | The selected operator name of the node. it can be left blank when the operator does not have a Secondary or Reader |
**Example of returned results:**
```
{
  "nextNodeId": "Node1",
  "nextNodes": [
    {
      "authors": {
        "Author": {
          "authorFlowVar": "",
          "authorId": "Author",
          "authorName": "Primary",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "true",
          "isUser": "false",
          "selectType": "radio"
        }
      },
      "isDone": "false",
      "isSelect": "true",
      "isShowTabs": "false",
      "memo": "",
      "nodeGroup": "",
      "nodeId": "Node1",
      "nodeKey": "Node1",
      "nodeName": "Task1",
      "nodeStatus": "0",
      "selectId": "Node1",
      "selectName": "Replaced operator (Task1)"
    }
  ],
  "operate": "replace",
  "operateClazz": "com.horizon.wf.action.ActionReplaceAuthor",
  "operateFlag": "0",
  "operateMsg": "Replaced operator successfully",
  "status": 0,
  "workId": "HZ28858f8103505e018104d8a1dc010f"
}
```
**Result parameter description:**

| Parameter    | Type   | Description                                                                        |
|--------------|--------|------------------------------------------------------------------------------------|
| nextNodeId   | String | Next node ID (used when the next node ID is known and there is only one next node) |
| nextNodes    | List   | List of next nodes to be selected                                                  |
| operate      | String | Operation identification, fixed value:'replace'                                    |
| operateClazz | String | Operation implementation class:'com.horizon.wf.action.ActionReplaceAuthor'         |
| operateFlag  | String | Operation flag -1: Display closed, 0: Normal submission, 1: Pre submission         |
| operateMsg   | String | Return operation information                                                       |
| status       | int    | Process operation status code                                                      |
| workId       | String | Instance ID                                                                        |
*nextNodes  parameter description*

| Parameter  | Type   | Description                                                                                                                                                                                          |
|------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| authors    | Map    | The key in the operator map of the next node is Primary Operator, and value is the Primary Operator object parameter.                                                                                |
| isDone     | String | Has the process once passed the next node before?                                                                                                                                                    |
| isSelect   | String | Has the next node been selected?                                                                                                                                                                     |
| isShowTabs | String | Whether to display operator tab page of the process node                                                                                                                                             |
| memo       | String | Memo                                                                                                                                                                                                 |
| nodeGroup  | String | If there are no multiple branches in the current instance, this value is empty. If there are multiple branches, this value returns the node ID of the previous node to bind the grouping information |
| nodeId     | String | Current node ID                                                                                                                                                                                      |
| nodeKey    | String | Current node primary key                                                                                                                                                                             |
| nodeName   | String | Current node name                                                                                                                                                                                    |
| nodeStatus | String | Node status, limited value, 0. Success; 1. Select operator; 2. Select node; 3. Operator not found;4. Next node not found                                                                             |
| selectId   | String | Next node id to be selected                                                                                                                                                                          |
| selectName | String | Next node name to be selected                                                                                                                                                                        |
*authors中Author  parameter description*

| Parameter     | Type   | Description                                                                                  |
|---------------|--------|----------------------------------------------------------------------------------------------|
| authorFlowVar | String | Process variables                                                                            |
| authorId      | String | Operator type ID, fix value:'Author'                                                         |
| authorName    | String | Operator type name: 'Primary'                                                                | 
| freeArea      | String | Scope of free choice                                                                         |
| isDefUser     | String | Select from the organization library of process node attributes                              |
| isFree        | String | Whether to select freely                                                                     |
| isSelect      | String | Is it allowed to select the operator                                                         |
| isUser        | String | Is it allowed to select the user?	                                                           |
| selectType    | String | Operator selection type, limited value. Radio: Single selection;Checkbox: Multiple selection |