# Obtain nodes to be submitted（Pre Submit）
> Before submitting the process, first obtain the nodes that can be submitted

![Flow operation](../../assets/img/rest/flowaction/presubmit.png)
## Obtain submission node - when returning a single nodeInterface 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": "",
  "workId": "HZ28858f8137db82018137ebd76b0032",
  "trackId": "HZ28858f8137db82018137ebd76b0033",
  "actionData": {
    "operate": "submit",
    "operateClazz": "com.horizon.wf.action.ActionSubmit"
  }
}
```
Request parameter description:

| Parameter   | Required | Description                                    |
|-------------|----------|------------------------------------------------|
| accessToken | Yes      | Invoking interface credentials, unique user ID |
| workId      | Yes      | Instance ID                                    |
| trackId     | Yes      | Flow track ID                                  |
actionData Parameter:

| Parameter    | Required | Description                               |
|--------------|----------|-------------------------------------------|
| operate      | Yes      | Submit operation ID, fixed value 'submit' |
| operateClazz | Yes      | Submit Operation Class Path               |
**Example of returned results:**
```
{
  "nextNodeId": "Line2~Node2",
  "nextNodes": [
    {
      "authors": {
        "SecondAuthor": {
          "authorFlowVar": "",
          "authorId": "SecondAuthor",
          "authorName": "Secondary",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "true",
          "isUser": "false",
          "selectType": "checkbox"
        },
        "Reader": {
          "authorFlowVar": "",
          "authorId": "Reader",
          "authorName": "Reader",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "true",
          "isUser": "false",
          "selectType": "checkbox"
        },
        "Author": {
          "authorFlowVar": "",
          "authorId": "Author",
          "authorName": "Primary",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "true",
          "isUser": "false",
          "selectType": "radio"
        }
      },
      "isDone": "false",
      "isSelect": "true",
      "memo": "",
      "nodeGroup": "",
      "nodeId": "Node2",
      "nodeKey": "Line2",
      "nodeName": "Task'2",
      "nodeStatus": "4",
      "selectId": "Line2~Node2",
      "selectName": "Track2(Task2)",
      "timeLimit": "0",
      "timeLimitType": "1"
    }
  ],
  "operate": "submit",
  "operateClazz": "com.horizon.wf.action.ActionSubmit",
  "operateFlag": "0",
  "operateMsg": "Please select operator",
  "status": 4,
  "workId": "HZ28858f8137db82018137ebd76b0032"
}
```
**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                                                           |
| operateText | String | Operation display name                                                             |
| 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 Secondary, Reader, and Primary, and the value is the Author/SecondAuthor/Reader object Parameter |
| isDone        | String | Has the process once passed the next node before?                                                                                                |
| isSelect      | String | Has the next node been selected?                                                                                                                 |
| memo          | String | memo                                                                                                                                             |
| nodeGroup     | String | Node grouping, with no value for a single node. When the current node has branch nodes, the value is the previous node ID                        |
| 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                                                                                                                    |
| timeLimit     | String | Node processing deadline                                                                                                                         |
| timeLimitType | String | Processing time limit type, limit value, 0: Calendar Day; 1: working day.                                                                        |
*Primary/Secondary/Reader parameter description:*

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

## Get Submission Node - Return Multiple Nodes, 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": "",
  "workId": "HZ28858f8137db82018137ebd76b0032",
  "trackId": "HZ28858f8137db82018137ebd76b0033",
  "actionData": {
    "operate": "submit",
    "operateClazz": "com.horizon.wf.action.ActionSubmit"
  }
}
```
Request parameter description:

| Parameter   | Required | Description                                    |
|-------------|----------|------------------------------------------------|
| accessToken | Yes      | Invoking interface credentials, unique user ID |
| workId      | Yes      | Instance ID                                    |
| trackId     | Yes      | Flow track ID                                  |
actionData Parameter:

| Parameter    | Required | Description                                                        |
|--------------|----------|--------------------------------------------------------------------|
| operate      | Yes      | Operation ID, fixed value:submit                                   |
| operateClazz | Yes      | Pre submit operation Class Path:com.horizon.wf.action.ActionSubmit |
**Example of returned results:**
```
{
  "nextNodeId": "",
  "nextNodes": [
    {
      "authors": {},
      "isDone": "false",
      "isSelect": "false",
      "nodeGroup": "Node1",
      "nodeId": "Node2",
      "nodeKey": "Line2",
      "nodeName": "Task2",
      "nodeStatus": "2",
      "selectId": "Line2~Node2",
      "selectName": "Track2(Task2)"
    },
    {
      "authors": {},
      "isDone": "false",
      "isSelect": "false",
      "nodeGroup": "Node1",
      "nodeId": "Subflow8",
      "nodeKey": "Line11",
      "nodeName": "subflow8",
      "nodeStatus": "2",
      "selectId": "Line11~Subflow8",
      "selectName": "Track11(Subflow8)"
    }
  ],
  "operate": "submit",
  "operateClazz": "com.horizon.wf.action.ActionSubmit",
  "operateFlag": "1",
  "operateMsg": "Please select node from the list",
  "status": 2,
  "workId": "HZ28858f8137db820181383ef2a300a1"
}
```
**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                                                           |
| operateText | String | Operation display name                                                             |
| operateFlag | String | Action 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 and Primary/Secondary/Reader, and the value is the Author/SecondAuthor/Reader object Parameter |
| isDone     | String | Has the process once passed the next node before.                                                                                              |
| isSelect   | String | Has the next node been selected?                                                                                                               |
| nodeGroup  | String | Node grouping, with no value for a single node. When the current node has branch nodes, the value is the previous node ID                      |
| 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                                                                                                                  |

## Obtain submission node - when selecting a specified 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": "",
  "workId": "HZ28858f8137db820181383ef2a300a1",
  "trackId": "HZ28858f8137db820181383ef2a300a2",
  "actionData": {
    "operate": "submit",
    "operateClazz": "com.horizon.wf.action.ActionSubmit",
    "nextNodes": [
      {
        "isSelect": "true",
        "nodeId": "Node2",
        "nodeKey": "Line2",
        "selectId": "Line2~Node2"
      }
    ]
  }
}
```
Request parameter description:

| Parameter   | Required | Description                                    |
|-------------|----------|------------------------------------------------|
| accessToken | Yes      | Invoking interface credentials, unique user ID |
| workId      | Yes      | Instance ID                                    |
| trackId     | Yes      | Flow track ID                                  |
actionData Parameter:

| Parameter    | Required | Description                      |
|--------------|----------|----------------------------------|
| operate      | Yes      | Operation ID, fixed value:submit |
| operateClazz | Yes      | Pre submit operation Class Path  |
| nextNodes    | Yes      | List of nodes to be selected     |
nextNodes  parameter description:

| Parameter | Required | Description                          |
|-----------|----------|--------------------------------------|
| isSelect  | Yes      | Has the next node been selected?     |
| nodeId    | Yes      | Node id                              |
| nodeKey   | Yes      | Current node primary key             |
| selectId  | Yes      | Next node id and path to be selected |
**Example of returned results:**
```
{
  "nextNodeId": "Line2~Node2",
  "nextNodes": [
    {
      "authors": {
        "SecondAuthor": {
          "authorFlowVar": "",
          "authorId": "SecondAuthor",
          "authorName": "Secondary",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "true",
          "isUser": "false",
          "selectType": "checkbox"
        },
        "Reader": {
          "authorFlowVar": "",
          "authorId": "Reader",
          "authorName": "Reader",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "true",
          "isUser": "false",
          "selectType": "checkbox"
        },
        "Author": {
          "authorFlowVar": "",
          "authorId": "Author",
          "authorName": "Primary",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "true",
          "isUser": "false",
          "selectType": "radio"
        }
      },
      "isDone": "false",
      "isSelect": "true",
      "memo": "",
      "nodeGroup": "",
      "nodeId": "Node2",
      "nodeKey": "Line2",
      "nodeName": "Task2",
      "nodeStatus": "4",
      "selectId": "Line2~Node2",
      "selectName": "Track2(Task2)",
      "timeLimit": "0",
      "timeLimitType": "1"
    }
  ],
  "operate": "submit",
  "operateClazz": "com.horizon.wf.action.ActionSubmit",
  "operateFlag": "0",
  "operateMsg": "Please select operator",
  "status": 4,
  "workId": "HZ28858f8137db82018137ebd76b0032"
}
```
**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                                                           |
| operateText | String | Operation display name                                                             |
| operateFlag | String | Action 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 Secondary, Reader, and Primary, and the value is the Author/SecondAuthor/Reader object Parameter |
| isDone        | String | Has the process once passed the next node before?                                                                                                |
| isSelect      | String | Has the next node been selected?                                                                                                                 |
| memo          | String | Memo                                                                                                                                             |
| nodeGroup     | String | Node grouping, with no value for a single node. When the current node has branch nodes, the value is the previous node ID                        |
| 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                                                                                                                    |
| timeLimit     | String | Node processing deadline                                                                                                                         |
| timeLimitType | String | Processing time limit type, limit value, 0: Calendar Day; 1: working day.                                                                        |
*Primary Operator/Secondary Operator/Reader  parameter description:*

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