返回介绍

15.9. Forms

发布于 2023-09-17 23:40:35 字数 3127 浏览 0 评论 0 收藏 0

15.9.1. Get form data

GET form/form-data
Table 211. Get form data - URL parameters
ParameterRequiredValueDescription
taskIdYes (if no processDefinitionId)StringThe task id corresponding to the form data that needs to be retrieved.
processDefinitionIdYes (if no taskId)StringThe process definition id corresponding to the start event form data that needs to be retrieved.
Table 212. Get form data - Response codes
Response codeDescription
200Indicates that form data could be queried.
404Indicates that form data could not be found.

Success response body:

{
  "data": [
  {
    "formKey" : null,
    "deploymentId" : "2",
    "processDefinitionId" : "3",
    "processDefinitionUrl" : "http://localhost:8182/repository/process-definition/3",
    "taskId" : "6",
    "taskUrl" : "http://localhost:8182/runtime/task/6",
    "formProperties" : [
    {
      "id" : "room",
      "name" : "Room",
      "type" : "string",
      "value" : null,
      "readable" : true,
      "writable" : true,
      "required" : true,
      "datePattern" : null,
      "enumValues" : [
      {
        "id" : "normal",
        "name" : "Normal bed"
      },
      {
        "id" : "kingsize",
        "name" : "Kingsize bed"
      },
      ]
    }
    ]
  }
  ],
  "total": 1,
  "start": 0,
  "sort": "name",
  "order": "asc",
  "size": 1
}

15.9.2. Submit task form data

POST form/form-data

Request body for task form:

{
  "taskId" : "5",
  "properties" : [
  {
    "id" : "room",
    "value" : "normal"
  }
  ]
}

Request body for start event form:

{
  "processDefinitionId" : "5",
  "businessKey" : "myKey",
  "properties" : [
  {
    "id" : "room",
    "value" : "normal"
  }
  ]
}
Table 213. Submit task form data - Response codes
Response codeDescription
200Indicates request was successful and the form data was submitted
400Indicates an parameter was passed in the wrong format. The status-message contains additional information.

Success response body for start event form data (no response for task form data):

{
  "id" : "5",
  "url" : "http://localhost:8182/history/historic-process-instances/5",
  "businessKey" : "myKey",
  "suspended": false,
  "processDefinitionId" : "3",
  "processDefinitionUrl" : "http://localhost:8182/repository/process-definition/3",
  "activityId" : "myTask"
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文