Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod CreateMacroPlanMessage ( 
 | 
  MacroPlan macroplan 
 | 
) 
 | 
{ 
 | 
  Description: 'create sanity check message for macroplan' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // desmondt Nov-10-2014 (created) 
 | 
     
 | 
    invalidmp := select( macroplan, SanityCheckGroupData.InvalidMacroPlan, im, true ); 
 | 
     
 | 
    if( not isnull( invalidmp ) ) 
 | 
    { 
 | 
      feedbacks := construct( Strings ); 
 | 
      sanitycheckfeedbacks := construct( Strings ); 
 | 
       
 | 
      invalidmp.DoSanityCheckData( feedbacks, sanitycheckfeedbacks ); 
 | 
       
 | 
      i := 0; 
 | 
      traverse( feedbacks, Elements, fb ) 
 | 
      { 
 | 
        if( not exists( invalidmp, SanityCheckMessageData, msg, msg.Description() = fb ) ) 
 | 
        { 
 | 
          //tokenize msg to retrieve category level and seperate the actual feedback 
 | 
          sanitycheckmessage := SanityCheckMessageData::Create( invalidmp.AsInvalidMacroPlan(),  
 | 
                                                                fb,  
 | 
                                                                true, 
 | 
                                                                sanitycheckfeedbacks.Element( i ) ); 
 | 
          sanitycheckmessage.MacroPlan( relset, macroplan ); 
 | 
        } 
 | 
        i := i + 1; 
 | 
      } 
 | 
    } 
 | 
  *] 
 | 
} 
 |