Quintiq file version 2.0
|
#parent: #root
|
Method DataInstantiateInChannelOfDataManager (NamedValueTree nvt_i, LibDMF_Set set_i) as LibDMF_Set
|
{
|
Description:
|
[*
|
Instantiate the data from the NVT as objects in the Channel in the DataManager.
|
(1) In the DM the objects must be related to a Set.
|
*]
|
TextBody:
|
[*
|
if( not isnull( set_i ) )
|
{
|
root := this.CommunicationChannelRoot();
|
|
sourceKind := LibInt_MessageAccessor::GetHeaderPropertyAsString( nvt_i, LibDMF_CommunicationChannel::HEADER_SOURCEKIND() );
|
sourceName := LibInt_MessageAccessor::GetHeaderPropertyAsString( nvt_i, LibDMF_CommunicationChannel::HEADER_SOURCENAME() );
|
|
// Retrieve IntegrationEvent.
|
event := root.EventGetLast( sourceKind, sourceName );
|
|
// Delete the existing instances
|
set_i.DeleteObjects();
|
|
// Instantiate the data.
|
this.DataInstantiateInChannel( nvt_i, set_i );
|
|
// Update the sets last updated attribute
|
set_i.UpdateTimestampLastUpdated();
|
|
// Trigger sanity checks whenever data is received in DM
|
set_i.StartSanityCheckOnSetObjects();
|
|
root.EventLogActivity( event,
|
"Set '" + set_i.Name() + "' succesfully instantiated" );
|
}
|
|
return set_i;
|
*]
|
}
|