ISC's Interoperability business rule editor has some quirks; it does not allow the passing of variables by reference to custom methods
Interesting. Can you post sample code please?
- Log in to post comments
ISC's Interoperability business rule editor has some quirks; it does not allow the passing of variables by reference to custom methods
Interesting. Can you post sample code please?
Now, why isn't $ZOBJREF() in the documentation?
What's the use case for this function?
Here's some (autotranslated) info about thesefunctions.
Also $zobjref accepts only integers, so you can pass just the part before @:
set a={}
set b={}
set obj1=$zobjref(1)
set obj2=$zobjref("1@Sample.Person")
zwResults in:
a=<OBJECT REFERENCE>[1@%Library.DynamicObject]
b=<OBJECT REFERENCE>[2@%Library.DynamicObject]
obj1=<OBJECT REFERENCE>[1@%Library.DynamicObject]
obj2=<OBJECT REFERENCE>[1@%Library.DynamicObject]There's also no guarantee that the object would be the same i.e.:
set a={"a":1}
set b={"b":1}
set aoref = ""_ a
kill a
set c={"c":1}
set obja=$zobjref(aoref)
zw obja
> obja={"c":1} ; <DYNAMIC OBJECT>Do dynObject1.%Set("Stream", request.Stream, "stream")Depending on the fidelity you need, something like this would work:
set str = "abc def! xyz"
set punctuation = "'!""#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~"
set strNoPuncuation = $tr(str, punctuation, $j("", $l(punctuation)))
set strDedupeWhitespaces = $zstrip(strNoPuncuation,"<=>P")
set out = $lfs(strDedupeWhitespaces, " ")Another approach. Simpler and likely faster but it will merge sentence ends without whitespace afterwards:
set str = "abc def! xyz"
set strNoPuncuation = $zstrip(str,"*P",," ")
set strDedupeWhitespaces = $zstrip(strNoPuncuation,"<=>P")
set out = $lfs(strDedupeWhitespaces, " ")Check $translate, $zstrip.
If you want more fidelity/features check %iKnow.Stemming package.
Replace
Set tSC1 = tStream.Write(dynObject1.%ToJSON())with:
Do dynObject1.%ToJSON(tStream)I recommend you to check this article, but here's a summary:
1. Calculate a list of BHs which need a restart (not sure why you need regexp, all BHs are in Ens_Config.Item table):
SELECT %DLIST(Name) bhList
FROM Ens_Config.Item
WHERE 1=1
AND Enabled = 1
AND Production = :production
AND ClassName %INLIST :classList -- or some other condition2. Restart them all at once instead of one by one:
for stop = 1, 0 {
for i=1:1:$ll(bhList) {
set host = $lg(bhList, i)
set sc = ##class(Ens.Director).TempStopConfigItem(host, stop, 0)
}
set sc = ##class(Ens.Director).UpdateProduction()
}Why not map packages (also maybe use %ALL namespace to map to all namespaces at once)?
1. Do you need to restart several BHs at once or do you need to restart them one by one?
2. How long does it take currently and what's your goal timing-wise?
Good idea!
Invite a user to your tenant.
Check this utility.
Try adding:
--check-caps false
Calling @Robert.Kuszewski.
My JAVA_HOME is a is a JRE (C:\Program Files\Java\jre1.8.0_361) not a JDK if that matters?
No, it should not.
I can't seem to edit the External Language Servers in the management portal
Please stop it before editing. You also should be able to create a new External Language Server.
What's the Undefined config value on TEST and PROD:
zn "%SYS"
set sc=##Class(Config.Miscellaneous).Get(.p)
write p("Undefined")What's the response you're getting?
here I want to capture the error details in trace , log , that I can see in production web page
If you want to quit processiong, it's enough to either quit:
quit:$$$ISERR(sc) scOr raise an error (if you're several levels deep for example):
$$$TOE(sc, sc)If you don't want to interrupt processing, use $$$LOG macroes, for example:
$$$LOGWARNING($System.Status.GetErrorText(sc))This code would create a new Log entry of a warning type.
Project the list of geo.model.Point as a separate table:
Class geo.model.Line Extends %Persistent
{
Property points As list Of geo.model.Point(SQLPROJECTION = "table/column");
}And you can use SQL query (via iris.sql) to get all points in line:
SELECT
points_latitude,
points_longitude
FROM geo_model.Line_points
WHERE Line = ?
ORDER BY element_keyIf you have thousands of points that would likely be the fastest way to transfer (barring callin/callout shenanigans).
I guess you need to flush the buffer so only python writes? Something like this should work:
Class Python.App.Dispatch Extends %CSP.REST
{
XData UrlMap [ XMLNamespace = "https://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/test" Method="GET" Call="Wrapper" />
</Routes>
}
ClassMethod Wrapper()
{
write *-3
do ..Hello()
q $$$OK
}
ClassMethod Hello() [ Language = python ]
{
import iris
print('Hello World')
}
}
Calling @Bob Kuszewski
62
s a=$zcvt(a,"U") for i=1:1:90{return:$l(a,$c(i))>2 0} q 1Oh, right. You're on Ensemble 2014.1. I highly recommend updating to the latest Ensemble version or even better migrating to InterSystems IRIS.
Last line:
S obj={}.%FromJSON(Httprequest.HttpResponse.Data)Easiest way would be to add %JSON.Adapter and use JSON for interop.
Awesome!
About label+offset^routine. How would recent Improvements to how IRIS classes are generated and called would affect error messages from class methods?
Pinging @Mark.Hanson.
Great!
Does it work through default Publish/Subscribe interoperability hosts?
Or is it something custom? If custom, any reason why?
do $zf(-100, "/SHELL", "echo", $zcvt("test тест", "O", "UTF8"))
test тестDo you want to connect to the Bank's FTP server?
Yes, that'll work. Just need to be careful to export everything. Classes? Routines? Custom Schemas? LUTs? SDS?