前端任务相关接口

/UI2/comp/wfmui/components/wfmui/js/taskUtil.js中提供了前端任务相关接口,需要调用时要添加引用如下,然后通过TaskUtil调用相关的API

import TaskUtil from "$UI/comp/wfmui/components/wfmui/js/taskUtil"

具体的接口如下;

1.根据业务数据查询结束的流程实例

  • 函数名:queryFinishPIByData
  • 参数
      sData1   {String} 业务数据
      process  {String} 流程标识(可以为空)
       columns  {String} 返回的列(可以为空)
    
  • 返回 {Promise}

2.根据流程统计流程例数

  • 函数名:countPIByProcess
  • 参数
       option  {JSON} 选项
          option支持的选项有: limit, offset, orderBy
           例如: TaskUtil.countPIByProcess({limit: 20, offset: 0, orderBy: "sProcessName DESC"});
      page    {Page} 页面对象
    
  • 返回 {Promise}

3.根据流程统计流程任务数

  • 函数名 countTaskByProcess
  • 参数
       option {JSON}  选项
          option支持的选项有: filter,kind,status,limit, offset, orderBy
           例如: TaskUtil.countPIByProcess({kind:"task", status:"wait", limit: 20, offset: 0, orderBy: "sProcessName DESC"});
       page   {Page}  d页面对象
    
  • 返回 {Promise}

4.根据业务数据查询流程实例

  • 函数名 queryPIByData
  • 参数
       sData1   {String} 业务数据
       process  {String} 流程标识(可以为空)
       status   {String} 流程实例状态, 支持的值有空值, waiting, finished, 默认值是空值
       filter   {String} 过滤条件, 使用KSQL语法的过滤条件, 例如  SA_Task.sName like '张%'
       columns  {String} 返回的列(可以为空)
    
  • 返回 {Promise}

5.根据业务数据查询活动的任务

  • 函数 queryActiveTaskByData
  • 参数
       sData1   {String} 业务数据
       process  {String} 流程标识(可以为空)
       columns  {String} 返回的列(可以为空)
    
  • 返回 {Promise}

6.查询当前人的待办

  • 函数名 queryOwnerTask
  • 参数
    option {JSON} 查询选项
       参数格式:
           {
               limit: 20,            分页大小
               offset: 0,            当前位置
               kind: "task",         任务类型,取值范围{"task", "notice", ""}
               status: "waiting",     任务状态,取值范围{"waiting", "finished", "submited"},多值时使用","分隔,默认值"waiting"
               process: "",        流程标识
               sData1: "",            业务数据标识
               filter: ""            过滤条件,例如: SA_Task.sName like '%张三%'
           }
    
  • 返回 {Promise}

7.生成任务的表单地址

  • 函数名 buildFormUrlByTask
  • 参数
       row  {JSONObject}  任务数据, 必须有以下属性: id, sKindID, sStatusID, sEURL, sProcess, sActivity, sExecutorFID, sData1
    
  • 返回 {String}

8.执行任务

  • 函数名 executeTask
  • 参数
       row  {JSONObject} 任务数据, 必须有以下属性: id, sExecutorFID
    
  • 返回 {String}

9.根据业务数据查询任务

  • 函数名 queryTaskByData *参数
       sData1   {String} 业务数据
       process  {String} 流程标识(可以为空)
       status   {String} 流程实例状态, 支持的值有空值, waiting, finished, 默认值是空值
       filter   {String} 过滤条件, 使用KSQL语法的过滤条件, 例如  SA_Task.sName like '张%'
       columns  {String} 返回的列(可以为空)
    
  • 返回 {Promise}

10.根据流程实例id查询流程的活动任务

  • 函数名 queryActiveTaskByPI
  • 参数
       pi       {String} 流程实例id
       columns  {String} 返回的列(可以为空)
    
  • 返回 {Promise}

11.根据任务id查询流程的活动任务

  • 函数名 queryActiveTaskByPIForTask
  • 参数
       task  {String} 任务id
    
  • 返回 {Promise}

12.根据流程实例id查询流程的任务

  • 函数名 queryTaskByPI
  • 参数
       pi      {String} 流程实例id
       status  {String} 流程实例状态, 支持的值有空值, waiting, finished, 默认值是空值
       filter  {String} 过滤条件, 使用KSQL语法的过滤条件, 例如  SA_Task.sName like '张%'
       columns {String} 返回的列(可以为空)
    
  • 返回 {Promise}

13.查询任务数

  • 函数名 queryTaskCount
  • 参数
       status  {String} 任务状态, 支持的值有all, waiting, finished, submited, 默认值是waiting
       org     {String} 组织范围, 只能是当前人的id或当前人所在的组织fid
       filter  {String} 过滤条件
      例如:
               TaskUtil.queryTaskCount("waiting", null, null).then(function(count){});  //查我的待办任务
               TaskUtil.queryTaskCount("submited", null, null).then(function(count){});  //查我的提交任务
    
  • 返回 {Promise}

14.新建通知

  • 函数名 insertNotice
  • 参数
       name          {String} 名称
       executorFIDs  {List}   执行者, FID的形成的列表
       data          {String} 业务数据
       process       {String} 流程标识
       activity      {String} 环节标识
       curl          {String} 创建页面
       eurl          {String} 执行页面
       options       {JSON}   任务的其它扩展属性
      例如:TaskUtil.insertNotice("新建通知", ["人的FID"], "页面数据", "流程标识", "环节标识","创建页面", "执行页面", {sData2: "业务数据2"});2"});
    
  • 返回 {Promise}

15.新建任务,执行者在同一个任务下执行

  • 函数名 insertTask
  • 参数
       name          {String} 名称
       executorFIDs  {List}   执行者, FID的形成的列表
       data          {String} 业务数据
       process       {String} 流程标识
       activity      {String} 环节标识
       curl          {String} 创建页面
       eurl          {String} 执行页面
       options       {JSON}   任务的其它扩展属性
      例如:TaskUtil.insertTask("新建任务", ["人的FID"], "页面数据", "流程标识", "环节标识","创建页面", "执行页面", {sData2: "业务数据2"});
    
  • 返回 {Promise}

16.新建多个任务

  • 函数名 insertTasks
  • 参数
       name          {String} 名称
       executorFIDs  {List}   执行者, FID的形成的列表
       data          {String} 业务数据
       process       {String} 流程标识
       activity      {String} 环节标识
       curl          {String} 创建页面
       eurl          {String} 执行页面
       options       {JSON}   任务的其它扩展属性
      例如:TaskUtil.insertTasks("新建多个任务", ["人的FID"], "页面数据", "流程标识", "环节标识",    "创建页面", "执行页面", {sData2: "业务数据2"});
    
  • 返回 {Promise}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""