Quintiq file version 2.0
|
#parent: #root
|
Method ExecuteCapacitiesBrokers (
|
Boolean isexcel,
|
BinaryValues binarydatas,
|
Strings brokers
|
)
|
{
|
Description: 'Execute brokers that are associated with objects in Capacities ObjectGroup'
|
TextBody:
|
[*
|
if( not isexcel )
|
{
|
this.MPSync().MPSync_ImportShiftPatternsFromDBBroker().Execute();
|
this.MPSync().MPSync_ImportStockingPointCapacitiesFromDBBroker().Execute();
|
this.MPSync().MPSync_ImportUnitCapacitiesFromDBBroker().Execute();
|
this.MPSync().MPSync_ImportUnitAvailabilitiesFromDBBroker().Execute();
|
this.MPSync().MPSync_ImportTransportCapacitiesFromDBBroker().Execute();
|
this.MPSync().MPSync_ImportTransportAvailabilitiesFromDBBroker().Execute();
|
}
|
else
|
{
|
brokername :="";
|
try
|
{
|
// Shift patterns
|
brokername := typeof( MPSync_ImportShiftPatternsFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportShiftPatternsFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportShiftPatternsFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
|
try
|
{
|
// Unit capacities
|
brokername := typeof( MPSync_ImportUnitCapacitiesFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportUnitCapacitiesFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportUnitCapacitiesFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
|
try
|
{
|
// Unit availabilities
|
brokername := typeof( MPSync_ImportUnitAvailabilitiesFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportUnitAvailabilitiesFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportUnitAvailabilitiesFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
|
try
|
{
|
// Transport capacities
|
brokername := typeof( MPSync_ImportTransportCapacitiesFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportTransportCapacitiesFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportTransportCapacitiesFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
|
try
|
{
|
// Transport availability
|
brokername := typeof( MPSync_ImportTransportAvailabilitiesFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportTransportAvailabilitiesFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportTransportAvailabilitiesFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
try
|
{
|
// Stocking point capacities
|
brokername := typeof( MPSync_ImportStockingPointCapacitiesFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportStockingPointCapacitiesFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportStockingPointCapacitiesFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
}
|
*]
|
InterfaceProperties { Accessibility: 'Extensible' }
|
}
|