go to post Eduard Lebedyuk · Aug 9, 2017 Use old json provider: set st = ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(json, class,.obj, $$$YES) Instead of class argument, the json can contain _class property.
go to post Eduard Lebedyuk · Aug 9, 2017 Settings are not really meant to be used like that.If you want to report usage volume the best option would be creting a DeepSee cube over Ens.MessageHeader class. For a limited subset of analytic operations SQL may be enough.
go to post Eduard Lebedyuk · Aug 8, 2017 Here's what I came up with. Business service (works in SYNC or ASYNC mode depending on OneWay setting): Class Passthrough.PassthroughService Extends EnsLib.SOAP.GenericService { Property DefaultResponce As %String(MAXLEN = "") [ InitialExpression = "<soap:Envelope><soap:Body></soap:Body></soap:Envelope>" ]; Parameter SETTINGS = "OneWay:Basic"; /// Pass through to OnProcessInput() Method ProcessBody(pAction As %String, pRequestBody As %CharacterStream, pResponseBody As %CharacterStream) As %Boolean { Set tSC=..ProcessInput(pRequestBody, .pResponseBody, pAction) Set:pResponseBody="" pResponseBody = ..DefaultResponce Quit $$$OK } } And a BP for ASYNC logging (you need to set it as a target for BS only if you want ASYNC mode and logging, otherwise just call BO directly): Class Passthrough.PassthroughProcess Extends Ens.BusinessProcess [ ClassType = persistent ] { /// Configuration item to which to send messages Property TargetConfigName As Ens.DataType.ConfigName; Parameter SETTINGS = "TargetConfigName:Basic:selector?multiSelect=0&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}"; Method OnRequest(pRequest As EnsLib.SOAP.GenericMessage, Output pResponse As EnsLib.SOAP.GenericMessage) As %Status { Quit ..SendRequestSync(..TargetConfigName, pRequest, .pResponse) } } Default EnsLib.SOAP.GenericOperation can be used for BO.
go to post Eduard Lebedyuk · Aug 8, 2017 Have you thought about writing an article on External Service Registry best practices? It seems like a very interesting topic.
go to post Eduard Lebedyuk · Aug 8, 2017 Do you use an issue tracking / collaboration system? If so which one. Any you would recommend or immediately dismiss based on personal experience?I use Github and GitLab. Issues are tracked there. They are fairly similar, use GitLab if you want on-premise solution.How do you keep track of large code bases? Thousdands of folders named backup1, backups2, ..., SVN, git?Git.Do you have a development server to which you commit and test features there, or do you rather run a local copy of caché and implement features locally first, then push to the server?Everything is implemented and tested locally. Then I push to a version control. Continuous integration does the rest.
go to post Eduard Lebedyuk · Aug 8, 2017 I have modified Directory to point to a physical path, and restarted Caché. Still getting 404. UPD. Adding trailing slash to directory name solved my problem.Thank you.
go to post Eduard Lebedyuk · Aug 7, 2017 Here's an example of calling class method with two parameters: <call method="Method"> <parameter expression="%request.Get("URLPAPAM")"/> <parameter value="123"/> </call> Check %ZEN.Report.call and %ZEN.Report.parameter for details.
go to post Eduard Lebedyuk · Aug 6, 2017 User roles should be limited to databases in that namespace.
go to post Eduard Lebedyuk · Aug 5, 2017 Why do you prefer $System.Status.OK()to $$$OK and $System.Status.IsError(sc) to $$$ISERR(sc)and $$$ISOK(sc)?
go to post Eduard Lebedyuk · Aug 3, 2017 You can add your own DeepSee dimension levels by extending %DeepSee.Time.AbstractLevel class. Check %DeepSee.Time.Year class for an example of Year level within a time dimension.List of available time level classes is obtained in %DeepSee.Utils:%GetTimeLevelClasses and is used during cube generation.
go to post Eduard Lebedyuk · Aug 3, 2017 You can define a parameter as an ObjectScript expression that it is evaluated at runtime. To do so, specify its type as COSEXPRESSION and specify an ObjectScript expression as the value: Parameter PARAMNAME As COSEXPRESSION = "ObjectScriptExpression"; where PARAMNAME is the parameter being defined and ObjectScriptExpression is the ObjectScript content that is evaluated at runtime.An example class parameter definition would be: Parameter DateParam As COSEXPRESSION = "$H"; Documentation. That said, I'd recommend gradual refactoring of these parameters into methods.
go to post Eduard Lebedyuk · Aug 2, 2017 Ensemble event log? It is stored in Ens.Util.Log class, so you can easily export it to csv/html/xml/pdf/txt from SQL. Here's a sample export to CSV: set rs = ##class(%SQL.Statement).%ExecDirect(,"SELECT * FROM Ens_Util.Log") set file = "C:\InterSystems\Ensemble\mgr\Temp\Ens.Log" do rs.%DisplayFormatted(100, file) // 100 for CSV format Docs for %DisplayFormatted.
go to post Eduard Lebedyuk · Aug 1, 2017 There are several ways to do that.Add from/to arguments to your existing REST servise, so your client asks for a data within a specified time slice.Specifying no arguments yields all dataSpecifying only from yields data starting at from and till nowSpecifying both from and to yields only data acquired between from and toUse websockets.