Quintiq file version 2.0
|
#parent: #root
|
Method FindCreateProcessNodeAndEdge (
|
output owning shadow[SCVConfiguration] scvConfig,
|
shadow[SCVNode] ownernode,
|
Process_MP process,
|
Boolean isupstream,
|
output Number depth
|
) as shadow[SCVNode] id:Method_FormSupplyChainVisualization_FindCreateProcessNodeAndEdge
|
{
|
#keys: '[134266.1.1593330686]'
|
Body:
|
[*
|
// Generate upstream routing steps or lanes node
|
scvNode := null( shadow[SCVNode] );
|
|
if( process.istype( Operation ) )
|
{
|
scvNode := this.CreateSCVRoutingStepNode( &scvConfig, ownernode, process.astype( Operation ), isupstream );
|
}
|
else if( process.istype( LaneLeg ) )
|
{
|
scvNode := this.CreateSCVLaneNode( &scvConfig, ownernode, process.astype( LaneLeg ), isupstream );
|
}
|
|
depth := ifexpr( isupstream, scvConfig.UpstreamDepthLimit(), scvConfig.DownstreamDepthLimit() ) - scvNode.Depth();
|
|
value := max( scvConfig, SCVNode, e,
|
e.Depth() = scvNode.Depth()
|
and e.IsUpstream() = scvNode.IsUpstream(),
|
e.SortSequence() );
|
|
scvNode.SortSequence( value + 1 );
|
|
return scvNode;
|
*]
|
}
|