Activit7 工作流 通过解析流程图获取当前节点网关上的判断值
public void getGatewayNode(String processDefinitionId, String nodeKey) {
List<ActGatewayTaskConfig> taskConfigList = new LinkedList<>();
if (StringUtils.isBlank(nodeKey)) {
return taskConfigList;
}
// 根据 部署ID 获取流程id
ProcessEngine defaultProcessEngine = ProcessEngines.getDefaultProcessEngine();
RepositoryService repositoryService = defaultProcessEngine.getRepositoryService();
// 根据流程ID 获取流程图
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId);
// 获取流程图所有网关
List<Gateway> gatewayList = bpmnModel.getMainProcess().findFlowElementsOfType(Gateway.class);
for (Gateway gateway : gatewayList) {
// 根据当前节点过滤,获取指定节点的网关
List<SequenceFlow> flows = gateway.getIncomingFlows().stream().filter(flow -> nodeKey.equals(flow.getSourceRef())).collect