yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Quintiq file version 2.0
#parent: #root
MethodOverride OnFinished
{
  TextBody:
  [*
    // MODELING HANDLE
    // The server will create a memory only dataset if the ODBC is not started before the server is started
    //Enable / disable internal data depending on server startup mode
    DomainModel::Domain().MDSStorageDefinitionManager().DatabaseEnabled( GlobalParameters_MP::IsFullStorageState() or
                                                                         GlobalParameters_MP::IsPartialStorageState() or
                                                                         GlobalParameters_MP::IsCachedStorageState() or
                                                                         GlobalParameters_MP::IsHybridStorage() );
    
    // Create MPDomainHandler
    MPDomainHandler::OnServerStartup();
    
    // Create datasets for DataExchangeFramework, ideally it should be done before loading MacroPlans.
    LibDEF_API::OnServerStartup();
    // 3DSpace library, on top of DEF
    LibInt_IntegratorProxy::InitializeIntegrationLibrary();
    integratorConfig := select( DomainModel::Domain(), IntegratorConfigManager.IntegratorConfigurations, ic, true );
    Lib3DS_API::Initialize( integratorConfig.Name() );
    
    // Create ScenarioManager
    ScenarioManager::OnServerStartUp();
    
    // Create a MemoryOnly-dataset that is used to receive SOAP-calls from the DataManager.
    MDSScenarioManager::CreateMemoryOnlyMDS( ScenarioManager::GetDatasetNameReceiver() );
    
    // Create dataset for MPSync on startup.
    MPSync::OnServerStartUp();
    
    // Create dataset for S&OP Workflow
    SWF_WorkflowDataset::OnServerStartup( GlobalParameters_MP::GetStorageState(), 
                                          SWF_Utility::MDSName_WorkflowDatatset() );
    
    // Create Communicaiton dataset
    SWF_CommunicationDataset::OnServerStartup( GlobalParameters_MP::GetStorageState(), 
                                               SWF_Utility::MDSKind_CommunicationDataset() );
    // Create or load a dataset for the UnitTestFramework
    LibUTF::OnServerStartup( MDSInterface::MemoryOnlyState() );
    
    LibInt_IntegratorProxy::InitializeIntegrationLibrary();
    KpiTracker::OnServerStartup();
    
    this.OnFinishedCustom();
    
    // Create or load a dataset for the Monitoring Library
    LibMon_Monitor::OnServerStartup( MDSInterface::MemoryOnlyState() ); 
    smangerOption := DatasetFindOptions::Construct().Kind( typeof( ScenarioManager ).ShortName() );
    smDataset := MDSScenarioManager::Find( smangerOption );
    smDataset->LibMon_CollectInfo();
  *]
}