去向地详细
This commit is contained in:
@@ -111,12 +111,16 @@ public class FlowableUtils {
|
||||
}
|
||||
// 类型为子流程,则添加子流程开始节点出口处相连的节点
|
||||
if (sequenceFlow.getSourceFlowElement() instanceof SubProcess) {
|
||||
// 获取子流程用户任务节点
|
||||
List<UserTask> childUserTaskList = findChildProcessUserTasks((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, null);
|
||||
// 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
|
||||
if (childUserTaskList != null && childUserTaskList.size() > 0) {
|
||||
userTaskList.addAll(childUserTaskList);
|
||||
continue;
|
||||
// 获取子流程元素集合
|
||||
Collection<FlowElement> subProcessElements = ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements();
|
||||
if (subProcessElements != null && !subProcessElements.isEmpty()) {
|
||||
// 获取子流程用户任务节点
|
||||
List<UserTask> childUserTaskList = findChildProcessUserTasks((StartEvent) subProcessElements.toArray()[0], null, null);
|
||||
// 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
|
||||
if (childUserTaskList != null && childUserTaskList.size() > 0) {
|
||||
userTaskList.addAll(childUserTaskList);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 继续迭代
|
||||
@@ -162,11 +166,14 @@ public class FlowableUtils {
|
||||
}
|
||||
// 如果节点为子流程节点情况,则从节点中的第一个节点开始获取
|
||||
if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {
|
||||
List<UserTask> childUserTaskList = iteratorFindChildUserTasks((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), runTaskKeyList, hasSequenceFlow, null);
|
||||
// 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
|
||||
if (childUserTaskList != null && childUserTaskList.size() > 0) {
|
||||
userTaskList.addAll(childUserTaskList);
|
||||
continue;
|
||||
Collection<FlowElement> subProcessElements = ((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements();
|
||||
if (subProcessElements != null && !subProcessElements.isEmpty()) {
|
||||
List<UserTask> childUserTaskList = iteratorFindChildUserTasks((FlowElement) subProcessElements.toArray()[0], runTaskKeyList, hasSequenceFlow, null);
|
||||
// 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
|
||||
if (childUserTaskList != null && childUserTaskList.size() > 0) {
|
||||
userTaskList.addAll(childUserTaskList);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 继续迭代
|
||||
@@ -206,11 +213,14 @@ public class FlowableUtils {
|
||||
}
|
||||
// 如果节点为子流程节点情况,则从节点中的第一个节点开始获取
|
||||
if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {
|
||||
List<UserTask> childUserTaskList = findChildProcessUserTasks((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, null);
|
||||
// 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
|
||||
if (childUserTaskList != null && childUserTaskList.size() > 0) {
|
||||
userTaskList.addAll(childUserTaskList);
|
||||
continue;
|
||||
Collection<FlowElement> subProcessElements = ((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements();
|
||||
if (subProcessElements != null && !subProcessElements.isEmpty()) {
|
||||
List<UserTask> childUserTaskList = findChildProcessUserTasks((FlowElement) subProcessElements.toArray()[0], hasSequenceFlow, null);
|
||||
// 如果找到节点,则说明该线路找到节点,不继续向下找,反之继续
|
||||
if (childUserTaskList != null && childUserTaskList.size() > 0) {
|
||||
userTaskList.addAll(childUserTaskList);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 继续迭代
|
||||
@@ -260,12 +270,15 @@ public class FlowableUtils {
|
||||
}
|
||||
// 如果该节点为开始节点,且存在上级子节点,则顺着上级子节点继续迭代
|
||||
if (sequenceFlow.getSourceFlowElement() instanceof SubProcess) {
|
||||
dirtyRoads = findChildProcessAllDirtyRoad((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, dirtyRoads);
|
||||
// 是否存在子流程上,true 是,false 否
|
||||
Boolean isInChildProcess = dirtyTargetInChildProcess((StartEvent) ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements().toArray()[0], null, targets, null);
|
||||
if (isInChildProcess) {
|
||||
// 已在子流程上找到,该路线结束
|
||||
continue;
|
||||
Collection<FlowElement> subProcessElements = ((SubProcess) sequenceFlow.getSourceFlowElement()).getFlowElements();
|
||||
if (subProcessElements != null && !subProcessElements.isEmpty()) {
|
||||
dirtyRoads = findChildProcessAllDirtyRoad((StartEvent) subProcessElements.toArray()[0], null, dirtyRoads);
|
||||
// 是否存在子流程上,true 是,false 否
|
||||
Boolean isInChildProcess = dirtyTargetInChildProcess((StartEvent) subProcessElements.toArray()[0], null, targets, null);
|
||||
if (isInChildProcess) {
|
||||
// 已在子流程上找到,该路线结束
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 继续迭代
|
||||
@@ -303,7 +316,10 @@ public class FlowableUtils {
|
||||
dirtyRoads.add(sequenceFlow.getTargetFlowElement().getId());
|
||||
// 如果节点为子流程节点情况,则从节点中的第一个节点开始获取
|
||||
if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {
|
||||
dirtyRoads = findChildProcessAllDirtyRoad((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, dirtyRoads);
|
||||
Collection<FlowElement> subProcessElements = ((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements();
|
||||
if (subProcessElements != null && !subProcessElements.isEmpty()) {
|
||||
dirtyRoads = findChildProcessAllDirtyRoad((FlowElement) subProcessElements.toArray()[0], hasSequenceFlow, dirtyRoads);
|
||||
}
|
||||
}
|
||||
// 继续迭代
|
||||
dirtyRoads = findChildProcessAllDirtyRoad(sequenceFlow.getTargetFlowElement(), hasSequenceFlow, dirtyRoads);
|
||||
@@ -343,7 +359,10 @@ public class FlowableUtils {
|
||||
}
|
||||
// 如果节点为子流程节点情况,则从节点中的第一个节点开始获取
|
||||
if (sequenceFlow.getTargetFlowElement() instanceof SubProcess) {
|
||||
inChildProcess = dirtyTargetInChildProcess((FlowElement) (((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements().toArray()[0]), hasSequenceFlow, targets, inChildProcess);
|
||||
Collection<FlowElement> subProcessElements = ((SubProcess) sequenceFlow.getTargetFlowElement()).getFlowElements();
|
||||
if (subProcessElements != null && !subProcessElements.isEmpty()) {
|
||||
inChildProcess = dirtyTargetInChildProcess((FlowElement) subProcessElements.toArray()[0], hasSequenceFlow, targets, inChildProcess);
|
||||
}
|
||||
}
|
||||
// 继续迭代
|
||||
inChildProcess = dirtyTargetInChildProcess(sequenceFlow.getTargetFlowElement(), hasSequenceFlow, targets, inChildProcess);
|
||||
|
||||
Reference in New Issue
Block a user