Interface class : creates and manages the FopTask objects, contained in a FopTaskQueue. BL.Sys.FOP.Common 1 %RegisteredObject 0 Create a new FOPTask 1 KLNr:%String,LevNr:%String,InternePersoon:%String Sys.FOP.Task Add a single document to the the FOPTask 1 Task:Sys.FOP.Task,DataType:%String="XML",DataRef:%String,TransformType:%String="PDF",Template:%String,Taal:%String,Options:%String,OptionsPDF:%String Sys.FOP.emDoc Add a multiple documents to the the FOPTask 1 Task:Sys.FOP.Task %Status Add a PRINT action to the the FOPTask 1 Task:Sys.FOP.Task,Printer:%String,NumCopies:%Integer=1,RectoVerso:%Boolean=0,PapierLade:%String %Status Add a FILE action to the the FOPTask 1 Task:Sys.FOP.Task,FileName:%String,Folder:%String %Status Add an EMAIL action to the the FOPTask 1 Task:Sys.FOP.Task,MailTo:%String,Subject:%String,Body:%String %Status Add a FAX action to the the FOPTask 1 Task:Sys.FOP.Task,FaxNr:%String,TAV:%String %Status "InLine" verwerking van de Task (in het eigen/owner process) verloopt in 3 stappen: - toevoegen van de Task aan de queue - wachten op het start-signal van de scheduler - indien signal, in-process verwerking van de Task uitvoeren Returns the QItemID via .local and %Status as Result of the method 1 %Status "Async" verwerking van de Task (in een apart process/thread), maar blijft wel wachten tot het process beëindigd is. - toevoegen van de Task aan de queue - de verwerking wordt gestart door de scheduler en uitgevoerd in een nieuw process - wachten tot het process beëindigd is : signal van het threaded process Returns the QItemID via .local and %Status as Result of the method 1 %Status finish Task "_$G(QItemID)) ;w "Waiting for Signal from Scheduler --> finish Task "_$G(QItemID),! Set Ok=##class(Scheduler).WaitForSignal(TimeOut) If Ok'=1 Do Quit sc . Set sc=$$$ERROR($$$GeneralError,"Error waiting for signal for Finish of Task "_Task.%Id()_" QItem:"_$G(QItemID)) ; Else Do d WL^vhDBG("Finished processing Task "_$G(QItemID)) ;w "Finished processing Task "_$G(QItemID),! ;Set sc=##class(Verwerker).GetResult() Quit sc ]]> Verwerking van de Task als Batch, m.a.w. Fire-and-Forget - toevoegen van de Task aan de queue - de verwerking wordt gestart door de scheduler en wordt uitgevoerd in een nieuw process Extra opties zijn mogelijk om een routine te starten wanneer de task beëindigd is (TO DO). Returns the QItemID via .local and %Status as Result of the method 1 %Status Immediate verwerking van de Task ("Sync", in het eigen/owner process) - toevoegen van de Task aan de queue, maar markeren als Sync, dus niet in status "W"ait zetten. - onmidddellijk starten met de verwerking van de Task, in-process Returns the QItemID via .local and %Status as Result of the method 1 %Status Add the FopTask to the Queue and tries to run it. Until the scheduler is not implemented, the task runs immediatly/synchronous. No load balancing (with other FopTasks) !!! Temporary method until fully functional. 1 Task:Sys.FOP.Task %Status Add the FopTask to the Queue and trigger the FopEngine (by default). If the engine should not be triggered, specify blnTrigger = 0 1 Task:Sys.FOP.Task,blnTrigger:%Boolean=1 %Status Add the FopTask to the Queue and trigger the FopEngine (by default). If the engine should not be triggered, specify blnTrigger = 0 1 Task:Sys.FOP.Task,blnTrigger:%Boolean=1 %Status Run the FopTask from the Queue 1 Task:Sys.FOP.Task %Status Example: How to: Run DocBase process direct using the FopTaskSequence verwerker 1 Data:%String %Status +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | Following methods can be called directly, without creating the | /// | complete FopTask-object. | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// Voert een XSLTransformatie uit een gegeven XML-bestand. Het pad van "inXML" moet gegeven worden t.o.v. de FOP-server, alsook het pad in lbDataOut. Types voor XSLT: EDI-HAEFELE Oproepen via : s sc=##class(BL.Sys.FOP.Interface).TransformXML("EDI-HAEFELE",,) w $$ParseStatus^vhLib(sc) 1 TypeXSLT:%String,inXML:%String,lbDataOut:%List="" %Status Oproepen via : s sc=##class(BL.Sys.FOP.Interface).TransformXML("EDI-HAEFELE",,) w $$ParseStatus^vhLib(sc) 1 TypeXSLT:%String,inXML:%String,lbDataOut:%List="",blnUploadSrc:%Boolean=0 %Status lbDataOut=$LB(fname,dir) : dir als netwerkpad doorgeven. Zie ook ##class(BL.Sys.FOP.Test).TestRenderOrgalux() Oproepen via : s sc=##class(BL.Sys.FOP.Interface).RenderOrgalux(InUrl,$LB(OLPdfName,"\\cache02\C$\FOP\PDFTest\OL"),"N",lbOpties) w sc,! 1 InUrl:%String,lbDataOut:%List,Taal:%String,lbOpties:%List %Status