您可以在流程事件、流程路由事件、流程活动事件中通过workContext获取和流程相关的流程实例对象数据。
Usable Range
Process 所有流程配置中的脚本可以使用此对象
Syntax
//您可以在表单或流程的各个嵌入脚本中,通过this来获取当前流程实例数据,如下:
var context = this.workContext;
Methods
getTask() → {Task|TaskCompleted|Null}
Summary
获取当前流程与当前用户相关的待办或已办对象:task对象或taskCompleted对象。
Description
当前流程实例正在流转中,并且当前用户有待办,则返回当前用户的待办对象。 事实上在后端的活动事件中,大部分的情况下,此方法获取到的是taskCompleted对象,因为在人工活动的事件中,除了“待办处理前”事件,其他事件处理时,当前用户的待办都已经转为已办了。
Syntax
const task = this.workContext.getTask();
Returns
-
Task
TaskCompleted
Null
当前用户的待办任务对象:task。当前用户没有对此流程实例的待办时,或流程实例已经流转结束,返回null。
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //待办标识.
"routeNameDisable": true, //待办是否禁用routeName,退回待办如果设置way=jump将直接跳转,则无需routeName.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"prevTaskIdentity": " ", //上一人工环节处理人.
"act": " ", //Ticket创建方式,create,reset,add.
"job": " ", //任务.
"title": "XX7月北京出差报销审批", //标题.
"startTime": "2018-09-27 22:49:22", //开始时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"unit": "开发部@kfb@U", //当前处理人所在组织.
"empowerFromIdentity": " ", //授权自Identity
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人部门
"expireTime": "2024-12-24 14:11:00", //任务截止时间.
"expired": true, //是否已经超时.
"urgeTime": "2024-12-24 14:11:00", //催办时间.
"urged": true, //是否已经催办过.
"routeList": [
"89b58fe0-6dcb-4fe7-8c2e-3f77204df6d4"
"f3105b7a-2929-4682-aab8-15fef5ea0f23"
], //当前活动可供选择的路由.
"routeNameList": [
"退回申请人"
"送财务部门复审"
], //当前活动可供选择的路由名称.
"routeOpinionList": [
""
""
], //当前活动可供选择的路由对应的默认意见.
"routeDecisionOpinionList": [
" "
], //决策性意见列表,使用#分割.
"routeName": " ", //选择的路由名称.
"routeAlias": " ", //待办选择的路由别名.
"opinion": " ", //处理意见.
"modified": true, //是否在前台保存过数据.
"viewTime": "2024-12-24 14:11:00", //最早查看时间.
"allowRapid": true, //允许快速处理.
"mediaOpinion": " ", //多媒体意见.
"first": true, //是否是第一条待办,用于区别待办和草稿.
"properties": {
"serialVersionUID": 1,
"prevTaskIdentity": " ", //上一人工环节处理人.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"title": " ", //标题.
"opinion": " ", //意见.
"prevTaskList": [
{
"routeName": " ", //路由名称
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}
], //上一人工环节待办对象列表.
"prevTask": {
"routeName": " ",
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}, //上一人工环节最近待办对象.
"pauseStartTime": "2022-07-27 13:29:35", //待办计时暂停工作时间时长(分钟).
"pauseWorkTimeMinutes": 1, //待办计时暂停工作时间时长(分钟).
"pauseMinutes": 1, //待办计时暂停自然时间时长(分钟).
}, //属性存储字段.
"series": " ", //操作序列号,同次操作将会有相同的序列号.
"pause": true, //待办是否处于挂起暂停计时状态.
"workCreateType": " ", //工作创建类型,surface,assign.
"label": " ", //待办凭证标识.
"distinguishedName": " ", //处理对象.
"fromDistinguishedName": " ", //授权处理对象.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getWork() → {Work|WorkCompleted}
获取当前流程实例对象:work对象或workCompleted对象。
Syntax
const work = this.workContext.getWork();
Returns
-
Work
WorkCompleted
流程实例对象;如果流程已结束,返回已结束的流程实例对象。
{
"id": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //数据库主键,自动生成.
"manualEmpowerMap": " ", //授权对象
"serviceValue": " ", //服务回调值
"goBackActivityToken": " ", //goBack进行跳转退回时使用的.
"goBackStore": {
"manualTaskIdentityMatrix": { //回退相关后续处理人
"matrix": [
[
"张三@zhangsan@I"
]
]
},
"activity": "db1f894f-86c8-4b73-8f08-c2dd00a075a1", //回退的活动
"ActivityType": "manual" //回退的活动类型
}, //回退临时存储数据.
"splitValueList": [
" "
], //要拆分的值
"embedTargetJob": " ", //Embed活动生成的Work的Job.
"embedCompleted": "true", //子流程返回标识.
"splitTokenValueMap": " ", //拆分值存储对象.
"parentWork": " ", //父工作,在当前工作是通过子流程调用时产生.
"parentJob": " ", //父工作Job,在当前工作是通过子流程调用时产生.
"tickets": {
"context": {
"e17fc446-4038-4ee1-a57f-b1dbec967a12": {
"label": "e17fc446-4038-4ee1-a57f-b1dbec967a12",//待办标识
"act": "create",//创建方式
"completed": false,//是否完成
"valid": true,//是否校验有效
"enable": true,//是否启用
"distinguishedName": "a@comp_a@I",//用户标识
"sibling": [],//兄弟节点标识列表
"fellow": [],//伙伴节点标识列表
"next": [],//下级节点标识列表
"mode": "single",//待办方式single(单人),parallel(并行),queue(串行)
"level": 1699343844646,//待办层级
"fromDistinguishedName": ""//授权自用户
}
},
"mode": "single" //待办方式single(单人),parallel(并行),queue(串行)
}, //待办凭证.
"forceRouteEnable": true, //强制路由.
"manualTaskIdentityText": "张三", //当前处理人身份合并文本,用','分割,此字段仅用于显示当前工作的处理人,不索引.
"job": " ", //工作
"title": "xx7月北京出差报销审批", //标题
"startTime": "2018-09-07 14:03:22", //工作开始时间
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"creatorPerson": "张三@zhangsan@P", //创建人,可能为空,如果由系统创建.
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity,可能为空,如果由系统创建.
"creatorUnit": "开发部@kfb@U", //创建人组织,可能为空,如果由系统创建。
"creatorUnitLevelName": "浙江兰德纵横网络技术股份有限公司/开发部", //创建人组织层级名.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用ID
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //当前活动ID.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityToken": " ", //活动的标识号,每进入一次活动将重新生成一次
"activityArrivedTime": "2018-09-27 22:49:21", //活动到达时间
"serial": " ", //编号
"dataChanged": true, //当前工作是否经过保存修改的操作,用于判断是否是默认生成的未经修改的.
"workThroughManual": true, //是否已经经过人工节点,用于判断是否是草稿.在到达环节进行判断.
"workCreateType": " ", //工作创建类型,surface,assgin
"workStatus": "processing", //可选值:start,processing,hanging, //工作状态
"beforeExecuted": true, //是否已经通过执行前
"splitting": true, //是否是拆分中的工作
"splitToken": " ", //拆分工作令牌
"splitTokenList": [
" "
], //拆分工作产生的Token
"splitValue": "xxxxxxxxxxxxxx", //拆分值
"form": "db3b2766-93a1-4058-b522-0edb922bd84f", //使用表单
"destinationRoute": " ", //到达使用的路由
"destinationRouteName": " ", //到达使用的路由
"destinationActivityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //当前活动类型
"destinationActivity": " ", //目标活动的ID
"expireTime": "2024-12-24 14:11:00", //任务截止时间.
"embedTargetWork": " ", //Embed活动生成的WorkId,用于在embed生成targetWork之后在inquire环节进行推动。
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"objectSecurityClearance": 1, //客体密级标识.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
{
"id": "be0195f1-f2e2-4eac-911c-99897a43ff8f", //数据库主键,自动生成.
"parentWork": " ", //父工作,在当前工作是通过子流程调用时产生.
"parentJob": " ", //父工作Job,在当前工作是通过子流程调用时产生.
"job": " ", //工作
"title": "xx7月北京出差报销审批", //标题
"startTime": "2018-09-19 16:14:16", //工作开始时间
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"completedTime": "2018-09-19 16:15:28", //工作开始时间
"completedTimeMonth": "2018-09", //用于在Filter中分类使用.由于是自动计算所以允许空
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人组织
"creatorUnitLevelName": "浙江兰德纵横网络技术股份有限公司/开发部", //创建人组织层级名.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用ID
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID
"processName": "报销审批流程", //流程名称
"processAlias": " ", //流程别名.
"serial": " ", //编号
"form": "320be1ca-ee49-478f-a751-f65ab67cf818", //使用表单ID
"work": " ", //Work Id.
"expireTime": "2024-12-24 14:11:00", //任务截止时间.
"expired": true, //是否超时.
"duration": 1, //工作时长(分钟数).
"allowRollback": true, //完成后是否允许回滚.
"activity": " ", //结束节点的活动id.
"activityName": " ", //结束节点的活动名称.
"activityAlias": " ", //结束节点的活动别名.
"activityDescription": " ", //结束节点的活动说明.
"completedType": " ", //结束类型.
"merged": true, //合并数据
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"objectSecurityClearance": 1, //客体密级标识.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getTaskList() → {Array.<Task>}
获取当前流程实例的所有待办对象。如果流程实例已流转完成,则返回一个空数组。
Syntax
const taskList = this.workContext.getTaskList();
Returns
-
Array.<Task>
待办任务列表.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //待办标识.
"routeNameDisable": true, //待办是否禁用routeName,退回待办如果设置way=jump将直接跳转,则无需routeName.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"prevTaskIdentity": " ", //上一人工环节处理人.
"act": " ", //Ticket创建方式,create,reset,add.
"job": " ", //任务.
"title": "XX7月北京出差报销审批", //标题.
"startTime": "2018-09-27 22:49:22", //开始时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"unit": "开发部@kfb@U", //当前处理人所在组织.
"empowerFromIdentity": " ", //授权自Identity
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人部门
"expireTime": "2024-12-24 14:11:00", //任务截止时间.
"expired": true, //是否已经超时.
"urgeTime": "2024-12-24 14:11:00", //催办时间.
"urged": true, //是否已经催办过.
"routeList": [
"89b58fe0-6dcb-4fe7-8c2e-3f77204df6d4"
"f3105b7a-2929-4682-aab8-15fef5ea0f23"
], //当前活动可供选择的路由.
"routeNameList": [
"退回申请人"
"送财务部门复审"
], //当前活动可供选择的路由名称.
"routeOpinionList": [
""
""
], //当前活动可供选择的路由对应的默认意见.
"routeDecisionOpinionList": [
" "
], //决策性意见列表,使用#分割.
"routeName": " ", //选择的路由名称.
"routeAlias": " ", //待办选择的路由别名.
"opinion": " ", //处理意见.
"modified": true, //是否在前台保存过数据.
"viewTime": "2024-12-24 14:11:00", //最早查看时间.
"allowRapid": true, //允许快速处理.
"mediaOpinion": " ", //多媒体意见.
"first": true, //是否是第一条待办,用于区别待办和草稿.
"properties": {
"serialVersionUID": 1,
"prevTaskIdentity": " ", //上一人工环节处理人.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"title": " ", //标题.
"opinion": " ", //意见.
"prevTaskList": [
{
"routeName": " ", //路由名称
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}
], //上一人工环节待办对象列表.
"prevTask": {
"routeName": " ",
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}, //上一人工环节最近待办对象.
"pauseStartTime": "2022-07-27 13:29:35", //待办计时暂停工作时间时长(分钟).
"pauseWorkTimeMinutes": 1, //待办计时暂停工作时间时长(分钟).
"pauseMinutes": 1, //待办计时暂停自然时间时长(分钟).
}, //属性存储字段.
"series": " ", //操作序列号,同次操作将会有相同的序列号.
"pause": true, //待办是否处于挂起暂停计时状态.
"workCreateType": " ", //工作创建类型,surface,assign.
"label": " ", //待办凭证标识.
"distinguishedName": " ", //处理对象.
"fromDistinguishedName": " ", //授权处理对象.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getTaskCompletedList() → {Array.<TaskCompleted>}
获取当前流程实例的所有已办对象。如果流程实例没有任何人处理过,则返回一个空数组。
Syntax
const taskCompletedList = this.workContext.getTaskCompletedList();
Returns
-
Array.<TaskCompleted>
已办任务列表.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //数据库主键,自动生成.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"prevTaskIdentity": " ", //上一人工环节处理人.
"act": " ", //Ticket创建方式,empower,create,reset,add.
"job": " ", //任务.
"title": "XX7月北京出差报销审批", //标题.
"startTime": "2018-09-27 22:49:22", //待办.已办的开始时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"completedTime": "2024-12-24 14:11:00", //task转成taskCompleted的完成时间,也就是任务的完成时间.
"completedTimeMonth": " ", //task转成taskCompleted的完成月份,也就是任务的完成时间,用于filter过滤.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"form": " ", //使用表单.
"completed": true, //整个job是否已经完成.
"workCompleted": " ", //WorkCompleted ID.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"empowerToIdentity": " ", //授权给谁处理,在processType=empower时记录授权对象
"empowerFromIdentity": " ", //授权自Identity
"unit": "开发部@kfb@U", //当前处理人所在部门.
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人组织
"expireTime": "2024-12-24 14:11:00", //任务截止时间.
"routeName": " ", //选择的路由名称.
"routeAlias": " ", //待办选择的路由别名.
"opinion": " ", //处理意见.
"task": " ", //Task ID.
"expired": true, //是否超时.
"duration": 1, //工作时长(分钟数).
"processingType": " ", //流程流转类型
"retractTime": "2024-12-24 14:11:00", //retract时间.
"latest": true, //同一Job中同一用户是否是最新的,多人可以有多条已办,页面显示的时候可以通过此标记仅显示一条最新的.
"mediaOpinion": " ", //多媒体意见.
"pressCount": 1, //提醒次数
"pressTime": "2024-12-24 14:11:00", //提醒办理时间.
"pressActivityToken": " ", //提醒办理环节.
"currentActivityName": " ", //当前活动名称.
"joinInquire": true, //已办是否参与路由.
"viewTime": "2024-12-24 14:11:00", //待办最早查看时间.
"distinguishedName": " ", //处理对象.
"properties": {
"serialVersionUID": 1,
"prevTaskIdentity": " ", //上一人工环节处理人.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"title": " ", //标题.
"opinion": " ", //意见.
"prevTaskList": [
{
"routeName": " ", //路由名称
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}
], //上一人工环节待办对象列表.
"prevTask": {
"routeName": " ",
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}, //上一人工环节最近待办对象.
"pauseStartTime": "2022-07-27 13:29:35", //待办计时暂停工作时间时长(分钟).
"pauseWorkTimeMinutes": 1, //待办计时暂停工作时间时长(分钟).
"pauseMinutes": 1, //待办计时暂停自然时间时长(分钟).
}, //属性对象存储字段.
"label": " ", //待办凭证标识.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getReadList() → {Array.<Read>}
Summary
获取当前流程实例的所有待阅对象数组。如果流程实例无待阅,则返回一个空数组。
Syntax
const readList = this.workContext.getReadList();
Returns
-
Array.<Read>
当前流程实例的所有待阅对象数组.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //数据库主键,自动生成.
"job": " ", //任务.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"workCompleted": " ", //完成工作ID.
"completed": true, //整个job是否已经完成.
"title": "XX7月北京出差报销审批", //标题.
"startTime": "2018-09-27 22:49:22", //开始时间.
"viewTime": "2024-12-24 14:11:00", //最早查看时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"unit": "开发部@kfb@U", //当前处理人所在组织.
"opinion": " ", //处理意见.
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID,针对已完成工作添加待阅字段为空.
"activityName": "部门领导审核", //活动名称,针对已完成工作添加待阅字段为空.
"activityAlias": " ", //活动别名,针对已完成工作添加待阅字段为空.
"activityDescription": " ", //活动说明,针对已完成工作添加待阅字段为空.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型,针对已完成工作添加待阅字段为空.
"activityToken": " ", //活动Token,针对已完成工作添加待阅字段为空.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人组织
"currentActivityName": " ", //当前活动名称.
"properties": {
"serialVersionUID": 1,
"title": " ", //标题
"opinion": " ", //意见
}, //属性对象存储字段.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getReadCompletedList() → {Array.<ReadCompleted>}
Summary
获取当前流程实例的所有已阅对象。如果流程实例没有已阅,则返回一个空数组。
Syntax
const readCompletedList = this.workContext.getReadCompletedList();
Returns
-
Array.<ReadCompleted>
当前流程实例的所有已阅对象数组.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //数据库主键,自动生成.
"job": " ", //任务.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"workCompleted": " ", //工作ID.
"completed": true, //整个job是否已经完成.
"read": " ", //待阅Id.
"title": "XX7月北京出差报销审批", //标题.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"unit": "开发部@kfb@U", //当前处理人所在组织.
"opinion": " ", //处理意见.
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人组织
"startTime": "2018-09-27 22:49:22", //开始时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"completedTime": "2024-12-24 14:11:00", //read转成readCompleted的完成时间,也就是任务的完成时间.
"completedTimeMonth": " ", //read转成readCompleted的完成月份,也就是任务的完成时间,用于filter过滤..
"duration": 1, //工作时长(分钟数).
"currentActivityName": " ", //当前活动名称.
"properties": {
"serialVersionUID": 1,
"title": " ", //标题
"opinion": " ", //意见
}, //属性对象存储字段.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getReviewList() → {Array.<Review>}
Summary
获取当前流程实例的所有review对象。如果流程实例没有review,则返回一个空数组。
Syntax
const reviewList = this.workContext.getReviewList();
Returns
-
Array.<Review>
当前流程实例的所有review对象数组.
{
"id": "609714b5-a0d6-4d25-a40b-5414f7253708", //数据库主键,自动生成.
"job": "fef0af55-cd42-4424-ace1-28bfcd3566db", //任务.
"work": "21404cd7-ab61-4bf4-a890-3fc8fb357379", //工作ID.
"workCompleted": " ", //工作ID.
"completed": true, //整个job是否已经完成.
"title": "文件标题", //标题.
"serial": " ", //编号
"startTime": "2021-12-15 14:03:50", //开始时间.
"startTimeMonth": "2021-12", //用于在Filter中分类使用.
"completedTime": "2024-12-24 14:11:00", //work的任务完成时间,review本身并没有完成时间.
"completedTimeMonth": " ", //work的任务完成月份,review本身并没有完成时间,用于filter过滤.
"application": "d2908ce7-6005-4d8c-bb02-6842e1d42bac", //应用.
"applicationName": "应用名称", //应用名称.
"applicationAlias": " ", //应用别名.
"process": "1533cb6a-6819-4c13-8fbd-acc15f40d903", //流程ID.
"processName": "流程名称", //流程名称.
"processAlias": " ", //流程别名.
"person": "xx@huqi@P", //人员,可以为空 ,记录启动活动的时候可能由程序启动
"creatorPerson": "xx@huqi@P", //创建人
"creatorIdentity": "xxx@97a0584c-b78d-4cf5-8813-b64d9d355369@I", //创建人Identity
"creatorUnit": "xxx@42a21689-1183-4b11-aeb0-2891a290a04e@U", //创建人组织
"currentActivityName": " ", //当前活动名称.
"permissionWrite": true, //编辑权限.
"properties": {
"title": " ", //标题
"serialVersionUID": 1
}, //属性对象存储字段.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"createTime": "2021-12-15 14:03:50", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2021-12-15 14:33:47" //修改时间,自动生成,索引创建在约束中.
}
Source
getJobTaskList()
Summary
getTaskListByJob方法的别名。
Source
getJobTaskCompletedList()
Summary
getTaskCompletedListByJob方法的别名。
Source
getJobReadList()
Summary
getReadListByJob方法的别名。
Source
getJobReadCompletedList()
Summary
getReadCompletedListByJob方法的别名。
Source
getJobReviewList()
Summary
getReviewList方法的别名。
Source
getTaskListByJob() → {Array.<Task>}
根据当前工作的job获取当前流程实例的所有待办对象。如果流程实例已流转完成,则返回一个空数组。
Syntax
const taskList = this.workContext.getTaskListByJob();
Returns
-
Array.<Task>
待办任务列表.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //待办标识.
"routeNameDisable": true, //待办是否禁用routeName,退回待办如果设置way=jump将直接跳转,则无需routeName.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"prevTaskIdentity": " ", //上一人工环节处理人.
"act": " ", //Ticket创建方式,create,reset,add.
"job": " ", //任务.
"title": "XX7月北京出差报销审批", //标题.
"startTime": "2018-09-27 22:49:22", //开始时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"unit": "开发部@kfb@U", //当前处理人所在组织.
"empowerFromIdentity": " ", //授权自Identity
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人部门
"expireTime": "2024-12-24 14:11:00", //任务截止时间.
"expired": true, //是否已经超时.
"urgeTime": "2024-12-24 14:11:00", //催办时间.
"urged": true, //是否已经催办过.
"routeList": [
"89b58fe0-6dcb-4fe7-8c2e-3f77204df6d4"
"f3105b7a-2929-4682-aab8-15fef5ea0f23"
], //当前活动可供选择的路由.
"routeNameList": [
"退回申请人"
"送财务部门复审"
], //当前活动可供选择的路由名称.
"routeOpinionList": [
""
""
], //当前活动可供选择的路由对应的默认意见.
"routeDecisionOpinionList": [
" "
], //决策性意见列表,使用#分割.
"routeName": " ", //选择的路由名称.
"routeAlias": " ", //待办选择的路由别名.
"opinion": " ", //处理意见.
"modified": true, //是否在前台保存过数据.
"viewTime": "2024-12-24 14:11:00", //最早查看时间.
"allowRapid": true, //允许快速处理.
"mediaOpinion": " ", //多媒体意见.
"first": true, //是否是第一条待办,用于区别待办和草稿.
"properties": {
"serialVersionUID": 1,
"prevTaskIdentity": " ", //上一人工环节处理人.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"title": " ", //标题.
"opinion": " ", //意见.
"prevTaskList": [
{
"routeName": " ", //路由名称
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}
], //上一人工环节待办对象列表.
"prevTask": {
"routeName": " ",
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}, //上一人工环节最近待办对象.
"pauseStartTime": "2022-07-27 13:29:35", //待办计时暂停工作时间时长(分钟).
"pauseWorkTimeMinutes": 1, //待办计时暂停工作时间时长(分钟).
"pauseMinutes": 1, //待办计时暂停自然时间时长(分钟).
}, //属性存储字段.
"series": " ", //操作序列号,同次操作将会有相同的序列号.
"pause": true, //待办是否处于挂起暂停计时状态.
"workCreateType": " ", //工作创建类型,surface,assign.
"label": " ", //待办凭证标识.
"distinguishedName": " ", //处理对象.
"fromDistinguishedName": " ", //授权处理对象.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getTaskCompletedListByJob() → {Array.<TaskCompleted>}
根据当前工作的job获取当前流程实例的所有已办对象。如果流程实例没有任何人处理过,则返回一个空数组。
Syntax
const taskCompletedList = this.workContext.getTaskCompletedListByJob();
Returns
-
Array.<TaskCompleted>
已办任务列表.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //数据库主键,自动生成.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"prevTaskIdentity": " ", //上一人工环节处理人.
"act": " ", //Ticket创建方式,empower,create,reset,add.
"job": " ", //任务.
"title": "XX7月北京出差报销审批", //标题.
"startTime": "2018-09-27 22:49:22", //待办.已办的开始时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"completedTime": "2024-12-24 14:11:00", //task转成taskCompleted的完成时间,也就是任务的完成时间.
"completedTimeMonth": " ", //task转成taskCompleted的完成月份,也就是任务的完成时间,用于filter过滤.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"form": " ", //使用表单.
"completed": true, //整个job是否已经完成.
"workCompleted": " ", //WorkCompleted ID.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"empowerToIdentity": " ", //授权给谁处理,在processType=empower时记录授权对象
"empowerFromIdentity": " ", //授权自Identity
"unit": "开发部@kfb@U", //当前处理人所在部门.
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人组织
"expireTime": "2024-12-24 14:11:00", //任务截止时间.
"routeName": " ", //选择的路由名称.
"routeAlias": " ", //待办选择的路由别名.
"opinion": " ", //处理意见.
"task": " ", //Task ID.
"expired": true, //是否超时.
"duration": 1, //工作时长(分钟数).
"processingType": " ", //流程流转类型
"retractTime": "2024-12-24 14:11:00", //retract时间.
"latest": true, //同一Job中同一用户是否是最新的,多人可以有多条已办,页面显示的时候可以通过此标记仅显示一条最新的.
"mediaOpinion": " ", //多媒体意见.
"pressCount": 1, //提醒次数
"pressTime": "2024-12-24 14:11:00", //提醒办理时间.
"pressActivityToken": " ", //提醒办理环节.
"currentActivityName": " ", //当前活动名称.
"joinInquire": true, //已办是否参与路由.
"viewTime": "2024-12-24 14:11:00", //待办最早查看时间.
"distinguishedName": " ", //处理对象.
"properties": {
"serialVersionUID": 1,
"prevTaskIdentity": " ", //上一人工环节处理人.
"prevTaskIdentityList": [
" "
], //上一人工环节处理人列表.
"title": " ", //标题.
"opinion": " ", //意见.
"prevTaskList": [
{
"routeName": " ", //路由名称
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}
], //上一人工环节待办对象列表.
"prevTask": {
"routeName": " ",
"unit": " ",
"identity": " ",
"person": " ",
"opinion": " ",
"startTime": "2022-07-27 13:29:35",
"completedTime": "2022-07-27 13:29:35",
"activity": "ce6ede22-d49d-44a7-a0a0-776951cb7348",
"activityToken": "cc9afcf8-388d-44d2-8801-97d0bc742674",
"activityName": "拟稿",
"activityType": "manual"
}, //上一人工环节最近待办对象.
"pauseStartTime": "2022-07-27 13:29:35", //待办计时暂停工作时间时长(分钟).
"pauseWorkTimeMinutes": 1, //待办计时暂停工作时间时长(分钟).
"pauseMinutes": 1, //待办计时暂停自然时间时长(分钟).
}, //属性对象存储字段.
"label": " ", //待办凭证标识.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getReadListByJob() → {Array.<Read>}
Summary
根据当前工作的job获取当前流程实例的所有待阅对象。如果流程实例无待阅,则返回一个空数组。
Syntax
const readList = this.workContext.getReadListByJob();
Returns
-
Array.<Read>
当前流程实例的所有待阅对象数组.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //数据库主键,自动生成.
"job": " ", //任务.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"workCompleted": " ", //完成工作ID.
"completed": true, //整个job是否已经完成.
"title": "XX7月北京出差报销审批", //标题.
"startTime": "2018-09-27 22:49:22", //开始时间.
"viewTime": "2024-12-24 14:11:00", //最早查看时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"unit": "开发部@kfb@U", //当前处理人所在组织.
"opinion": " ", //处理意见.
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID,针对已完成工作添加待阅字段为空.
"activityName": "部门领导审核", //活动名称,针对已完成工作添加待阅字段为空.
"activityAlias": " ", //活动别名,针对已完成工作添加待阅字段为空.
"activityDescription": " ", //活动说明,针对已完成工作添加待阅字段为空.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型,针对已完成工作添加待阅字段为空.
"activityToken": " ", //活动Token,针对已完成工作添加待阅字段为空.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人组织
"currentActivityName": " ", //当前活动名称.
"properties": {
"serialVersionUID": 1,
"title": " ", //标题
"opinion": " ", //意见
}, //属性对象存储字段.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getReadCompletedListByJob() → {Array.<ReadCompleted>}
Summary
根据当前工作的job获取当前流程实例的所有已阅对象。如果流程实例没有已阅,则返回一个空数组。
Syntax
const readCompletedList = this.workContext.getReadCompletedListByJob();
Returns
-
Array.<ReadCompleted>
当前流程实例的所有已阅对象数组.
{
"id": "dd476045-7c79-44f7-9dba-f51d322de40f", //数据库主键,自动生成.
"job": " ", //任务.
"work": "854e2c22-718e-48bb-98db-96f4b43e7ee8", //工作ID.
"workCompleted": " ", //工作ID.
"completed": true, //整个job是否已经完成.
"read": " ", //待阅Id.
"title": "XX7月北京出差报销审批", //标题.
"application": "1dc23336-6be6-402b-bed6-36e707a1dd17", //应用.
"applicationName": "财务管理", //应用名称.
"applicationAlias": "finance", //应用别名.
"process": "2207db11-dddf-4ebd-864d-3819f3e173c6", //流程ID.
"processName": "报销审批流程", //流程名称.
"processAlias": " ", //流程别名.
"serial": " ", //编号
"person": "张三@zhangsan@P", //当前处理人
"identity": "张三@kfb_zhangsan@I", //当前处理人Identity
"unit": "开发部@kfb@U", //当前处理人所在组织.
"opinion": " ", //处理意见.
"activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15", //活动ID.
"activityName": "部门领导审核", //活动名称.
"activityAlias": " ", //活动别名.
"activityDescription": " ", //活动说明.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"creatorPerson": "张三@zhangsan@P", //创建人
"creatorIdentity": "张三@kfb_zhangsan@I", //创建人Identity
"creatorUnit": "开发部@kfb@U", //创建人组织
"startTime": "2018-09-27 22:49:22", //开始时间.
"startTimeMonth": "2018-09", //用于在Filter中分类使用.
"completedTime": "2024-12-24 14:11:00", //read转成readCompleted的完成时间,也就是任务的完成时间.
"completedTimeMonth": " ", //read转成readCompleted的完成月份,也就是任务的完成时间,用于filter过滤..
"duration": 1, //工作时长(分钟数).
"currentActivityName": " ", //当前活动名称.
"properties": {
"serialVersionUID": 1,
"title": " ", //标题
"opinion": " ", //意见
}, //属性对象存储字段.
"stringValue01": " ", //业务数据String值01.
"stringValue02": " ", //业务数据String值02.
"stringValue03": " ", //业务数据String值03.
"stringValue04": " ", //业务数据String值04.
"stringValue05": " ", //业务数据String值05.
"stringValue06": " ", //业务数据String值06.
"stringValue07": " ", //业务数据String值07.
"stringValue08": " ", //业务数据String值08.
"stringValue09": " ", //业务数据String值09.
"stringValue10": " ", //业务数据String值10.
"booleanValue01": true, //业务数据Boolean值01.
"booleanValue02": true, //业务数据Boolean值02.
"doubleValue01": 1, //业务数据Double值01.
"doubleValue02": 1, //业务数据Double值02.
"doubleValue03": 1, //业务数据Double值03.
"doubleValue04": 1, //业务数据Double值04.
"doubleValue05": 1, //业务数据Double值05.
"longValue01": 1, //业务数据Long值01.
"longValue02": 1, //业务数据Long值02.
"longValue03": 1, //业务数据Long值03.
"longValue04": 1, //业务数据Long值04.
"longValue05": 1, //业务数据Long值05.
"dateTimeValue01": "2024-12-24 14:11:00", //业务数据DateTime值01.
"dateTimeValue02": "2024-12-24 14:11:00", //业务数据DateTime值02.
"dateTimeValue03": "2024-12-24 14:11:00", //业务数据DateTime值03.
"dateTimeValue04": "2024-12-24 14:11:00", //业务数据DateTime值04.
"dateTimeValue05": "2024-12-24 14:11:00", //业务数据DateTime值05.
"dateValue01": "2024-12-24 14:11:00", //业务数据Date值01.
"dateValue02": "2024-12-24 14:11:00", //业务数据Date值02.
"timeValue01": "2024-12-24 14:11:00", //业务数据Time值01.
"timeValue02": "2024-12-24 14:11:00", //业务数据Time值02.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getReviewListByJob()
Summary
getReviewList方法的别名。
Source
getActivity() → {Activity|Null}
获取当前流程实例所在的活动节点对象:activity对象。
Syntax
const activity = this.workContext.getActivity();
Returns
-
Activity
Null
当前流程实例所在的活动节点对象,如果当前流程实例已流转完成,则返回null.
{ "id": "801087c5-a4e6-4b91-bf4d-a81cdaa04471", //节点ID "name": "办理", //节点名称 "description": "", //节点描述 "alias": "", //节点别名 "resetRange": "department", //重置处理人范围 "resetCount": 0, //重置处理人数字 "allowReset": true, //是否允许重置 "manualMode": "single", //处理方式 单人single, 并行parallel, 串行queue, grab抢办 "customData": { //节点上的自定义属性,如果没有设置,不输出该值 } }
Source
getWorkLogList() → {Array.<WorkLog>}
Summary
获取当前流程实例的所有流程记录(WorkLog)。
Syntax
const workLogList = this.workContext.getWorkLogList();
Returns
-
Array.<WorkLog>
流程记录对象.
{
"id": " ", //工作日志标识.
"splitValueList": [
" "
], //拆分值列表.
"splitTokenList": [
" "
], //拆分标识列表.
"goBackFromActivity": " ", //退回发起活动环节标识.
"goBackFromActivityToken": " ", //退回发起活动环节令牌.
"tickets": [], //退回发起活动环节令牌.
"job": " ", //任务标识.
"work": " ", //工作标识.
"workCompleted": " ", //已完成工作标识.
"completed": true, //工作是否已经完成.
"fromActivity": " ", //开始活动标识.
"fromActivityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //开始活动类型.
"fromActivityName": " ", //开始活动名称.
"fromActivityAlias": " ", //开始活动别名.
"fromActivityToken": " ", //开始节点Token
"fromGroup": " ", //开始分组
"fromOpinionGroup": " ", //开始意见分组
"fromTime": "2024-12-24 14:11:00", //开始时间.
"arrivedActivity": " ", //结束活动Id,可能为空,如果是未Connected的流程记录
"arrivedActivityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //结束活动类型.
"arrivedActivityName": " ", //结束活动名称.
"arrivedActivityAlias": " ", //结束活动别名.
"arrivedActivityToken": " ", //结束活动Token.
"arrivedGroup": " ", //到达分组
"arrivedOpinionGroup": " ", //到达意见分组
"arrivedTime": "2024-12-24 14:11:00", //完成时间.
"application": " ", //应用.
"applicationName": " ", //应用名称.
"applicationAlias": " ", //应用别名.
"process": " ", //流程ID.
"processName": " ", //流程名称.
"processAlias": " ", //流程别名.
"route": " ", //到达节点使用的route ID.
"routeName": " ", //到达节点使用Route Name.
"connected": true, //是否已经完整填写了From和Arrived.
"duration": 1, //工作时长(分钟数).
"splitting": true, //是否是拆分中的工作,用于回溯时候将值改回去。
"splitToken": " ", //拆分工作令牌,用于回溯时候将值改回去。
"splitValue": " ", //拆分值,用于回溯时候将值改回去。
"splitWork": " ", //拆分自工作
"type": " ", //类型,与ProcessingAttributes的type对应.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getRecordList() → {Array.<Record>}
Summary
获取当前流程实例的所有流程记录(Record)。
Syntax
const recordList = this.workContext.getRecordList();
Returns
-
Array.<Record>
流程记录(Record)对象.
{
"id": " ", //数据库主键,自动生成.
"routeName": " ", //路由名称.
"opinion": " ", //意见.
"mediaOpinion": " ", //多媒体意见
"empowerFromIdentity": " ", //授权自身份
"nextManualList": [
{
"activity": "e9303aff-a87e-4a22-a341-7a2c35095d40",
"activityType": "manual",
"activityName": "审核",
"activityAlias": "",
"activityToken": "4c207f49-e616-4b02-9d6a-f40eeb299440",
"taskIdentityList": [
"开发1@bgs_kf1@I"
]
}
], //后续人工环节
"nextManualTaskIdentityList": [
" "
], //后续人工环节处理人
"startTime": "2024-12-24 14:11:00", //开始时间.
"personOrderNumber": 1, //人员排序值
"identityOrderNumber": 1, //身份排序值
"unitOrderNumber": 1, //组织排序值
"unitLevelName": " ", //组织层级
"application": " ", //应用.
"process": " ", //流程ID.
"job": " ", //任务标识
"work": " ", //工作
"workCompleted": " ", //已完成工作
"completed": true, //工作是否已经完成.
"display": true, //是否显示.
"order": 1, //显示排序.
"properties": {
"serialVersionUID": 1,
"identityOrderNumber": 1, //record中记录的处理人身份排序值.
"unitOrderNumber": 1, //record中记录的处理人身份所在组织排序值.
"unitLevelOrderNumber": " ", //record中记录的处理人身份所在组织层级排序值.
"unitDutyList": [
" "
], //record中记录的处理人身份所拥有的组织职务,向上递归.
"nextManualList": [
{
"activity": " ", //活动
"activityType": " ",//可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,parallel,service,split, //活动类型
"activityName": " ", //活动名称
"activityAlias": " ", //活动别名
"activityToken": " ", //活动活动令牌
"taskIdentityList": [
" "
] //待办处理人
}
], //后续人工环节
"nextManualTaskIdentityList": [
" "
], //后续人工环节处理人
"empowerToPerson": " ", //授权给处理人
"empowerToIdentity": " ", //授权给处理人的身份
"empowerFromIdentity": " ", //授权自身份
"empowerToUnit": " ", //授权给处理人的组织
"routeName": " ", //路由名称
"opinion": " ", //意见
"mediaOpinion": " ", //多媒体意见
"startTime": "2022-07-27 13:29:35", //开始时间.
"elapsed": 1, //耗时
"fromGroup": " ", //活动组
"fromOpinionGroup": " " //意见组
}, //属性对象存储字段.
"fromActivity": " ", //开始活动Id
"fromActivityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //开始活动类型.
"fromActivityName": " ", //开始活动名称
"fromActivityAlias": " ", //开始活动别名
"fromActivityToken": " ", //开始节点Token
"recordTime": "2024-12-24 14:11:00", //记录时间.
"person": " ", //记录人员
"identity": " ", //记录身份
"unit": " ", //记录人员所在组织.
"type": " ", //类型.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getRecord() → {Array.<Record>}
Summary
最后一条Record对象,在活动流转完成事件中,获取本次流转的record;在其它事件中获取的是整个job的最后一条record,并不是本次流转的record。
Syntax
const record = this.workContext.getRecord();
Returns
-
Array.<Record>
流程记录(Record)对象.
{
"id": " ", //数据库主键,自动生成.
"routeName": " ", //路由名称.
"opinion": " ", //意见.
"mediaOpinion": " ", //多媒体意见
"empowerFromIdentity": " ", //授权自身份
"nextManualList": [
{
"activity": "e9303aff-a87e-4a22-a341-7a2c35095d40",
"activityType": "manual",
"activityName": "审核",
"activityAlias": "",
"activityToken": "4c207f49-e616-4b02-9d6a-f40eeb299440",
"taskIdentityList": [
"开发1@bgs_kf1@I"
]
}
], //后续人工环节
"nextManualTaskIdentityList": [
" "
], //后续人工环节处理人
"startTime": "2024-12-24 14:11:00", //开始时间.
"personOrderNumber": 1, //人员排序值
"identityOrderNumber": 1, //身份排序值
"unitOrderNumber": 1, //组织排序值
"unitLevelName": " ", //组织层级
"application": " ", //应用.
"process": " ", //流程ID.
"job": " ", //任务标识
"work": " ", //工作
"workCompleted": " ", //已完成工作
"completed": true, //工作是否已经完成.
"display": true, //是否显示.
"order": 1, //显示排序.
"properties": {
"serialVersionUID": 1,
"identityOrderNumber": 1, //record中记录的处理人身份排序值.
"unitOrderNumber": 1, //record中记录的处理人身份所在组织排序值.
"unitLevelOrderNumber": " ", //record中记录的处理人身份所在组织层级排序值.
"unitDutyList": [
" "
], //record中记录的处理人身份所拥有的组织职务,向上递归.
"nextManualList": [
{
"activity": " ", //活动
"activityType": " ",//可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,parallel,service,split, //活动类型
"activityName": " ", //活动名称
"activityAlias": " ", //活动别名
"activityToken": " ", //活动活动令牌
"taskIdentityList": [
" "
] //待办处理人
}
], //后续人工环节
"nextManualTaskIdentityList": [
" "
], //后续人工环节处理人
"empowerToPerson": " ", //授权给处理人
"empowerToIdentity": " ", //授权给处理人的身份
"empowerFromIdentity": " ", //授权自身份
"empowerToUnit": " ", //授权给处理人的组织
"routeName": " ", //路由名称
"opinion": " ", //意见
"mediaOpinion": " ", //多媒体意见
"startTime": "2022-07-27 13:29:35", //开始时间.
"elapsed": 1, //耗时
"fromGroup": " ", //活动组
"fromOpinionGroup": " " //意见组
}, //属性对象存储字段.
"fromActivity": " ", //开始活动Id
"fromActivityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //开始活动类型.
"fromActivityName": " ", //开始活动名称
"fromActivityAlias": " ", //开始活动别名
"fromActivityToken": " ", //开始节点Token
"recordTime": "2024-12-24 14:11:00", //记录时间.
"person": " ", //记录人员
"identity": " ", //记录身份
"unit": " ", //记录人员所在组织.
"type": " ", //类型.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getAttachmentList() → {Array.<WorkAttachmentData>}
Summary
获取当前流程实例的附件对象列表。
Syntax
//获取附件列表
const attachmentList = this.workContext.getAttachmentList();
Returns
-
Array.<WorkAttachmentData>
附件数据.
{
"id": "56c4e86f-a4c8-4cc2-a150-1a0d2c5febcb", //数据库主键,自动生成.
"name": "133203a2-92e6-4653-9954-161b72ddb7f9.png", //文件名称,带扩展名的文件名.
"extension": "png", //扩展名。
"storage": " ", //关联的存储名称.
"length": 43864, //文件大小.
"workCreateTime": "2024-12-24 14:11:00", //关联的Work创建时间,用于分类目录。
"application": " ", //应用ID.
"process": " ", //流程ID.
"job": " ", //任务.
"person": "张三@zhangsan@P", //文件所有者
"lastUpdateTime": "2018-09-27 15:50:34", //最后更新时间
"lastUpdatePerson": "张三@zhangsan@P", //最后更新人员
"activity": "e31ad938-c495-45a6-8d77-b8a9b61a165b", //活动标识,可以为空,在给已完成工作添加附件时值为空.
"activityName": "申请人", //活动名称.
"activityType": "manual", //可选值:agent,begin,cancel,choice,delay,end,embed,invoke,manual,merge,message,parallel,service,split,publish, //活动类型.
"activityToken": " ", //活动Token.
"completed": true, //整个job是否已经完成.
"workCompleted": " ", //工作ID.
"work": " ", //已完成工作ID.
"site": "$mediaOpinion", //附件框分类.
"type": "image/png", //根据流文件判断的文件类型.
"text": " ", //文本.
"readIdentityList": [
" "
], //可以访问的身份.
"readUnitList": [
" "
], //可以访问的组织.
"editIdentityList": [
" "
], //可以修改的用户.
"editUnitList": [
" "
], //可以修改的组织.
"controllerIdentityList": [
" "
], //可以管理的用户.
"controllerUnitList": [
" "
], //可以管理的组织.
"deepPath": true, //是否使用更深的路径.
"orderNumber": 1, //排序号,升序排列,为空在最后
"divisionList": [
" "
], //分组.
"fromJob": " ", //附件拷贝来源任务,仅soft拷贝模式存储.
"fromId": " ", //附件拷贝来源附件ID,仅soft拷贝模式存储.
"fromPath": " ", //附件拷贝来源存储路径,仅soft拷贝模式存储.
"businessId": " ", //附件业务ID,需要和job一起来确定唯一的ID.
"stringValue01": " ", //预留数据String值01.
"stringValue02": " ", //预留数据String值02.
"stringValue03": " ", //预留数据String值03.
"objectSecurityClearance": 1, //客体密级标识.
"encryptKey": " ", //文件密钥.
"createTime": "2024-12-24 14:11:00", //创建时间,自动生成,索引创建在约束中.
"updateTime": "2024-12-24 14:11:00" //修改时间,自动生成,索引创建在约束中.
}
Source
getRouteList() → {Array.<Route>}
Summary
获取可选路由对象数组的字符串(流转事件中,获取到流转中的可选路由列表,根据当前work状态获取)。
Syntax
const routeList = this.workContext.getRouteList();
Returns
-
Array.<Route>
路由字符串数组.
Source
setTitle(title)
Summary
重新设置流程实例标题
Syntax
this.workContext.setTitle(title);
Parameters
-
title
String
标题字符串.
Example
this.workContext.setTitle("标题");