yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Quintiq file version 2.0
#parent: #root
Method DeleteRoutingsFromBroker
{
  Description: 'Delete IOobject from Routings group which is soft deleted'
  TextBody:
  [*
    //remove operations from the broker if derived via DB or excel
    traverse( this, MPSync.IOOperation, operation,
              operation.IsSoftDeleted() 
              and ( operation.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      operation.Delete();  
    } 
    //remove Operations bill of material from the broker if derived via DB or excel
    traverse( this, MPSync.IOOperationBOM, operationBOM,
              operationBOM.IsSoftDeleted() 
              and ( operationBOM.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      operationBOM.Delete();  
    } 
    //remove operations input grousp from the broker if derived via DB or excel
    traverse( this, MPSync.IOOperationInputGroup, operationinputgroup,
              operationinputgroup.IsSoftDeleted() 
              and ( operationinputgroup.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      operationinputgroup.Delete();  
    } 
    //remove operations input set from the broker if derived via DB or excel
    traverse( this, MPSync.IOOperationInputSet, operationinputset,
              operationinputset.IsSoftDeleted() 
              and ( operationinputset.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      operationinputset.Delete();  
    }
    //remove operation links from the broker if derived via DB or excel
    traverse( this, MPSync.IOOperationLink, operationlink,
              operationlink.IsSoftDeleted() 
              and ( operationlink.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      operationlink.Delete();  
    } 
    //remove routings from the broker if derived via DB or excel
    traverse( this, MPSync.IORouting, routing,
              routing.IsSoftDeleted() 
              and ( routing.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      routing.Delete();  
    } 
    //remove routings cofiguration views from the broker if derived via DB or excel
    traverse( this, MPSync.IORoutingConfiguratorView, routingCV,
              routingCV.IsSoftDeleted() 
              and ( routingCV.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      routingCV.Delete();  
    } 
    //remove routing steps from the broker if derived via DB or excel
    traverse( this, MPSync.IORoutingStep, routingstep,
              routingstep.IsSoftDeleted() 
              and ( routingstep.DataSource() <> MPSyncUtility::ID_Source_Message() )
              )
    {
      routingstep.Delete();  
    }
  *]
}