go to post Eduard Lebedyuk · Jun 23, 2021 Is mapi.exchange.msg.Communication persistent? That said, I'd move JSON parsing to a BS, so mapi.exchange.msg.Communication becomes a request.
go to post Eduard Lebedyuk · Jun 23, 2021 Here are some ideas for contestants: New ML language. Interoperability with numerical computational languages or even CASes proper are great and offer the freedom of choice. Furthermore, these math-oriented languages allow faster problem search/space traversal than more generalized languages such as Python. Several classes of supporting ML problems can be solved with them. Callout interface makes implementation process easy (reference community implementations: PythonGateway, RGateway, JuliaGateway). Suggested languages: Octave, Scilab. New showcases in IoT, Real-Time predictions, RPA. Convergent Analytics group provides a lot of starting templates in these fields - as InterSystems IRIS capabilities are an especially good fit for them. I'm always interested in more examples, especially real-life examples of machine learning. Data Deduplication solutions. Do you have a dataset with a lot of dirty data and know how to clean it? Great. Make a showcase out of it. Reinforcement learning showcases. Examples of Partially observable Markov decision process or other reinforcement learning technologies.
go to post Eduard Lebedyuk · Jun 18, 2021 This way then: <call name='To application Rest' target='To application REST' async='0'> <request type='EnsLib.REST.GenericMessage' > <assign property="callrequest.Stream" value='##class(%Stream.GlobalCharacter).%New()'/> <assign property="status" value='callrequest.Stream.CopyFrom(request.StreamFC)' action="set" /> <assign property="status" value='callrequest.HTTPHeaders.SetAt("application/xml", "Content-Type")' action="set" /> <assign property="status" value='callrequest.HTTPHeaders.SetAt(callrequest.Stream.Size, "Content-Length")' action="set" /> <assign property="status" value='callrequest.HTTPHeaders.SetAt("POST", "HttpRequest")' action="set" /> </request> </call>
go to post Eduard Lebedyuk · Jun 18, 2021 Try to send it like this: <call name='To application Rest' target='To application REST' async='0'> <request type='EnsLib.REST.GenericMessage' > <assign property="status" value='callrequest.Stream.CopyFrom(request.StreamFC)' action="set" /> <assign property="status" value='callrequest.HTTPHeaders.SetAt("application/xml", "Content-Type")' action="set" /> <assign property="status" value='callrequest.HTTPHeaders.SetAt(callrequest.Stream.Size, "Content-Length")' action="set" /> <assign property="status" value='callrequest.HTTPHeaders.SetAt("POST", "HttpRequest")' action="set" /> </request> </call> Also I think you can skip Content-Length - it's appended to the request automatically.
go to post Eduard Lebedyuk · Jun 18, 2021 Please post your <call> block which utilizes context.RESTMessage
go to post Eduard Lebedyuk · Jun 18, 2021 I had a similar requirement (only for automatic docs generation). As each BH setting is also a class property, you can query %Dictionary for them. And build your CSVs from these queries. Queries /// Settings common for all Interoperability BH Query defaultSettings() As %Query { SELECT prop.name "Setting", TRIM('"' FROM MAX(prop.InitialExpression)) "Default value", LIST(prop.parent) "Class", MAX(prop.Description) "Description" FROM "%Dictionary".PropertyDefinition prop JOIN "%Dictionary".CompiledParameter par ON par.parent = prop.parent AND par.Name = 'SETTINGS' JOIN "%Dictionary".CompiledClass cls ON prop.parent = cls.Name WHERE (cls.Super LIKE '%Ens.Host%' OR cls.Name = 'Ens.Host' OR cls.Name = 'Ens.BusinessProcessBPL') AND par."_Default" LIKE '%' || prop.Name || '%' GROUP BY prop.Name ORDER BY 1 } /// User BH classes Query productionClasses() As %Query { SELECT Name "Class", Description "Description" FROM "%Dictionary".CompiledClass cls WHERE Name LIKE '%' AND Super In ('Ens.BusinessProcessBPL', 'Ens.BusinessService', 'Ens.BusinessOperation', 'Ens.BusinessProcess') ORDER BY 1 } /// Settings for User BH Query productionClassesSettings() As %Query { SELECT prop.parent "Class", prop.name "Setting", TRIM('"' FROM prop.InitialExpression) "Default value", prop.Description "Description" FROM "%Dictionary".PropertyDefinition prop JOIN "%Dictionary".CompiledParameter par ON par.parent = prop.parent AND par.Name = 'SETTINGS' JOIN "%Dictionary".CompiledClass cls ON prop.parent = cls.Name WHERE cls.Name LIKE '%' AND par."_Default" LIKE '%' || prop.Name || '%' ORDER BY 1,2 } /// Production elements Query productionItems(production) As %Query { SELECT Name, ClassName /*,Comment*/ FROM Ens_Config.Item WHERE Production = :production } /// Get settings of production item Query productionItemsSettingsCall(production) As %Query { SELECT * FROM User_util.productionItemsSettings(:production) } /// Custom query - get settings for production items Query productionItemsSettings(production As %String) As %Query(CONTAINID = 0, ROWSPEC = "Element:%String,Setting:%String,Host:%String,Value:%String") [ SqlName = productionItemsSettings, SqlProc ] { } ClassMethod productionItemsSettingsExecute(ByRef qHandle As %Binary, production As %String) As %Status { set obj = ##class(Ens.Config.Production).%OpenId(production,,.sc) quit:$$$ISERR(sc) sc do ..clearProductionItems(.obj) set qHandle("production") = obj set qHandle("item") = 1 set qHandle("itemCount") = qHandle("production").Items.Count() set qHandle("setting") = 1 set qHandle("settingCount") = qHandle("production").Items.GetAt(qHandle("item")).Settings.Count() quit sc } ClassMethod productionItemsSettingsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = productionItemsSettingsExecute ] { #dim sc As %Status = $$$OK #dim item As Ens.Config.Item = qHandle("production").Items.GetAt(qHandle("item")) #dim setting As Ens.Config.Setting = item.Settings.GetAt(qHandle("setting")) set AtEnd = 0 set Row = $lb(item.Name, setting.Name, setting.Target, setting.Value) if qHandle("setting")<qHandle("settingCount") { set qHandle("setting") = qHandle("setting") + 1 } else { if qHandle("item")<qHandle("itemCount") { set qHandle("item") = qHandle("item") + 1 set qHandle("setting") = 1 set qHandle("settingCount") = qHandle("production").Items.GetAt(qHandle("item")).Settings.Count() } else { set AtEnd = 1 } } quit sc } /// Remove production items without settings. ClassMethod clearProductionItems(ByRef production As Ens.Config.Production) { #dim item As Ens.Config.Item for i = production.Items.Count():-1:1 { set item = production.Items.GetAt(i) do:item.Settings.Count()=0 production.Items.RemoveAt(i) } }
go to post Eduard Lebedyuk · Jun 18, 2021 It's %request.Content. Thanks for noticing that, fixed! Looks like I mixed %CSP.Request:Content with %Net.HttpResponse:Data.
go to post Eduard Lebedyuk · Jun 17, 2021 In that case: Insert Into TableX values ('Name', 'Address', 'Phone') UNION Insert Into TableX values ('Name2', 'Address2', 'Phone2') and so on.
go to post Eduard Lebedyuk · Jun 17, 2021 Use docker-ls: PS D:\Cache\distr> .\docker-ls tags --registry https://containers.intersystems.com intersystems/iris-community requesting list . done repository: intersystems/iris-community tags: - 2020.1.1.408.0 - 2020.3.0.221.0 - 2020.4.0.547.0 - 2021.1.0.215.0
go to post Eduard Lebedyuk · Jun 17, 2021 I'm running: store/intersystems/iris-ml-community:2021.1.0.215.0 And $zv is: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2021.1 (Build 215U) Wed Jun 9 2021 12:37:06 EDT Are $zv for ml and non ml builds the same? How can I distinguish if my app is running on ml or non ml build?
go to post Eduard Lebedyuk · Jun 17, 2021 Feel free to create a draft here and send the link to @Evgeny Shvarov.
go to post Eduard Lebedyuk · Jun 17, 2021 Thank you for the info Guillaume! I would like to clarify that I'm not an author of Community R Gateway (although I do publish it). Shiao-Bin Soong is the author of both Community R Gateway and R Gateway.
go to post Eduard Lebedyuk · Jun 16, 2021 Thank you Benjamin! But I see it does not mention R at all and there's no corresponding R method in $system.external: set javaGate = $system.external.getJavaGateway() set netGate = $system.external.getDotNetGateway() set pyGate = $system.external.getPythonGateway()
go to post Eduard Lebedyuk · Jun 16, 2021 It should be http://localhost:52773/user/api/test and not: http://localhost:52773/user/api/test/ Also, do either: In application settings set Password as Allowed Authentication Method and in your Postman request add Basic Auth In application settings add %ALL role in Application Roles
go to post Eduard Lebedyuk · Jun 16, 2021 Improved manageability for our External Language Servers, which now also cover R and Python. Are there any docs for that, especially R and Python?
go to post Eduard Lebedyuk · Jun 10, 2021 Do you get Unable to connect or something else? What's the output of iris list?
go to post Eduard Lebedyuk · Jun 8, 2021 There's a standard method for it: write ##class(%PopulateUtils).Integer(min, max) If you're okay with 0 as a first digit you can use: write $tr($j($random(10000),4)," ", 0) Note, that $random is preudo-random, if you require strictly random values you should use the GenCryptRand() method of the %SYSTEM.Encryption class.