| Quintiq file version 2.0 | 
| #parent: #root | 
| MethodOverride OnFinished #extension | 
| { | 
|   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() ); | 
|      | 
|     // 创建存档数据集 | 
|     Archive::OnServerStartup(); | 
|      | 
|     // 创建存档状态数据集 | 
|     ArchiveExecutionStatus::OnServerStartup(); | 
|      | 
|     // 创建接口数据集 | 
|     InterfaceDataset::OnServerStartup(); | 
|      | 
|     // 整班数据集 | 
|     WholeShift::OnServerStartup(); | 
|      | 
|     // 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(); | 
|   *] | 
| } |