| Quintiq file version 2.0 | 
| #parent: #root | 
| Method GetHasValidOutputRecipe ( | 
|   output Strings feedback_o, | 
|   output Strings sanitycheckfeedback | 
| ) declarative remote as Boolean | 
| { | 
|   Description: 'check if the blending operation has valid output' | 
|   TextBody: | 
|   [* | 
|     // desmondt Nov-12-2014 (created) | 
|      | 
|     isvalid := true | 
|      | 
|     if( this.IsBlending() ) | 
|     { | 
|       uniquerecipe := selectuniquevalues( this, OperationOutput.ProductInStockingPoint_MP.Product_MP.RecipeWithEffectiveDate, re, | 
|                                           true, | 
|                                           re.RecipeName() ) | 
|      | 
|       isvalid := uniquerecipe.Size() = 1; | 
|      | 
|       if( not isnull( feedback_o ) and not isvalid ) | 
|       { | 
|         name := MacroPlan::GetSubstituteName( this.Name() ); | 
|         feedback_o.Add( SanityCheckMessage::GetFormattedMessage( Translations::MP_Process_Instance( this.DefinitionName(), name ), | 
|                                                                  Translations::MP_Operation_ViolateHasValidOutputRecipe() ) ); | 
|         sanitycheckfeedback.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue() ); | 
|       } | 
|     } | 
|      | 
|     return true; | 
|   *] | 
| } |