go to post Timothy Leavitt · Aug 12, 2022 @Michael Davidovich , try this: Do $System.Process.Terminate($Job,<desired error code>) See e.g. https://github.com/intersystems-community/zpm/blob/master/src/%25ZPM/Pac...
go to post Timothy Leavitt · Jul 20, 2022 On further investigation, it seems that what I need just isn't in the old version I'm running.
go to post Timothy Leavitt · Jul 20, 2022 Yes - see Security.Users (class reference) in the %SYS namespace.
go to post Timothy Leavitt · May 16, 2022 Not a full answer, but OnDrawCell is the place to start: https://docs.intersystems.com/ens201815/csp/docbook/DocBook.UI.Page.cls?...
go to post Timothy Leavitt · Apr 26, 2022 Turns out the problem was *not* the woff files at all - it was the CSS file that used the font. Solution was: set ^%SYS("CSP","MimeFileClassify","CSS")=$lb("text/css",0,"utf-8")
go to post Timothy Leavitt · Apr 15, 2022 Update: it looks like we now support local edit/save/compile of CSP application files, provided the web application name starts with "/csp" - see: https://github.com/intersystems-community/vscode-objectscript/pull/622
go to post Timothy Leavitt · Apr 11, 2022 Yes. Here's a quick sample: Class DC.Demo.SerialObject Extends %SerialObject { Property foo As %String; Property bar As %String; } Class DC.Demo.IndexOnSerialObject Extends %Persistent { Property blah As DC.Demo.SerialObject; Index blahFooBar On (blah.foo, blah.bar); ClassMethod RunDemo() { Do ..%KillExtent() Set inst = ..%New() Set inst.blah.foo = "foo" Set inst.blah.bar = "bar" Do inst.%Save() zw ^DC.Demo.IndexOnSerialObjectD,^DC.Demo.IndexOnSerialObjectI } } Which produces output: d ##class(DC.Demo.IndexOnSerialObject).RunDemo() ^DC.Demo.IndexOnSerialObjectD=1 ^DC.Demo.IndexOnSerialObjectD(1)=$lb("",$lb("foo","bar")) ^DC.Demo.IndexOnSerialObjectI("blahFooBar"," FOO"," BAR",1)=""
go to post Timothy Leavitt · Apr 7, 2022 Simple solution:Create a class extending %CSP.Page with: ClassMethod OnPreHTTP() As %Boolean { Set %response.Status = ##class(%CSP.REST).#HTTP403FORBIDDEN Quit 0 } From the %CSP.SessionEvents subclass, in OnStartRequest: set %response.ServerSideRedirect = "<that classname>.cls"
go to post Timothy Leavitt · Apr 6, 2022 @Michael Davidovich it might be helpful to look under the hood - specifically, at the class generated for the CSP page ("View Other" in Studio/VSCode). OnPreHTTP is special in that it runs before the page is rendered (and can e.g. redirect you somewhere else). Generally, I would put code that runs on form submit / POST in OnPreHTTP. Where you just have <script language="Cache" runat="server">, that'll run as the page is rendered whenever it gets to that block. This would generally be used to render more complex content for which other tag-based CSP options are in sufficient. If you're familiar with PHP, this is equivalent to the <?php ... ?> block in: <html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html> <script language="Cache" method="SomeMethod"> would be used in hyperevents (i.e., #server(..SomeMethod())# and #call(..SomeMethod())#). From a coding/design best practices perspective: you should be able to do input validation on the client to provide a friendly error message without needing to go back to the server (e.g., via #server). BUT you should also do validation on the server to make sure that even if the user (maliciously or otherwise) bypasses the client-side validation, they can't submit invalid data.
go to post Timothy Leavitt · Mar 29, 2022 On further review, you get a <FUNCTION> error from trying to start the line-by-line monitor when no routines are selected, and the work around is to change namespace to %SYS, do ^PERFMON, and stop the monitor. USER>zw ##class(%Monitor.System.LineByLine).Start("","",$job) "0 "_$lb($lb(5002,"<FUNCTION>zStart+45^%Monitor.System.LineByLine.1",,,,,,,,$lb(,"USER",$lb("$^zStart+45^%Monitor.System.LineByLine.1 +1","X^@ +1"))))/* ERROR #5002: ObjectScript error: <FUNCTION>zStart+45^%Monitor.System.LineByLine.1 */ In terms of using the test coverage tool, you should either put a file named coverage.list in your unit test root or pass the list of classes/routines in userParam as described at https://github.com/intersystems/TestCoverage . https://github.com/intersystems/TestCoverage/issues/11 covers the bad behavior you've seen and would prevent it going forward. (Subsequent attempts to start the line-by-line monitor will end up hitting error #6060 as described in https://github.com/intersystems/TestCoverage/issues/10 .)
go to post Timothy Leavitt · Mar 16, 2022 Here's a sample that loads interoperability system defaults from an XML file: Class Sample.CCREventHandler Extends %Studio.SourceControl.CCREventHandler { /// This method is called during the loading of an ItemSet, after the contents of the ItemSet have been loaded into the namespace, /// and after the ImplementCCR routine has been run Method ItemSetAfterLoadToNS() As %Status { set key = "" for { set item = ..ItemSetItemList.GetNext(.key) quit:(key="") if (key [ "backup/ens/defaults.xml") { $$$ThrowOnError(##class(Ens.Config.DefaultSettings).%Import(^Sources_"backup/ens/defaults.xml")) quit } } Quit ##super() } /// This method is called by the CCR Refresh logic, after the items have been refreshed into the namespace. It is intended for any additional configuration work which /// may be necessary (e.g. initialization of reference tables, building of 3rd party sources, etc) Method RefreshFinalize() As %Status { $$$ThrowOnError(##class(Ens.Config.DefaultSettings).%Import(^Sources_"backup/ens/defaults.xml")) Quit ##super() } }
go to post Timothy Leavitt · Feb 17, 2022 These would be set via the Configuration Registry, though it seems they aren't discussed in the docs for it. See: https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=HXREG_ch_configuration_registry
go to post Timothy Leavitt · Jan 21, 2022 I'd run a query against %Dictionary.CompiledProperty where parent = (the classname)
go to post Timothy Leavitt · Jan 11, 2022 It looks like there might be an issue with the service you're trying to use - at https://apisidra.ibge.gov.br/ , pasting in "/t/1612/n2/all/v/all/p/last/c81/2702/f/u" as "Parâmetros/valores da API:" then clicking "Consultar" I get an alert saying "A solicitação de conexão com pools sofreu timeout". I also see this from ObjectScript with Server set to apisidra.ibge.gov.br instead of api.sidra.ibge.gov.br
go to post Timothy Leavitt · Dec 8, 2021 Here's a full example relating global size back to related classes/tables, expanding on @Vitaliy.Serdtsev's example: select sdef.parent "Class", class.SqlSchemaName||'.'||class.SqlTableName "Table", LIST(sdef.Location) "Globals", SUM(s."Allocated MB") "Allocated MB", SUM(s."Used MB") "Used MB" from %SYS.GlobalQuery_Size('C:\InterSystems\IRIS20\mgr\user','','*D,*S,*I',0,0,1) s join ( select parent,DataLocation as Location from %Dictionary.StorageDefinition where not parent %STARTSWITH '%' union all select parent,StreamLocation from %Dictionary.StorageDefinition where not parent %STARTSWITH '%' union all select parent,IndexLocation from %Dictionary.StorageDefinition where not parent %STARTSWITH '%' ) sdef on sdef.Location = '^'||s.Name join %Dictionary.CompiledClass class on class.Name = sdef.parent group by sdef.parent Note that if you use inheritance with persistent classes sharing an extent this'll be a little bit off (since the same global is used for multiple classes and will be double counted).
go to post Timothy Leavitt · Dec 2, 2021 I feel like a broken record, but InterSystems Support is pretty awesome and probably a better place to start for deeper HealthShare issues than the Developer Community. (And at first glance this seems like a deeper HealthShare issue.) Though it would be great if you could circle back and say what the solution was once you have one in case someone else runs into this!
go to post Timothy Leavitt · Nov 29, 2021 @Peter (Sechaba) Tomodi I'd recommend reaching out to InterSystems Support on this.
go to post Timothy Leavitt · Nov 15, 2021 @Chris Marais This means that ^PERFMON or ^%SYS.MONLBL is already running somewhere on the system. If you do ^%SYS.MONLBL it should provide some helpful output/options.