工作流 Flowable 节点*跳转

Flowable6已经实现了流程节点间的跳转,本次就初探一下相关的API。

相关的示例代码在Flowable的开源代码中可以找到,具体的位置如下:

\modules\flowable-engine\src\test\java\org\flowable\engine\test\api\runtime\changestate

代码:

/**
 * 移动节点
 * www.fhadmin.org
 */
@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();

 


上一篇:canOpen学习二之canOpen应用实现请求节点状态、改变节点状态、写字典、读字典


下一篇:The Ethereum devp2p and discv4 protocol Part II