haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
Quintiq file version 2.0
#parent: #root
Method GetKPI (
  LibOpt_Task task
) as owning RealVector
{
  Description:
  [*
    The method that returns the KPI used to rollback on.
    We use a `RealVector` to represent multiple KPI levels.
    The first value in the `RealVector` (the one with index 0) is more important than the one with index 1.
    Rollback is determined by comparing the 2 `RealVectors` representing the KPIs.
    If the first value is different, we know whether to rollback or not.
    If and only if they are equal, we continue looking at the value with index 1.
    We continue until we find an index on which the values are different or until we have no more values.
    
    Note: if you are using declarative attributes / methods / whatever, you need to propagate them before sending the value.
    Note: the given task can be null.
  *]
  TextBody:
  [*
    result := RealVector::Construct();
    
    return & result;
  *]
}