Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method ReceiveMetadata (owning NamedValueTree nvt_i, LibDEF_System sender_i, LibDEF_IntegrationEvent event_i) 
 | 
{ 
 | 
  Description: 'Receive Metadata message, to be handled by the System of the sender, or the System representing local.' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Jacky CHAN May-16-2016 (created) 
 | 
    // retrieve kind 
 | 
    kind := LibDEF_DataAccessor::GetHeaderPropertyAsString( nvt_i, LibDEF_DataAccessor::HEADER_KIND() ); 
 | 
     
 | 
    // extract body 
 | 
    nvBody := LibDEF_DataAccessor::GetMetadataBody( nvt_i ); 
 | 
     
 | 
    if( kind = LibDEF_DataAccessor::KIND_REQUEST() ) 
 | 
    { 
 | 
      this.ReceiveMetadataRequest( &nvt_i, nvBody, sender_i, event_i ); 
 | 
    } 
 | 
    else if( kind = LibDEF_DataAccessor::KIND_SUCCESS() ) 
 | 
    { 
 | 
      this.ReceiveMetadataSuccess( nvt_i, nvBody, sender_i, event_i ); 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      LibDEF_Util::EventLogError( event_i,  
 | 
                                  "Failed to process Metadata message", 
 | 
                                  "Failed to process Metadata message, no handler defined for the Kind '" + kind + "'." ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |