function DoGetNode(ANodes: TStrings; AProcUnit: TProcUnit): TFlowOutUnitNode;
var
I: Integer;
begin
Result := nil;
for I := 0 to ANodes.Count - 1 do
if TFlowOutUnitNode(ANodes.Objects[I]).FlowUnit.ProcUnit = AProcUnit then
begin
Result := TFlowOutUnitNode(ANodes.Objects[I]);
Exit;
end;
for I := 0 to ANodes.Count - 1 do
if TFlowOutUnitNode(ANodes.Objects[I]).FlowInSubProcUnit = AProcUnit then
begin
Result := TFlowOutUnitNode(ANodes.Objects[I]);
Exit;
end;