admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
Method RunSmartPlanPlanningMatrix (
  MacroPlan macroplan,
  ProductInStockingPointInPeriodPlannings smartplanpispips,
  Real userqty
) as Stream
{
  TextBody:
  [*
    macroplan->RunSmartPlanFromPlanningMatrix( smartplanpispips, userqty, this.GetScenarioManagerStream() );
    
    /* As per notes for UTF library, using this as running MP optimizer could trigger multiple transactions so need to wait for all them to finish before continue
    // Below is the Reactive version of Transaction.GetCurrentTask.RestartOnFinish().
    // It waits for pending transactions, which means wait until *all* logic that is initiated by the test-method is finished, even if it concerns a Job or Multi-Transaction.
    // This makes it possible to support test methods that are in principle asynchronous, i.e. that are for example calling a Job; the next test-method
    // will only be triggered when also the asynchronous call is finished.
    
    // MIND
    // * This statement is meant to be only be used in the UTF Library.
    // * The statement works as indicated only for Jobs and Multi-Transactions and reactivly triggered methods. Asynchronous SOAP is *not* supported.
    */    
    
    return Transaction::GetCurrentTask().OnFinish();
  *]
  InterfaceProperties { Accessibility: 'Module' }
}