go to post John Flippance · Sep 30, 2022 Hello, Have solved this, the third party API accepted the stream as a string, therefore I went through and changed the generated classes accordingly, and then fed in the stream.
go to post John Flippance · Sep 28, 2022 So VarString does not help me in this situation... as it holds the same amount as a 'Long String' (which isnt enough for some of my documents),
go to post John Flippance · Sep 28, 2022 Thanks Julius, I have a bad feeling this may be the case, will contact the supplier and see if their API can take a stream property instead...
go to post John Flippance · Sep 7, 2022 Sorry, I posted the wrong certification name, it was the "HealthShare Health Connect HL7® Interface Specialist" that we were looking for a practice exam for? Thanks John
go to post John Flippance · Sep 2, 2022 Excellent article! Well written and easy to understand. Have put this advice into action and seen an immediate performance improvement!
go to post John Flippance · Oct 23, 2018 Thank you Giba!Yes I have now gone back and changed the call from the Business Service to act synchronously and this has rectified the issue! The simplest way to do this was to set the Ack Mode to 'application' so that a new message was not received on the Service until the process had sent back an application Ack for the previous message (which it does at the end of the process).Many thanks for all of your help solving this!
go to post John Flippance · Oct 19, 2018 Hi Gilberto,All of my Business Service CALLS are already set to synchronous (see below), this is why I find this issue confusing?ThanksJohn
go to post John Flippance · Oct 18, 2018 Thanks Julian,I have posed the traces of both messages below. The process makes several calls to the operation. As you ca see by the timings in the trace window, Message 2 is in the process making calls during the time that Message 1 is still in the process? Could the BPL be starting to process Message 2 inbetween processing Message 1? (whilst waiting for Call Responses for Message 1?)Message 1:Message 2:
go to post John Flippance · Oct 18, 2018 Hi Julian,As described in my post the pool size is set to 1. This should mean there is only one job running this process and I thought would mean that it wouldn't start processing the second message?
go to post John Flippance · Jun 2, 2017 Thanks Rubens/Sean/Dmitry, I decided to switch to the long strings route as the documents are small. I couldn't get this working either but it was because I wasn't reading the stream in a number divisible by 3 (I was just doing a .ReadLine() ). Have performed a Read(12000) and it now works a treat! PDF opening up in the supplier's system. do context.streamPDF.Rewind() while 'context.streamPDF.AtEnd { set line=context.streamPDF.Read(12000) set context.strDocument =context.strDocument_line } set context.strDocumentEncoded = $system.Encryption.Base64Encode(context.strDocument)
go to post John Flippance · Mar 29, 2017 Have worked it out myself, read in PDF file as %FileBinaryStream and then read through and count the occurrences of /Page (but not /Pages), and this seems to be giving me the correct number of pages for all of the files I have tried so far! Method OnProcessInput(pInput As %FileBinaryStream, pOutput As %RegisteredObject) As %Status{set tsc=$$$OKDo pInput.Rewind()set pagecount = 0While 'pInput.AtEnd {//set line=pInput.Read(200) set line=pInput.ReadLine()if ($FIND(line,"/Type/Page"){if '$FIND(line,"/Pages") {set pagecount = pagecount + 1}}}$$$TRACE(pagecount) Quit tsc}
go to post John Flippance · Mar 10, 2017 We don't get a lot of choice/option in how we move documents and always seem to be dictated to by the source and receiving systems. We use Ensemble to pick up/receive documents and then manipulate them into whatever method the receiving system can receive them in. Some examples of what we do; * We pick up documents as streams from within an application database (using SQL Adapter), and querying other application database tables for metadata. * We then transform this into an MDM^T02 message and send out (with PDF stream or HTML inside). * We may also use Ensemble to send an email with the document attached (from and to secure email addresses). * One system we have to interact with using their API which means creating an XML request (again with the document stream contained within the XML payload). * Mostly an application will drop the document along with an accompanying xml metadata file into a folder which Ensemble will then need to process. Up until this point we have never been able to specify to any system suppliers how we want them to send/receive documents, however now as we are doing more and more document sending then we will try to specify 'document moving preferences' during the tendering stage with suppliers.