lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
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
Quintiq file version 2.0
#parent: #root
StaticMethod PlanningDatasetOnDestructed
{
  Description:
  [*
    A collection of API methods that should be implemented on the planning dataset's OnDestructed body.
    This is a wrapper API method for easier implementation by the QSes.
  *]
  TextBody:
  [*
    dbDataset := LibDEF_DataBroker::GetDataset();
    
    dbDataset->Exception()
             ->( e ){             
                // Possible consequences of failure:
                // - The DataBroker will not be aware that any planning dataset is deleted, DatasetInterest will remain exist.
                // Secondary solution:
                // - The DatasetInterest for the permanently deleted datasets has to be deleted manually.
                //   Method LibDEF_SetInterestOfDataset.Delete( false ) should be used.
                LibDEF_Util::LogWarning( "LibDEF_API::PlanningDatasetOnDestructed() fails due to unavailable LibDEF_DataBroker." );
             }
             
    // Job: After dataset has been successfully unloaded, check if there is a need to update Set's owner/System.
    dbDataset->DatasetUnloaded();
  *]
}