Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod CreateOrUpdate ( 
 | 
  const Operation op, 
 | 
  GlobalOTDSOP parent 
 | 
) as ManufactureLTProcessSection 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // yypsybs Aug-25-2023 (created) 
 | 
    orgCode := ""; 
 | 
    productId := ""; 
 | 
    processStep := ""; 
 | 
    sequence := ""; 
 | 
    line := ""; 
 | 
    // routingId = OrgCode_ProductID 
 | 
    routingIdSplit := op.RoutingID().Tokenize( "_" ); 
 | 
    if( routingIdSplit.Size() = 2 ) { 
 | 
        orgCode := routingIdSplit.Element( 0 ); 
 | 
        productId := routingIdSplit.Element( 1 ); 
 | 
    } 
 | 
    // routingStepName = ProcessStep_Sequence 
 | 
    routingStepNameSplit := op.RoutingStepName().Tokenize( "_" ); 
 | 
    if( routingStepNameSplit.Size() = 2 ) { 
 | 
        processStep := routingStepNameSplit.Element( 0 ); 
 | 
        sequence := routingStepNameSplit.Element( 1 ); 
 | 
    } 
 | 
    // operationName = OegCode_ProcessStep_Line 
 | 
    operationNameSplit := op.Name().Tokenize( "_" ); 
 | 
    if( operationNameSplit.Size() = 3 ) { 
 | 
        line := operationNameSplit.Element( 2 ); 
 | 
    } 
 | 
    child := null( ManufactureLTProcessSection ); 
 | 
    //if( orgCode <> "" and productId <> "" and processStep <> "" and sequence <> "" ) { 
 | 
      ltParent := ManufactureLTImputation::CreateOrUpdate( parent, orgCode, productId, "" ); 
 | 
      info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() ); 
 | 
      child := ManufactureLTProcessSection::CreateOrUpdate( ltParent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" ); 
 | 
    //} else { 
 | 
    //  info( "skip operation" ); 
 | 
    //} 
 | 
    return child; 
 | 
  *] 
 | 
} 
 |