Alfresco API

POST / processes

基本信息

创建新的流程。

在非网络部署中,任何通过身份验证的用户都可以针对任何流程定义启动新流程。

如果启用了网络,则经过身份验证的用户可以为用户网络中的流程定义启动新流程。

Note:您可以通过在JSON主体中指定一个流程条目列表来启动多个流程,如下所示:

[
  {
     "processDefinitionKey": "activitiAdhoc",
     "variables": {
        "bpm_assignee": "fred"
    }
  },
  {
     "processDefinitionKey": "activitiAdhoc",
     "variables": {
        "bpm_assignee": "joe"
    }
]

如果将列表指定为输入,则在响应正文中返回分页列表而不是条目。 例如:

{
  "list": {
    "pagination": {
      "count": 2,
      "hasMoreItems": false,
      "totalItems": 2,
      "skipCount": 0,
      "maxItems": 100
    },
    "entries": [
      {
        "entry": {
          ...
        }
      },
      {
        "entry": {
          ...
        }
      }
    ]
  }
}

请求方式 POST

请求API / processes

响应等级(状态200)

成功回应

{
  "entry": {
    "id": "string",
    "processDefinitionId": "string",
    "businessKey": "string",
    "startedAt": "2021-01-15T07:50:19.159Z",
    "endedAt": "2021-01-15T07:50:19.159Z",
    "durationInMs": 0,
    "startActivityDefinitionId": "string",
    "endActivityDefinitionId": "string",
    "startUserId": "string",
    "deleteReason": "string"
  }
}

响应内容类型 applicaiton/json

Body参数(processBody

request body示例

{
  "processDefinitionKey": "string",
  "variables": {
    "bpm_assignee": "string",
    "bpm_sendEMailNotifications": true,
    "bpm_workflowPriority": 0
  }
}

错误信息描述

状态码 原因
400 无效的参数:processBody无效
401 验证失败
default 意外错误

返回结果示例

{
  "error": {
    "errorKey": "string",
    "statusCode": 0,
    "briefSummary": "string",
    "stackTrace": "string",
    "descriptionURL": "string",
    "logId": "string"
  }
}