Quintiq file version 2.0
|
#parent: #root
|
Method GetHasValidOperationInputOutput (
|
output Strings feedback_o,
|
output Strings sanitycheckfeedback_o
|
) declarative remote #extension
|
{
|
TextBody:
|
[*
|
// desmondt Oct-3-2014 (created)
|
feedback := '';
|
sanitycheckfeedback := ''
|
|
if( ( this.Unit().QuantityToProcess() = GlobalParameters_MP::GetQTProcessIn()
|
or not this.Unit().IsSupplier() ) // Tianma change 20230925: If the unit is not a supplier, raise a data issue if there's no input
|
and this.OperationInput( relsize ) = 0 )
|
{
|
feedback := Translations::MP_Operation_ViolateHasValidOperationInputOutput_NoOperationInput();
|
sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue() );
|
}
|
else if( this.Unit().QuantityToProcess() = GlobalParameters_MP::GetQTProcessOut()
|
and this.OperationOutput( relsize ) = 0 )
|
{
|
feedback := Translations::MP_Operation_ViolateHasValidOperationInputOutput_NoOperationOutput();
|
sanitycheckfeedback := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue();
|
}
|
|
if( not isnull( feedback_o ) and feedback <> '' )
|
{
|
name := MacroPlan::GetSubstituteName( this.Name() ); // To avoid empty name/name too long
|
feedback_o.Add( SanityCheckMessage::GetFormattedMessage( Translations::MP_Process_Instance( this.DefinitionName(), name ),
|
feedback ) );
|
sanitycheckfeedback_o.Add( sanitycheckfeedback );
|
}
|
|
return feedback = '';
|
*]
|
}
|