任务相关接口(新)

1. 查询任务

  • 请求地址: /wf/biz/task
  • 请求方式:GET
  • 输入参数:
参数名称 必选 类型 描述
filter String 过滤条件,例如 SA_Task.sName='张三' AND SA_Task.sProcess='xx'
offset Int 偏移量,默认值是0
limit Int 分页大小,默认值20,-1表示所有数据
distinct Boolean 去除重复行,默认值false
columns String 返回列,默认所有列
orderBy String 排序方式,例如 sName DESC,sProcess ASC
variabels JSONObject 变量,例如 {"justep.shard": "histroy"}
  • 返回结果:

** 返回头

    Content-Type: application/json
    Content-Range: 分页信息,例如0-19/100

** 返回体

[{
    "id": "主键",
    "sName": "名称", 
    ...
}]

2. 根据组织查询任务

  • 请求地址: /wf/biz/task/queryByOrg
  • 请求方式:GET
  • 输入参数:
参数名称 必选 类型 描述
filter String 过滤条件,例如 SA_Task.sName='张三' AND SA_Task.sProcess='xx'
offset Int 偏移量,默认值是0
limit Int 分页大小,默认值20,-1表示所有数据
distinct Boolean 去除重复行,默认值false
columns String 返回列,默认所有列
orderBy String 排序方式,例如 sName DESC,sProcess ASC
variabels JSONObject 变量,例如 {"justep.shard": "histroy"}
status String 任务状态,取值范围["waiting"、 "finished"、 "submited"],默认值"waiting";允许多值,使用“,”分隔
org String 组织范围,可以是组织的ID或FID,默认是当前人;允许多值,使用“,”分隔
  • 返回结果:

** 返回头

    Content-Type: application/json
    Content-Range: 分页信息,例如0-19/100

** 返回体

[{
    "id": "主键",
    "sName": "名称", 
    ...
}]

3. 更新任务

  • 请求地址: /wf/biz/task
  • 请求方式:POST
  • 输入参数:
参数名称 必选 类型 描述
请求体 JSONObject 任务信息, id表示主键, 其它属性名参考任务概念的属性列表。有两个特殊的属性名executeCode, creatorCode
{
    "id": "主键",
    "sName": "名称", 
    "executeCode": "xx"
}
  • 返回结果: 无

4. 查询任务数

  • 请求地址: /wf/biz/task/count
  • 请求方式:GET
  • 输入参数:
参数名称 必选 类型 描述
filter String 过滤条件,例如 SA_Task.sName='张三'
status String 任务状态,取值范围["waiting"、 "finished"、 "submited"],默认值"waiting";允许多值,使用“,”分隔
org String 组织范围,可以是组织的ID或FID,默认是当前人;允许多值,使用“,”分隔
  • 返回结果: Int

5. 执行任务

  • 请求地址: /wf/biz/task/execute
  • 请求方式:POST
  • 输入参数:
参数名称 必选 类型 描述
task String 任务标识
executor String 执行者信息,组织FID
{
    "task": "任务标识",
    "executor": "组织FID"
}
  • 返回结果: 任务执行者人员成员的FID

6. 新建任务

  • 请求地址: /wf/biz/task
  • 请求方式:PUT
  • 输入参数:
参数名称 必选 类型 描述
name String 任务名称
executorFIDs List 执行者信息,组织FID列表
data String 业务数据标识
process String 关联的流程
activity String 关联的环节
curl String 查看地址
eurl String 处理地址
options JSONObject 其它任务属性
kind String 任务类型,取值范围["notice", "task"]
mode String 任务模式,取值范围["together", "singleness"],"together"表示有多个执行人时形成父子任务,"singleness"表示有多个执行人时形成独立的任务
{
    "name": "",
    "executorFIDs": [],
    "data": "",
    "process": "",
    "activity": "",
    "curl": "",
    "eurl": "",
    "options": {},
    "kind": "notice",  
    "mode": "together"
}
  • 返回结果: 任务ID列表

7. 任务提醒

  • 请求地址: /wf/biz/task/remind
  • 请求方式:POST
  • 输入参数:
参数名称 必选 类型 描述
task String 任务标识
channel String 提醒方式
templateCode String 提醒使用的模板,默认使用"TASK_MANAGE"
  • 返回结果: 无

results matching ""

    No results matching ""

    results matching ""

      No results matching ""