go to post Eduard Lebedyuk · Apr 3, 2019 If you're doing provisioning, consider using %Installer. It allows creation of Web Applications, among other things.
go to post Eduard Lebedyuk · Apr 3, 2019 Thanks, Aleksandar!So HTTPS/WebServices/WebSockets are not widely supported?I was just reading the standard spec and it was kind of implying that HTTPS or WebSockets are the way.
go to post Eduard Lebedyuk · Apr 3, 2019 Can you explain a bit what do you want?Do you want to execute some query and pass all results in it from one process to another in a message?
go to post Eduard Lebedyuk · Apr 2, 2019 Some options:Check this exampleUse ZEN reportsProduce CSV and use LibreOffice to convert CSV to XLSX. Article about this approach.Use Apache POI to generate XLSX. Here's Apache POI JGW wrapper and ObjectScript API but you'll need to extend it.> - Utilize another language or library that has methods to parse the data into an Excel file (https://stackoverflow.com/questions/17684610/python-convert-csv-to-xlsx).If you want to use Python from Cache, check PythonGateway.
go to post Eduard Lebedyuk · Apr 1, 2019 If you want to transfer data via REST check RESTForms project (part 2).
go to post Eduard Lebedyuk · Mar 30, 2019 It's actually a wrapper for the same idea - if HeadOfQueue is checked, the resend message is inserted with a higher priority than the highest priority existing queue message. It can be seen in EnQueue method of Ens.Queue class.
go to post Eduard Lebedyuk · Mar 29, 2019 Mimedata is subscripted by name and index.So in your case: set name = "BulkFileUpload" for i=1:1:%request.CountMimeData(name) set mimeData = %request.GetMimeData(name, , i) } On each iteration mimeData variable would hold the stream with one next mimedata. %request is simply an object of %CSP.Request class, check the docs or code to know how it works. Additionally you can use this snippet to see what's inside %request, %response and %session objects: set %response.ContentType = "html" do ##class(%CSP.Utils).DisplayAllObjects() quit $$$OK
go to post Eduard Lebedyuk · Mar 29, 2019 Great article!Here's a relevant article by @Vitaliy.Serdtsev on localizing error messages.
go to post Eduard Lebedyuk · Mar 29, 2019 <FILEFULL> - Caché attempted to allocate a disk block for more global data or routine storage, but the attempt failed because the Caché database is full and could not be expanded.Affected db is /hs-connect-hom/db/BPINTEGRADEV-GLB.
go to post Eduard Lebedyuk · Mar 28, 2019 Bitmap indices maintain one node per each chunk of 64 000 id's, if at least one id from that range exists. So random integer ids can slow bitmaps down. On the other hand if there are two consecutive but spread (i.e 1..1000 and 100000...110000) id sequences it would generate just 2 global nodes so everything should be ok in that scenario.Check index global in various scenarios: Example.Bitmap Class Example.Bitmap Extends %Persistent { Property ID As %Integer(MINVAL = 1); Property Value As %Integer(MAXVAL = 9, MINVAL = 0); Index IDKEY On ID [ IdKey, Unique ]; Index ValueIndex On Value [ Type = bitmap ]; ClassMethod Populate(startid, endid, step = 1) As %Integer { set count = 0 do ..%KillExtent() for i = startid:step:endid { set count = count + 1 set ^Example.BitmapD(i) = $lb("", $random(10)) } do ..%BuildIndices() quit count } Query Select(value) As %SQLQuery { SELECT ID FROM Example.Bitmap WHERE Value = :value } /// do ##class(Example.Bitmap).Test() ClassMethod Test() { do ..TestOne(1, 1000000) do ..TestOne(100000000, 101000000) do ..TestOne(1, 1000000000, 1000) } ClassMethod TestOne(startid, endid, step = 1) { set startTS = $zh set count = ..Populate(startid, endid, step) set endTS = $zh set populateTime = endTS - startTS set startTS = $zh set rs = ..SelectFunc($random(10)) set endTS = $zh set queryTime = endTS - startTS write $$$FormatText("Start: %1, End: %2, Step: %3, Count: %4, Populate Time: %5, Query Time: %6", startid, endid, step, count, populateTime, queryTime),! } }
go to post Eduard Lebedyuk · Mar 28, 2019 Eduard, are you referring to the Priority property of the Ens.MessageHeader class?Yes.That seems to be used exclusively for marking the message for Async vs. Synchronous delivery.These priorities are available: #define eMessagePriorityHighSync 1 #define eMessagePrioritySync 2 #define eMessagePrioritySimSync 4 #define eMessagePriorityAsync 6 Sync by default is 2, so specifying priority 1 may indeed help. Cursory glance at Ens.Queue indicates that messages with priority 1 would be processed first.
go to post Eduard Lebedyuk · Mar 28, 2019 While messages do have priority, it seems to be internal property. You can try to check it on a dev system but I'd advise against changing it on a production system.The easiest way is to have two operations - one for priority source, another for everything else and route messages to one or another operation.
go to post Eduard Lebedyuk · Mar 27, 2019 Yes. To get a full list of reserved works execute: zw ^%qCacheSQL("reservewords")
go to post Eduard Lebedyuk · Mar 27, 2019 But this also means that you can't ship the whole vendor copy of the global as you will overwrite the onsite ID counter node.You can! When you load globals specify /mergeglobal flag to merge the global with existing data instead of overwriting it: set sc = $system.OBJ.Load("global.xml", "/mergeglobal=1") seed the ID counter at the site to a really high number Bitmap indices would really slow down from that.
go to post Eduard Lebedyuk · Mar 27, 2019 $zf(-100) has different signature: set cmd = """C:\Program Files (x86)\WinRAR\Rar.exe""" set args(1) = "x" set args(2) = path _ "*.dbf" set args(3) = pathToExt set sc = $ZF(-100,"/SHELL", cmd,.args)
go to post Eduard Lebedyuk · Mar 26, 2019 If you're on pre 2019.1 you can use %ZEN.Auxiliary.jsonProvider and %ZEN.Auxiliary.altJSONProvider to convert arbitrary object to and from JSON.If you're on 2019.1 you can use %JSON.Adaptor class which is similar to %XML.Adaptor.