go to post Eduard Lebedyuk · Feb 26, 2019 I recommend locking as a solution to that problem.Create a table/class/global which holds {filename, lock, ownerJobId}.All service jobs execute the same file search, take first filename, check the lock table. If it's empty - write into it and start processing the file.If lock table has the entry take the next file, till you find one without lock.After file is processed delete/move it and remove the entry from lock table.On job shutdown purge the table records associated with job id.This way you can scale jobs easily.
go to post Eduard Lebedyuk · Feb 25, 2019 Here's how you can do it:Download CSPGateway kit from WRC for 2017.2.1Install it on a new serverConnect it to IISOpen csp/bin/Systems/Module.cxw and add required application(s)I think this documentation page describes exactly what you want to do.
go to post Eduard Lebedyuk · Feb 24, 2019 You get this error (Datatype value '2019-02-01' is not a valid number) because %Date stores data in horolog format, so you need to do one of:(Recommended approach) Convert date value from external format (2019-02-01) into internal format (horolog) using $zdh function: Set consumerRecord.ActivePeriod.StartDate = $zdh(obj.activePeriod.startDate, 3) Use datatype for which this value is valid, i.e. %TimeStamp. To check, all datatype classes offer IsValid method, you can use it to check value validity zw ##class(%TimeStamp).IsValid("2019-02-01") If you're using InterSystems IRIS you can store dates as %PosixTime. Regarding Atelier, I use it to debug REST services and it shows variable values. You can try to reinstall it. If you're on Windows you can also use Studio.
go to post Eduard Lebedyuk · Feb 23, 2019 Go to SMP - Menu - Manage Web Applications.Open /csp/healthshare/hspc/ application settings.Check that Inbound Web Services are enabled for the application.Press Save button.
go to post Eduard Lebedyuk · Feb 22, 2019 Small addition: objects are always passed by reference, so usually you don't need to pass them with dot.
go to post Eduard Lebedyuk · Feb 22, 2019 What does this output in a terminal: set respText="{""access_token"":""4SDFDSFDSF-aSDASDASD"",""expires_in"":""3300"",""refresh_token"":"""",""scope"":""sms_send"",""token_type"":""Bearer""}" set sc = ##class(%ZEN.Auxiliary.jsonProvider).%ParseJSON(respText,,.pObject,1) zw pObject I tried it on a later verison and got: pObject=<OBJECT REFERENCE>[1@%ZEN.proxyObject] +----------------- general information --------------- | oref value: 1 | class name: %ZEN.proxyObject | reference count: 2 +----------------- attribute values ------------------ | %changed = 1 |%data("access_token") = "4SDFDSFDSF-aSDASDASD" |%data("expires_in") = 3300 |%data("refresh_token") = "" | %data("scope") = "sms_send" |%data("token_type") = "Bearer" | %index = "" +-----------------------------------------------------
go to post Eduard Lebedyuk · Feb 22, 2019 That is a fairly common problem - the need to compare two different codebases. It could be a test and prod server or just different production servers. Anyway I usually compare them like this:Install source control hook (I prefer cache-tort-git udl fork but any udl based will do) on all affected servers.Export everything from the base server (with oldest sources) using source control hook into a new repostory.Commit this state as an initial state.Clone the repository with initial state to the other server.Export everything from the other server into the repository.Commit again (if you have more than two parallel codebases you may need to branch out).Use any commit viewer to see the difference (I prefer GitHub/GitLab).
go to post Eduard Lebedyuk · Feb 22, 2019 Looks like it works correctly. write pObject outputs the object oref. If you want to display the whole object, use zwrite: zwrite pObject If you need a specific property, access them like this: write pObject."access_token" write pObject.in
go to post Eduard Lebedyuk · Feb 20, 2019 I don't think you can have a root (/) maps as it would create unwanted ambiguity.Why not put the / routes directly into My.Code.BS.ApiRoute?
go to post Eduard Lebedyuk · Feb 20, 2019 Please do not use DES as it's currently a broken cypher with bruteforce time of about a day.
go to post Eduard Lebedyuk · Feb 19, 2019 Yes, that would work for notification.The main issue is resuming from where things went wrong.
go to post Eduard Lebedyuk · Feb 19, 2019 My goal is not to reexecute the process, but rather resume from the point I got an error (or immediately before, i.e. on a last successfull request/response).
go to post Eduard Lebedyuk · Feb 19, 2019 I don't think it's possible.You can spawn cterm from powershell with ccontrol cterminal ENSEMBLE
go to post Eduard Lebedyuk · Feb 19, 2019 Is that a production instance?Is that 8bit or Unicode instance?What I/O tables NLS routine shows? (Note that modifying locales/defaults can be potentially application-breaking change so do it only if you know what you're doing) zn "%SYS" do ^NLS 1) Display current locale 2) Select defaults 3) Change locale 4) Display loaded settings 5) Advanced NLS option? 2 1) Internal tables 2) I/O tables 3) CSP files 4) Date, time and number formats Category of defaults? 2 Items marked with (*) represent the locale's original default I/O table Current default --------------------- -------------------- 1) Process RAW (*) 2) Cache Terminal UTF8 (*) 3) Other terminal UTF8 (*) 4) File UTF8 (*) 5) Magtape UTF8 (*) 6) TCP/IP RAW (*) 7) System call RAW (*) 8) Printer CP1251 (*)
go to post Eduard Lebedyuk · Feb 19, 2019 Try: CHCP 65001 in the beginning of your script. Also you need to check that your console font has required symbols.
go to post Eduard Lebedyuk · Feb 18, 2019 Would process user not cut it?You can later convert it into app user if you have 1:1 matching.It would work faster than getting local variables.
go to post Eduard Lebedyuk · Feb 18, 2019 Do you want to convert XML into Cahce object? If so, check this docs on how to project XML into objects.Do you want to get some value(s) from the XML? If so, check XPATH docs.Do you want to convert XML into another XML? If so, check XSLT docs.If you just want to pass XML as string, you can pass it as is.