update - 调整获取模型的参数定义
This commit is contained in:
parent
b4182c94ae
commit
79047843df
@ -379,7 +379,7 @@ public final class BpmnJsonConverterUtil {
|
||||
* @return 创建的节点的 ID
|
||||
*/
|
||||
private static List<String> create(BpmnJsonNode bpmnJsonNode, Process mainProcess,
|
||||
BpmnModel bpmnModel, String... preNodeIds) {
|
||||
BpmnModel bpmnModel, String... preNodeIds) {
|
||||
FLAT_NODE_MAP.put(bpmnJsonNode.getId(), bpmnJsonNode);
|
||||
// 设置来源节点
|
||||
bpmnJsonNode.setIncoming(Lists.newArrayList(preNodeIds));
|
||||
@ -446,23 +446,26 @@ public final class BpmnJsonConverterUtil {
|
||||
// branch == node_condition
|
||||
BpmnJsonNode nextJsonNode = Objects.isNull(branch.getChildren()) ? bpmnJsonNode.getChildren() :
|
||||
branch.getChildren();
|
||||
nextJsonNode.setIncoming(Lists.newArrayList(gateway.getId()));
|
||||
if (Objects.nonNull(nextJsonNode)) {
|
||||
|
||||
// 将 node_condition 放入计算节点的上级属性中,方便顺序流转换器对条件进行处理
|
||||
nextJsonNode.setPreJsonNode(branch);
|
||||
SequenceFlow sequenceFlow = (SequenceFlow) convertJsonToElement(SequenceFlow.class, nextJsonNode,
|
||||
mainProcess);
|
||||
mainProcess.addFlowElement(sequenceFlow);
|
||||
nextJsonNode.setIncoming(Lists.newArrayList(gateway.getId()));
|
||||
|
||||
// 设置网关默认流
|
||||
if (Objects.nonNull(branch.getProperty()) && Boolean.TRUE.equals(branch.getProperty().getDefaultBranch())) {
|
||||
// 如果是默认流, 以防止前端输入错误, 强制置空
|
||||
sequenceFlow.setConditionExpression(null);
|
||||
gateway.setDefaultFlow(sequenceFlow.getId());
|
||||
}
|
||||
// 将 node_condition 放入计算节点的上级属性中,方便顺序流转换器对条件进行处理
|
||||
nextJsonNode.setPreJsonNode(branch);
|
||||
SequenceFlow sequenceFlow = (SequenceFlow) convertJsonToElement(SequenceFlow.class, nextJsonNode,
|
||||
mainProcess);
|
||||
mainProcess.addFlowElement(sequenceFlow);
|
||||
|
||||
if (Objects.nonNull(branch.getChildren()) && StringUtils.hasLength(branch.getChildren().getId())) {
|
||||
branchLastNodeIds.addAll(create(branch.getChildren(), mainProcess, bpmnModel));
|
||||
// 设置网关默认流
|
||||
if (Objects.nonNull(branch.getProperty()) && Boolean.TRUE.equals(branch.getProperty().getDefaultBranch())) {
|
||||
// 如果是默认流, 以防止前端输入错误, 强制置空
|
||||
sequenceFlow.setConditionExpression(null);
|
||||
gateway.setDefaultFlow(sequenceFlow.getId());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(branch.getChildren()) && StringUtils.hasLength(branch.getChildren().getId())) {
|
||||
branchLastNodeIds.addAll(create(branch.getChildren(), mainProcess, bpmnModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user