|
@@ -294,15 +294,40 @@ namespace Learun.Workflow.Engine |
|
|
|
|
|
|
|
|
List<NWFNodeInfo> nextNodes = new List<NWFNodeInfo>(); |
|
|
List<NWFNodeInfo> nextNodes = new List<NWFNodeInfo>(); |
|
|
//如果lastNode 不为空,直接执行最后一条线的绑定方法 并终止任务 |
|
|
//如果lastNode 不为空,直接执行最后一条线的绑定方法 并终止任务 |
|
|
List<NWFLineInfo> lineList1=new List<NWFLineInfo>(); |
|
|
|
|
|
|
|
|
List<NWFLineInfo> lineList1 = new List<NWFLineInfo>(); |
|
|
if (overFW) |
|
|
if (overFW) |
|
|
{ |
|
|
{ |
|
|
lineList1.Add(wfScheme.lines.Last()); |
|
|
|
|
|
|
|
|
//20221202 liangkun |
|
|
|
|
|
//修改判断最后线段方法,之前直接获取last线段有问题 |
|
|
|
|
|
//设计器并非所有情况都会把最后一条线段放在last位置 |
|
|
|
|
|
//判断last节点是否是end节点之前的线 |
|
|
|
|
|
//先获取所节点 |
|
|
|
|
|
var allnodes = wfScheme.nodes; |
|
|
|
|
|
//查找结束节点 |
|
|
|
|
|
var endnode = allnodes.Find(m => m.type == "endround"); |
|
|
|
|
|
//查到结束节点 |
|
|
|
|
|
if (endnode != null) |
|
|
|
|
|
{ |
|
|
|
|
|
//使用结束节点的id到线条集合内查找,查询到to结束节点的线条本身并赋值 |
|
|
|
|
|
//to结束节点的线,即是最后的线条,一般绑定事件都会在此线段上 |
|
|
|
|
|
var endline = wfScheme.lines.Find(m => m.to == endnode.id); |
|
|
|
|
|
if (endline != null) |
|
|
|
|
|
{ |
|
|
|
|
|
lineList1.Add(endline); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
lineList1.Add(wfScheme.lines.Last()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else//未查到结束节点,直接赋值最后的线条 |
|
|
|
|
|
{ |
|
|
|
|
|
lineList1.Add(wfScheme.lines.Last()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
lineList1 = wfScheme.lines; |
|
|
lineList1 = wfScheme.lines; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 找到与当前节点相连的线条 |
|
|
// 找到与当前节点相连的线条 |
|
@@ -358,6 +383,15 @@ namespace Learun.Workflow.Engine |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
//20221202 liangkun 配合以上代码添加结束节点以及线段并返回 |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if (overFW) |
|
|
|
|
|
{ |
|
|
|
|
|
lineList.Add(line); |
|
|
|
|
|
nextNodes.Add(nodesMap[line.to]); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
return nextNodes; |
|
|
return nextNodes; |
|
|
|
|
|
|
|
|