Index: APPS/Halux/Planning/impl/BatchStarter.cls.xml =================================================================== diff -u -r74783 -r74898 --- APPS/Halux/Planning/impl/BatchStarter.cls.xml (.../BatchStarter.cls.xml) (revision 74783) +++ APPS/Halux/Planning/impl/BatchStarter.cls.xml (.../BatchStarter.cls.xml) (revision 74898) @@ -114,7 +114,9 @@ Do ##class(APPS.Halux.common.event.BatchEventRaiser).RaiseBatchGeslotenEvent(Batch.GeefID()) } Catch { #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() + Do ##class(Tools.Wlip).%New(110).String(Exception.ToString()) Do Batch.ZetStatus(##class(APPS.Halux.common.enu.BatchStatus).StartenGefaald()) + Do ..BatchBewaarder.BewaarBatch(Batch) Do ..BatchSequentieVerwijderaar.VerwijderBatchSequentie(Batch) Do ..DnaCodeService.VerwijderDnaCodesVoorBatch(Batch) @@ -183,21 +185,23 @@ Batch:APPS.Halux.common.Batch 1 1) && $$$Not(..IsTestRunTimeContext())) { - #dim ToeleveringIterator As TECH.Iterator = Batch.GeefToeleveringIterator() - - While ToeleveringIterator.HasNext() - { - #dim Toelevering As DOM.AKP.Toelevering = ToeleveringIterator.Next() - #dim ToeleveringLijnIterator As DOM.AKP.impl.DataM.DataMToeleveringLijnIterator = Toelevering.GeefToeleveringLijnIterator() + If (..MESService.GeefHuidigeMESFase() > 1) && $$$Not(..IsTestRunTimeContext()) { + #dim CategorTLM As %Boolean = ##class(TECH.StringUtils).Equals(Batch.GeefCategorie(), ##class(APPS.Halux.common.enu.Categorie).Tandembox(), ##class(APPS.Halux.common.enu.Categorie).Legrabox(), ##class(APPS.Halux.common.enu.Categorie).Merivobox()) - While (ToeleveringLijnIterator.HasNext()) { - #dim ProductToeleveringLijn As DOM.AKP.impl.DataM.DataMProductToeleveringLijn = ToeleveringLijnIterator.Next() - Set ProductToeleveringLijnKlaargezetVoorProductieEventData = ##class(BL.Legacy.HaluxProductieOpvolging.ProductToeleveringLijnKlaargezetVoorProductieEventData).%New(Toelevering.GeefID()_";"_ProductToeleveringLijn.GeefID(), "Klaargezet") - Set ProductToeleveringLijnKlaargezetVoorProductieEvent = ##class(BL.Legacy.HaluxProductieOpvolging.ProductToeleveringLijnKlaargezetVoorProductieEvent).%New(ProductToeleveringLijnKlaargezetVoorProductieEventData) - Do ##class(TECH.Context).Instance().GeefPubSubAPI().GeefEventRaiser().RaiseEventAsync(ProductToeleveringLijnKlaargezetVoorProductieEvent) + If (CategorTLM) { + #dim ToeleveringIterator As TECH.Iterator = Batch.GeefToeleveringIterator() + + While ToeleveringIterator.HasNext() + { + #dim Toelevering As DOM.AKP.Toelevering = ToeleveringIterator.Next() + #dim ToeleveringLijnIterator As DOM.AKP.impl.DataM.DataMToeleveringLijnIterator = Toelevering.GeefToeleveringLijnIterator() + + While (ToeleveringLijnIterator.HasNext()) { + #dim ProductToeleveringLijn As DOM.AKP.impl.DataM.DataMProductToeleveringLijn = ToeleveringLijnIterator.Next() + Set ProductToeleveringLijnKlaargezetVoorProductieEventData = ##class(BL.Legacy.HaluxProductieOpvolging.ProductToeleveringLijnKlaargezetVoorProductieEventData).%New(Toelevering.GeefID()_";"_ProductToeleveringLijn.GeefID(), "Klaargezet") + Set ProductToeleveringLijnKlaargezetVoorProductieEvent = ##class(BL.Legacy.HaluxProductieOpvolging.ProductToeleveringLijnKlaargezetVoorProductieEvent).%New(ProductToeleveringLijnKlaargezetVoorProductieEventData) + Do ##class(TECH.Context).Instance().GeefPubSubAPI().GeefEventRaiser().RaiseEventAsync(ProductToeleveringLijnKlaargezetVoorProductieEvent) + } } } }