# 跳转
> 获取可以跳转的节点、跳转到其他办理节点

![流程操作](../../assets/img/rest/flowaction/goto.png)
## 跳转节点列表
接口请求调用说明 <br>
http请求方式: POST <br>
请求地址: http://127.0.0.1:8080/demo/horizon/workflow/rest/flow/support/action.wf <br>
**post数据说明：**
```
{
	"accessToken":"",
    "trackId": "HZ28858f8103505e01810a555ed301f3",
    "workId": "HZ28858f8103505e01810a555ed301f2",
    "actionData": {
		"operate":"goto", 
		"operateClazz":"com.horizon.wf.action.ActionGoto"
	}
}
```
请求参数说明:

| 参数          | 是否必须 | 描述            |
|-------------|------|---------------|
| accessToken | 是    | 调用接口凭证，唯一用户标识 |
| workId      | 是    | 流程实例id        |
| trackId     | 是    | 流程路径id        |
actionData 数据参数:

| 参数           | 是否必须 | 描述                                          |
|--------------|------|---------------------------------------------|
| operate      | 是    | 操作标识，固定值goto                                |
| operateClazz | 是    | 暂停/恢复操作类路径com.horizon.wf.action.ActionGoto  |
**返回结果示例：**
```
{
  "nextNodeId": "",
  "nextNodes": [
    {
      "authors": {},
      "isDone": "false",
      "isSelect": "false",
      "memo": "",
      "nodeGroup": "Node0",
      "nodeId": "Node2",
      "nodeKey": "Node2",
      "nodeName": "任务2",
      "nodeStatus": "0",
      "selectId": "Node2",
      "selectName": "任务2",
      "timeLimit": "0",
      "timeLimitType": "1"
    },
    {
      "authors": {},
      "isDone": "false",
      "isSelect": "false",
      "memo": "",
      "nodeGroup": "Node0",
      "nodeId": "Node3",
      "nodeKey": "Node3",
      "nodeName": "任务3",
      "nodeStatus": "0",
      "selectId": "Node3",
      "selectName": "任务3",
      "timeLimit": "0",
      "timeLimitType": "1"
    }
  ],
  "operate": "goto",
  "operateClazz": "com.horizon.wf.action.ActionGoto",
  "operateFlag": "1",
  "operateMsg": "请选择跳转节点",
  "status": 2,
  "workId": "HZ28858f8103505e01810a555ed301f2"
}
```
**结果参数说明:**

| 参数           | 参数类型   | 描述                     |
|--------------|--------|------------------------|
| nextNodeId   | String | 当前节点id                 |
| nextNodes    | List   | 需要选择的节点列表              |
| operate      | String | 跳转操作标识                 |
| operateClazz | String | 跳转操作实现类                |
| operateFlag  | String | 操作标记 -1： 显示关闭，0、1：正常提交 |
| operateMsg   | String | 返回操作信息                 |
| status       | int    | 流程操作状态码                |
| workId       | String | 流程实例id                 |
*nextNodes参数说明：*

| 参数            | 参数类型   | 描述                                                                                            |
|---------------|--------|-----------------------------------------------------------------------------------------------|
| authors       | Map    | 下节点办理人map中key为Author/SecondAuthor/Reader/，value为/SecondAuthor/Reader/对象参数,没有值时，表示暂未设置待办/协办/读者 |
| isDone        | String | 是否已经走过                                                                                        |
| isSelect      | String | 是否已选择                                                                                         |
| memo          | String | 备注信息                                                                                          |
| nodeGroup     | String | 节点分组，单节点时无值，当前节点有分支节点时，值为上一节点id                                                               |
| nodeId        | String | 节点id                                                                                          |
| nodeKey       | String | 节点主键                                                                                          |
| nodeName      | String | 节点名称                                                                                          |
| nodeStatus    | String | 节点状态，限定值<br>0.成功<br>1.选择办理人<br>2.选择节点<br>3.未找到办理人<br>4.未找到下一节点                                |
| selectId      | String | 需要选择的节点id                                                                                     |
| selectName    | String | 需要选择的节点名称                                                                                     |
| timeLimit     | String | 节点办理时限                                                                                        |
| timeLimitType | String | 办理时限类型，限定值<br>0：自然日<br>1：工作日                                                                  |

## 跳转节点设置
接口请求调用说明 <br>
http请求方式: POST <br>
请求地址: http://127.0.0.1:8080/demo/horizon/workflow/rest/flow/support/action.wf <br>
**post数据说明：**
```
{
  "accessToken": "",
  "workId": "HZ28858f8103505e01810a6c7afe022b",
  "trackId": "HZ28858f8103505e01810a6c7afe022c",
  "actionData": {
    "operate": "goto",
    "operateClazz": "com.horizon.wf.action.ActionGoto",
    "operateFlag": 0,
    "nextNodes": [
      {
        "authors": {
          "SecondAuthor": {
            "authorFlowVar": "",
            "authorId": "SecondAuthor",
            "authorName": "协办",
            "freeArea": "",
            "isDefUser": "false",
            "isFree": "true",
            "isSelect": "true",
            "isUser": "false",
            "selectType": "checkbox",
            "selectAuthor": "U_HZ28821856ef63420156ef6342a20002/D_HZ28821856ef63420156ef6342a20001",
            "selectAuthorName": "用户01(测试部门0)"
          },
          "Reader": {
            "authorFlowVar": "",
            "authorId": "Reader",
            "authorName": "读者",
            "freeArea": "",
            "isDefUser": "false",
            "isFree": "true",
            "isSelect": "true",
            "isUser": "false",
            "selectType": "checkbox",
            "selectAuthor": "U_HZ28821856ef63420156ef6342a20004/D_HZ28821856ef63420156ef6342a20001",
            "selectAuthorName": "用户03(测试部门0)"
          },
          "Author": {
            "authorFlowVar": "",
            "authorId": "Author",
            "authorName": "主办",
            "freeArea": "",
            "isDefUser": "false",
            "isFree": "true",
            "isSelect": "true",
            "isUser": "false",
            "selectType": "radio",
            "selectAuthor": "U_admin/D_HZ28821856ef63420156ef63429c0000",
            "selectAuthorName": "管理员(慧正通软)"
          }
        },
        "isDone": "false",
        "isSelect": "true",
        "nodeId": "Node3",
        "nodeKey": "Node3",
        "nodeName": "任务3",
        "nodeStatus": "4",
        "selectId": "Node3",
        "selectName": "任务3",
        "timeLimit": "0",
        "timeLimitType": "1"
      }
    ]
  }
}
```
请求参数说明:

| 参数          | 是否必须 | 描述            |
|-------------|------|---------------|
| accessToken | 是    | 调用接口凭证，唯一用户标识 |
| workId      | 是    | 流程实例id        |
| trackId     | 是    | 流程路径id        |
| actionData  | 是    | 流程操作json数据    |
actionData 数据参数:

| 参数           | 是否必须 | 描述                                            |
|--------------|------|-----------------------------------------------|
| operate      | 是    | 操作标识，固定值goto                                  |
| operateClazz | 是    | 跳转操作具体实现类，限定值com.horizon.wf.action.ActionGoto |
| operateFlag  | 是    | 操作标识，固定值0                                     |
| nextNodes    | 是    | 需要选择的节点列表                                     |
nextNodes参数说明：

| 参数            | 是否必须 | 描述                                                                              |
|---------------|------|---------------------------------------------------------------------------------|
| authors       | 是    | 下节点办理人map中key为Author/SecondAuthor/Reader/，value为Author/SecondAuthor/Reader/对象参数 |
| isDone        | 否    | 是否已经流转过                                                                         |
| isSelect      | 是    | 是否已经选择过                                                                         |
| nodeId        | 是    | 节点id                                                                            |
| nodeKey       | 是    | 节点主键                                                                            |
| nodeName      | 否    | 节点名称                                                                            |
| nodeStatus    | 否    | 节点状态，rest提交时可忽略                                                                 |
| selectId      | 是    | 需要选择的节点id                                                                       |
| selectName    | 否    | 需要选择的节点名称                                                                       |
| timeLimit     | 否    | 节点办理时限                                                                          |
| timeLimitType | 否    | 办理时限类型，限定值<br>0：自然日<br>1：工作日                                                    |
authors中Author/SecondAuthor/Reader/对象参数说明：

| 参数               | 是否必须 | 描述                                                       |
|------------------|------|----------------------------------------------------------|
| authorFlowVar    | 否    | 流程变量                                                     |
| authorId         | 否    | 办理人类型id，限定值<br>Author：主办<br>SecondAuthor：协办<br>Reader：读者 |
| authorName       | 否    | 办理人名称，限定值：主办，协办，读者                                       |
| freeArea         | 否    | 自由选择时的范围                                                 |
| isDefUser        | 否    | 流程定义列表中选择                                                |
| isFree           | 否    | 是否自由选择                                                   |
| isSelect         | 否    | 是否允许选择办理人                                                |
| isUser           | 否    | 是否只允许选择人员                                                |
| selectType       | 否    | 人员选择类型，限定值<br>radio：单选<br>checkbox：多选                    |
| selectAuthor     | 是    | 节点已选择办理人id<br>没有协办/读者时，参数可以不填写                           |
| selectAuthorName | 是    | 节点已选择办理人名称<br>没有协办/读者时，参数可以不填写                           |
**返回结果示例：**
```
{
  "nextNodeId": "Node3",
  "nextNodes": [
    {
      "authors": {
        "SecondAuthor": {
          "authorFlowVar": "",
          "authorId": "SecondAuthor",
          "authorName": "协办",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "false",
          "isUser": "false",
          "selectAuthor": "U_HZ28821856ef63420156ef6342a20002/D_HZ28821856ef63420156ef6342a20001",
          "selectAuthorName": "用户01(测试部门0)",
          "selectType": "checkbox"
        },
        "Reader": {
          "authorFlowVar": "",
          "authorId": "Reader",
          "authorName": "读者",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "false",
          "isUser": "false",
          "selectAuthor": "U_HZ28821856ef63420156ef6342a20004",
          "selectAuthorName": "用户03",
          "selectType": "checkbox"
        },
        "Author": {
          "authorFlowVar": "",
          "authorId": "Author",
          "authorName": "主办",
          "freeArea": "",
          "isDefUser": "false",
          "isFree": "true",
          "isSelect": "false",
          "isUser": "false",
          "selectAuthor": "U_admin/D_HZ28821856ef63420156ef63429c0000",
          "selectAuthorName": "管理员(慧正通软)",
          "selectType": "radio"
        }
      },
      "isDone": "false",
      "isSelect": "true",
      "memo": "",
      "nodeGroup": "Node0",
      "nodeId": "Node3",
      "nodeKey": "Node3",
      "nodeName": "任务3",
      "nodeStatus": "0",
      "selectId": "Node3",
      "selectName": "任务3",
      "timeLimit": "0",
      "timeLimitType": "1"
    }
  ],
  "operate": "goto",
  "operateClazz": "com.horizon.wf.action.ActionGoto",
  "operateFlag": "0",
  "operateMsg": "跳转成功",
  "operateStatus": "success",
  "reOpen": "true",
  "status": 0,
  "trackId": "HZ28858f8103505e01810a6c7afe022c",
  "workId": "HZ28858f8103505e01810a6c7afe022b"
}
```
**结果参数说明:**

| 参数            | 参数类型   | 描述                    |
|---------------|--------|-----------------------|
| nextNodeId    | String | 当前节点id                |
| nextNodes     | List   | 需要选择的节点列表             |
| operate       | String | 跳转操作标识                |
| operateClazz  | String | 跳转操作类路径               |
| operateFlag   | String | 操作标记 -1：显示关闭，0、1：正常提交 |
| operateMsg    | String | 返回操作信息                |
| operateStatus | String | 流程操作结果                |
| reOpen        | String | 是否重新打开，可忽略            |
| status        | int    | 流程操作状态码               |
| trackId       | String | 流程实例路径id              |
| workId        | String | 流程实例id                |
*nextNodes参数说明：*

| 参数            | 参数类型   | 描述                                                                        |
|---------------|--------|---------------------------------------------------------------------------|
| authors       | Map    | 下节点办理人map中key为Author/SecondAuthor/Reader/，value为/SecondAuthor/Reader/对象参数 |
| isDone        | String | 是否已经走过                                                                    |
| isSelect      | String | 是否已选择                                                                     |
| memo          | String | 备注信息                                                                      |
| nodeGroup     | String | 节点分组，单节点时无值，当前节点有分支节点时，值为上一节点id                                           |
| nodeId        | String | 节点id                                                                      |
| nodeKey       | String | 节点主键                                                                      |
| nodeName      | String | 节点名称                                                                      |
| nodeStatus    | String | 节点状态，限定值<br>0.成功<br>1.选择办理人<br>2.选择节点<br>3.未找到办理人<br>4.未找到下一节点            |
| selectId      | String | 需要选择的节点id                                                                 |
| selectName    | String | 需要选择的节点名称                                                                 |
| timeLimit     | String | 节点办理时限                                                                    |
| timeLimitType | String | 办理时限类型，限定值<br>0：自然日<br>1：工作日                                              |
*authors中Author/SecondAuthor/Reader参数说明：*

| 参数               | 参数类型   | 描述                                    |
|------------------|--------|---------------------------------------|
| authorFlowVar    | String | 流程变量                                  |
| authorId         | String | 办理人id固定值Author/SecondAuthor/Reader    |
| authorName       | String | 办理人名称：主办，协办，读者                        |
| freeArea         | String | 自由选择时的范围                              |
| isDefUser        | String | 流程定义列表中选择                             |
| isFree           | String | 是否自由选择                                |
| isSelect         | String | 是否允许选择办理人                             |
| isUser           | String | 是否只允许选择人员                             |
| selectAuthor     | String | 节点已选择办理人id                            |
| selectAuthorName | String | 节点已选择办理人名称                            |
| selectType       | String | 人员选择类型，限定值<br>radio：单选<br>checkbox：多选 |
