lazhen
2025-01-07 b3987122cbbc46c5c59d3173f37fca3170b6dc5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Quintiq file version 2.0
#parent: #root
Method RequestSendGetSetToDataManager (String requestID_i, String setID_i, String setTypeName_i, 
  String sourceKind_i, String sourceName_i, String requestingKind_i, 
  String requestingName_i, DateTime lastUpdated_i)
{
  Description: 'Send a GetSet-request to the DataManager.'
  TextBody:
  [*
    nvt := LibInt_MessageAccessor::CreateEmptyMessage();
    
    // Add information to the header of the NTV that is specific for the DataManager.
    LibInt_MessageAccessor::SetHeaderProperty( nvt, LibDMF_CommunicationChannel::HEADER_IS_REQUEST(),   true          );
    LibInt_MessageAccessor::SetHeaderProperty( nvt, LibDMF_CommunicationChannel::HEADER_REQUESTID(),    requestID_i   );
    LibInt_MessageAccessor::SetHeaderProperty( nvt, LibDMF_CommunicationChannel::HEADER_SETTYPENAME(),  setTypeName_i );
    LibInt_MessageAccessor::SetHeaderProperty( nvt, LibDMF_CommunicationChannel::HEADER_SETNAME(),      setID_i       );
    LibInt_MessageAccessor::SetHeaderProperty( nvt, LibDMF_CommunicationChannel::HEADER_LAST_UPDATED(), lastUpdated_i );
    
    // Special request headers. These should be used when a request is being made from a dataset other than the standard system dataset kind(name)
    LibInt_MessageAccessor::SetHeaderProperty( nvt, LibDMF_CommunicationChannel::HEADER_REQUESTINGDATASETKIND(), requestingKind_i );
    LibInt_MessageAccessor::SetHeaderProperty( nvt, LibDMF_CommunicationChannel::HEADER_REQUESTINGDATASETNAME(), requestingName_i );
    
    // by default, min datetime is used so that the request will always return a result
    //lastUpdate := DateTime::MinDateTime();
    
    this.MessageSend( null( LibDMF_SystemOnChannel ), LibDMF_CommunicationChannel::REQUEST_GETSET(),
                      nvt, sourceKind_i, sourceName_i, lastUpdated_i );
  *]
}