| 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();   | 
|     } | 
|   *] | 
| } |