Index: BL/Flow/Offerte/Parser/AbstractParserXML.cls.xml
===================================================================
diff -u -r1683 -r1863
--- BL/Flow/Offerte/Parser/AbstractParserXML.cls.xml (.../AbstractParserXML.cls.xml) (revision 1683)
+++ BL/Flow/Offerte/Parser/AbstractParserXML.cls.xml (.../AbstractParserXML.cls.xml) (revision 1863)
@@ -20,11 +20,12 @@
Set DirRead=$S(..DirRead="":"",$E(..DirRead,$L(..DirRead))'="\":..DirRead_"\",1:..DirRead)
Set FileName=..FileName
Set DirTemp=$S(..DirTemp="":"",$E(..DirTemp,$L(..DirTemp))'="\":..DirTemp_"\",1:..DirTemp)
-
+
Do ..ImportXML(DirRead, FileName, DirTemp)
// Now convert the generic XML to a proxy object structure
If '$IsObject(..pxOfferte) {
+ Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Warning("ImportEDI","Geen offertes in het bestand")
Set ParserStatus=##class(ParseStatus).%New(100,"Geen offertes in het bestand") ; geen inhoud
}
Else {
@@ -50,19 +51,29 @@
Set TempDirByFOP=$$$ConvertToFop(TempDir)
// Get the XSLT to use (implemented by specific parsers)
Set XSLT=..getXSLT()
- If $G(XSLT)="" Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", "","Xml wrong filename "_FileName) Quit
+ If $G(XSLT)="" Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Error("ImportEDI","Geen XSLT gespecifieerd. ImportXML wordt afgebroken. ")
+ If $G(XSLT)="" Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", "","Xml wrong filename "_FileName) Quit
// De XSL Transform on the input-xml
Set sc=##class(BL.Sys.FOP.Interface).TransformXML(XSLT, ##class(TECH.Files).AppendFile(DirByFOP,FileName), $LB($$$Replace(FileName,".xml",""), TempDirByFOP) )
- H 5 ; 65 ; Allows the DocBase process to release the file-lock
+ H 5 ; Allows the DocBase process to release the file-lock
+
+ If $$$ISERR(sc) Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Error("ImportEDI","TransformXML is mislukt voor "_##class(TECH.Files).AppendFile(Dir,FileName)_" "_$$ParseStatus^vhLib(sc))
If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"XSLTransform "_##class(TECH.Files).AppendFile(Dir,FileName)_" XSLT:"_XSLT) Quit
; Else
+ Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Info("ImportEDI","TransformXML geslaagd; output file="_##class(TECH.Files).AppendFile(TempDir,FileName))
// De gegenereerde xml (=output van XSLT) inlezen in Caché
Set sc=..ReadXML(TempDir,FileName)
;d WL^vhDBG("Result van Read XML : "_$$ParseStatus^vhLib(sc))
+ If $$$ISOK(sc) {
+ Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Info("ImportEDI","ImportXML geslaagd; output file="_##class(TECH.Files).AppendFile(TempDir,FileName))
+ }
+ Else {
+ Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Error("ImportEDI","ImportXML is mislukt; ")
+ }
Set:($$$ISOK(sc)) Status=$$DELFILE^vhDEV(TempDir,FileName) ; Delete the file after succelful processing
Quit
]]>
@@ -78,6 +89,7 @@
// Begin processing of the XML input
Set FullFileName=##class(TECH.Files).AppendFile(Dir,FileName)
Set sc=reader.OpenFile(FullFileName)
+ If $$$ISERR(sc) Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Error("ImportEDI","XML2Offerte OpenFile "_FullFileName_" "_$$ParseStatus^vhLib(sc))
If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"Openfile: "_FullFileName) Quit sc
Do reader.Correlate("ORDER","BL.Flow.Offerte.pxHoofding") ;Associate a class name with the XML element name
@@ -87,7 +99,10 @@
. Set ..pxOfferte=pxOfferte
. Set sc=..PostprocessProxy()
. If $$$ISERR(sc) Set Info = "PostprocessProxy: "_FullFileName Quit
- if $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,$get(Info))
+
+ If $$$ISERR(sc) Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Error("ImportEDI","XML2Offerte "_$G(Info)_" "_$$ParseStatus^vhLib(sc))
+ If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,$get(Info))
+
Quit sc
]]>
Index: BL/Flow/Offerte/ScanEDIMail.cls.xml
===================================================================
diff -u -r1790 -r1863
--- BL/Flow/Offerte/ScanEDIMail.cls.xml (.../ScanEDIMail.cls.xml) (revision 1790)
+++ BL/Flow/Offerte/ScanEDIMail.cls.xml (.../ScanEDIMail.cls.xml) (revision 1863)
@@ -18,6 +18,10 @@
TEMP\
+
+OV
+
+
BL.Flow.Offerte.pxHoofding
@@ -65,11 +69,14 @@
// Onderscheid maken via FileName
For Set FileName=$O(Local(FileName)) Quit:FileName="" Do
. Do blScan.ProcessFile(DirRead,FileName,DirTemp,DirArchive)
+
// Controle
Kill Local
Do SCANDIR^vhDEV(DirRead,"*.*",$NA(Local))
If $L($O(Local(""))) Do ; Na het verwerken zijn er nog bestanden
+ . Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Error("ImportEDI","Er zijn nog bestanden aanwezig na verwerking in dir : "_DirRead)
. Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte","","Er zijn nog bestanden aanwezig na verwerking in dir : "_DirRead)
+ .
// opkuis archive
Do SCANDIR^vhDEV(DirArchive,"*.*",$NA(Local),"X",300) ; Opkuis van oude gearchiveerde documenten, moet eigenlijk maar 1 maal per dag lopen
@@ -87,21 +94,27 @@
DirRead,FileName,DirTemp,DirArchive
@@ -161,8 +181,12 @@
. Do blFlowOfferte.ControleAll(,"N")
. Do blFlowOfferte.SetOfferteStatus("W")
. Set Status=blFlowOfferte.Save()
- . if Status do listOfferteIDs.Insert(oOfferte.%Id())
- . else Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", Status,"Opslaan Flow.Offerte"_$$ObjToText^vhLib(blFlowOfferte.oOfferte))
+ . if Status Do
+ . . Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Info("ImportEDI","Method ConvertProxy() is geslaagd. Flow.Offerte aangemaakt met ID "_oOfferte.%Id()_".")
+ . . do listOfferteIDs.Insert(oOfferte.%Id())
+ . else Do
+ . . Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Error("ImportEDI","Method ConvertProxy() is mislukt: de Save status van Flow.Offerte = "_$$ParseStatus^vhLib(Status)_"")
+ . . Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", Status,"Opslaan Flow.Offerte"_$$ObjToText^vhLib(blFlowOfferte.oOfferte))
. Kill %blFlowOfferte
Do ..Mail2OrderVerwerking(listOfferteIDs)
@@ -239,6 +263,9 @@
if listOfferteIDs.Size = 1 Set Link(2)="FLOWOFF\"_listOfferteIDs.GetAt(1)_"\I"
Set EMailGroep=$$EMailGroep^KLOPV(..KLNr,"SCANEDIMAIL")
Set MailId=$$SYSTEM^vhMAIL("KL",..KLNr,Titel,EMailGroep,.Body,.Link,"U")
+
+ Do ##class(vhLib.Logger).%New(..#EDILoggerGroep).Info("ImportEDI","Admin-mail gestuurd naar groep "_EMailGroep_".")
+
Quit
]]>
Index: BL/Sys/FOP/Interface.cls.xml
===================================================================
diff -u -r1386 -r1863
--- BL/Sys/FOP/Interface.cls.xml (.../Interface.cls.xml) (revision 1386)
+++ BL/Sys/FOP/Interface.cls.xml (.../Interface.cls.xml) (revision 1863)
@@ -317,6 +317,9 @@
%RegisteredObject
0
+
+OV
+
+
%String