Flowable6已经实现了流程节点间的跳转,本次就初探一下相关的API。
相关的示例代码在Flowable的开源代码中可以找到,具体的位置如下:
代码:
-
/**
-
* 移动节点
-
* fhadmin.cn
-
*/
-
@RequestMapping(value = "move/{proInstId}/{nodeId}/{toNodeId}")
-
public void move(@PathVariable("proInstId") String proInstId,
-
@PathVariable("nodeId") String nodeId,
-
@PathVariable("toNodeId") String toNodeId) {
-
runtimeService.createChangeActivityStateBuilder()
-
.processInstanceId(proInstId)
-
.moveActivityIdTo(nodeId, toNodeId)
-
.changeState();
-
}
-
runtimeService.createChangeActivityStateBuilder()
-
.processInstanceId(proInstId)
-
.moveActivityIdTo(nodeId, toNodeId)
-
.changeState()
-
runtimeService.createChangeActivityStateBuilder()
-
.processInstanceId(proInstId)
-
.moveActivityIdTo(nodeId, toNodeId)
-
.changeState()
阅读(831) | 评论(0) | 转发(0) |