您的当前位置:首页正文

flowable多实例动态添加人

2023-03-26 来源:伴沃教育
flowable多实例动态添加⼈

背景:

由于在⽇常情况下,我们的多实例要动态添加⼈员的场景,有没有这样的api呢?新的flowable有这样的功能。具体实现xml

assigneeList

${nrOfCompletedInstances/nrOfInstances >= 0.6 }

具体实现

List assigneeList = Arrays.asList(\"kermit\

String procId = runtimeService.startProcessInstanceByKey(\"miParallelUserTasksBasedOnCollection\

List tasks = taskService.createTaskQuery().orderByTaskAssignee().asc().list();assertEquals(5, tasks.size());

assertEquals(\"bubba\assertEquals(\"fozzie\assertEquals(\"gonzo\assertEquals(\"kermit\assertEquals(\"mispiggy\

runtimeService.addMultiInstanceExecution(\"miTasksasks = taskService.createTaskQuery().orderByTaskAssignee().asc().list();assertEquals(6, tasks.size());

说明:

runtimeService.addMultiInstanceExecution(要加签的节点id,流程实例id, Collections.singletonMap(\"单个对象的别名\对象值\"));

因篇幅问题不能全部显示,请点此查看更多更全内容