go to post Marc Mundt · Nov 7, 2022 Adding the additional logging helped. Looking at it now, it looks like it is working as coded: 9413847-9428572 BEGENING OF LOOP FOR: XAL465.1110.A0 9413847-9428572 START RECURSIVE 9421986-9428572 Has Value 9413847-9428572 BEGENING OF LOOP FOR: XAL465.1110.A1 The call for 9413847 is looping through all results of the query. It finds that 9421986 has a composition so it calls itself recursively. The call for 9421986 finds that it already has a value so it returns control to the 9413847 loop which continues iterating. If you want all super and sub loops to quit as soon as any sub-loop finds "has value" then you will need to check for this condition inside the loop.
go to post Marc Mundt · Nov 4, 2022 It's a bit hard to follow the output. I think things will become clearer if you add "mainArticle" and "article" to every WRITE statement, for example: W !, $G(mainArticle),"-",$G(article)," Has Value"...W !, $G(mainArticle),"-",$G(article)," BEGENING OF LOOP FOR: "_rs.articleCode...W !, $G(mainArticle),"-",$G(article)," START RECURSIVE"...W !, $G(mainArticle),"-",$G(article)," END OF LOOP"
go to post Marc Mundt · Oct 19, 2022 This has come up a few times before in other threads. https://community.intersystems.com/post/encoding-base64-stream-chunk-sizes
go to post Marc Mundt · Oct 18, 2022 The ORC group is repeating, and all of it's child segments are optional, so you can iterate through the ORC group in order to get at the OBRs that it contains. But... you can also just set the DTL create mode to "copy" and all of the segments will get copied over automatically without needing to iterate through each ORC.
go to post Marc Mundt · Oct 13, 2022 Have you looked into tuning the JVM heap settings? It's possible the JVM is running out of heap space. https://www.baeldung.com/jvm-parameters
go to post Marc Mundt · Oct 13, 2022 There are some open source tools that can convert from XLSX to CSV. You could call out to these from your ObjectScript code:https://csvkit.readthedocs.io/en/latest/tutorial/1_getting_started.html#...https://stackoverflow.com/questions/10557360/convert-xlsx-to-csv-in-linu...
go to post Marc Mundt · Oct 12, 2022 Are you just calling out to a command-line utility -- like calling PGP to decrypt a file? Or are you trying to launch a GUI application that the user will interact with?
go to post Marc Mundt · Sep 23, 2022 <if> conditions in BPL are just ObjectScript expressions, so you'll want to have a look at the docs for ObjectScript expressions. https://docs.intersystems.com/irisforhealth20221/csp/docbook/DocBook.UI....
go to post Marc Mundt · Sep 22, 2022 Here's information on the Python library for working with .zip files: https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile.open
go to post Marc Mundt · Sep 20, 2022 "#" is for referring to a parameter defined in the class. Parameters are similar to static variables in Java. https://docs.intersystems.com/irisforhealth20221/csp/docbook/DocBook.UI....
go to post Marc Mundt · Sep 16, 2022 Hopefully this can save you some work. It uses a much larger chunk size (which is a multiple of 57) and works with or without CR/LFs (set the argument pAddCRLF): Class Example.B64.Util Extends %RegisteredObject { /// Be cautious if changing CHUNKSIZE. Incorrect values could cause the resulting encoded data to be invalid. /// It should always be a multiple of 57 and needs to be less than ~2.4MB when MAXSTRING is 3641144 Parameter CHUNKSIZE = 2097144; ClassMethod B64EncodeStream(pStream As %Stream.Object, pAddCRLF As %Boolean = 0) As %Stream.Object { set tEncodedStream=##class(%Stream.GlobalCharacter).%New() do pStream.Rewind() while ('pStream.AtEnd) { set tReadLen=..#CHUNKSIZE set tChunk=pStream.Read(.tReadLen) do tEncodedStream.Write($System.Encryption.Base64Encode(tChunk,'pAddCRLF)) if (pAddCRLF && 'pStream.AtEnd) { do tEncodedStream.Write($c(13,10)) } } do tEncodedStream.Rewind() quit tEncodedStream } }
go to post Marc Mundt · Sep 14, 2022 This method mentioned above by Vitaliy takes a stream as input and outputs a base64 encoded stream: https://cedocs.intersystems.com/ens20171/csp/documatic/%25CSP.Documatic....
go to post Marc Mundt · Jul 21, 2022 My experience with Zebras was quite a few years ago, so this may or may not still apply... Using Zen reports at the time, the print server would end up rendering the label as a bitmap and sending that over to the Zebra. ZPL code to print an equivalent label was much smaller than a bitmap, so ZPL labels tended to print faster than those rendered by a report.
go to post Marc Mundt · Jul 1, 2022 This question comes-up a lot on community and there are some previous posts on it. Have a look at this thread, and in particular this response.
go to post Marc Mundt · Jun 14, 2022 Ok, so the flow would look roughly like this: The GenericService accepts an inbound REST request, populates a GenericMessage, and sends it to your business process Business process extracts the JSON payload from the GenericMessage, and pulls out any relevant details needed for the call to Athena Business process creates a new GenericMessage, populates any items needed by Athena, uses %SYS.OAuth2 (and the OAuth client profile you created) to request an OAuth token and adds it to the GenericMessage, and passes the new GenericMessage to the business operation. Business operation makes the outbound REST call to Athena, and returns a new GenericMessage containing the response to your business process. Business process extracts JSON payload from the GenericMessage, uses a transformation to create the payload required by your internal REST client. Business process creates a new GenericMessage, populates it with the response payload, and returns it to the GenericService GenericService returns response to REST client
go to post Marc Mundt · Jun 14, 2022 For the outbound REST calls, I would typically create a custom operation class that calls methods in %SYS.OAuth2.* to fetch a token from the downstream system and then places that in the HTTP header. If it's essential for you to avoid creating a custom class, you could call the %SYS.OAuth2 methods from a BPL and then add the token to the header fields in the EnsLib.HTTP.GenericMessage that you send to the GenericOperation. You haven't said what needs to happen between the business service and business operation, so it's hard to discuss how everything fits together as you asked.
go to post Marc Mundt · Jun 13, 2022 You'll want to configure the passthrough service to use "Standard Requests". This means REST requests will pass through a web server (IIS, Apache, etc) to get to IRIS:https://docs.intersystems.com/irisforhealth20221/csp/docbook/DocBook.UI.... For TLS, you'll enable HTTPS on your web server. And see this docs on enabling OAuth for web services:https://docs.intersystems.com/irisforhealth20221/csp/docbook/DocBook.UI....