| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod CreateOrUpdate ( | 
|   Operation op | 
| ) 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 <> "" ) { | 
|         parent := ManufactureLTImputation::CreateOrUpdate( op.RoutingStep().Routing().MacroPlan(), orgCode, productId, "" ); | 
|         info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() ); | 
|         child := ManufactureLTProcessSection::CreateOrUpdate( parent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" ); | 
|     } | 
|     return child; | 
|   *] | 
| } |