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
28
29
30
31
32
33
34
35
36
Quintiq file version 2.0
#root
#parent: #DomainModel
Type OperationInputGroup
{
  #keys: '5[108486.1.161357152][108486.1.161357150][0.0.0][108486.1.161357151][108486.1.161357155]'
  BaseType: Object
  Description: 'MP'
  OnCommit: 'this.IsManuallyConfigured( true )'
  OnDelete:
  [*
    /* During import, the WIP SPs will be deleted. The corresponding PISP, OI/OO will also be deleted.
       When the last OI in the OIG is deleted, OIG will be deleted.
       Upon deletion of OIG, OperationLinkGroupID of the OperationLinks will be reset.
       When the synchronization logic kicks in after the import, the OIs will be re-created in separate groups.
       This check is to prevent the deletion of OIG upon deletion of the last OI. */
    
    if( not isnull( this.MacroPlan() )
        and not this.MacroPlan().IsImporting() )
    {
      // Remove input products from group
      //IsAlive check is needed
      //when deleting a operation, operation input would have been dead
      //but when deleting from Oig, operation input are still alive and we will need to unassign them from OIG.
      traverse( this, OperationInput, ri, true )
      {
        // Remove all DependentDemandInputGroup linked to this OperationInput
        // Delete the dependent demand input group from the same group
        ddigs := selectset( ri, DependentDemandInputGroup, ddig, true );
        DependentDemandInputGroup::Delete( ddigs );
      }
    }
  *]
  StructuredName: 'OperationInputGroups'
  InterfaceProperties { Accessibility: 'Extensible' }
}