Hi Pedro,

In addition to the reply of @Cristiano Silva ,  you can use %Dictionary.CompiledClass instead of PropertyDefinition to retrieve also properties in parents classes.

There is a query available : 

select *
from %Dictionary.CompiledClassQuery_MemberSummary('class.name','a')

See class reference

query MemberSummary(classname As %String, kind As %String)
Selects Name As %String(MAXLEN=256)

Return a list of members of this specific kind which is one of the following:

  • a - Property
  • f - Foreign key
  • i - Index
  • j - Projection
  • m - Method
  • n - Constraint
  • o - System method
  • p - Parameter
  • q - Query
  • s - Storage defintion
  • t - Trigger
  • u - Comment text block
  • x - XData

Hi @Stefan Cronje ,

Indeed the repository template used for this development uses it.
If you have an instance with IPM (ZPM), you can install openapi-suite just with : 

zpm "install openapi-suite"
; and optionally swagger-ui
zpm "install swagger-ui"

All dependencies will be automatically installed.

It needs a namespace with Ensemble enabled.  You can easily enable Ensemble on a namespace just like that : 

Do ##class(%Library.EnsembleMgr).EnableNamespace($Namespace, 1)

Haha Thank you @Guillaume Rongier 

Roughly 2 years ago I worked on a client generator for specification 2.0 because the server-side generator (^%REST) support 2.0 only.
I was expecting a support V 3.0 for ^%REST, but I wasn't sure InterSystems had planned this development.

So, I decided to develop a "Suite" with client, production and REST server generator for version 3.

Thank you for your praise about UI, to be honest, today, it's just a simple CSP using Bootstrap , I would like to develop a more advanced interface using Angular, but not possible for the contest timing.  I have a few ideas, but that will come later.

Hi,

Two years ago, I analyzed the behaviours using stream and %Persistent class.  

Class Test.Stream1 Extends %Persistent
{

Property st As %GlobalBinaryStream;

ClassMethod add1() As %Status
{
	; write stream in ^Test.Stream1S
	Set o = ..%New()
	Do o.st.Write("azeruiop")
	Quit o.%Save()
}

ClassMethod add2() As %Status
{
	; write stream in ^CacheStream
	Set o = ..%New()
	Set st = ##class(%GlobalBinaryStream).%New()
	Do st.Write("azeruiop")
	Set o.st = st
	Quit o.%Save()
}

Storage Default
{
<Data name="Stream1DefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>st</Value>
</Value>
</Data>
<DataLocation>^Test.Stream1D</DataLocation>
<DefaultData>Stream1DefaultData</DefaultData>
<IdLocation>^Test.Stream1D</IdLocation>
<IndexLocation>^Test.Stream1I</IndexLocation>
<StreamLocation>^Test.Stream1S</StreamLocation>
<Type>%Storage.Persistent</Type>
}

}

The method add2 use ^CacheStream due to the default storage usage (as described by @Robert Cemper ).  

However, We can force the storage in ^Test.Stream1S with :
Do st.%LocationSet("^Test.Stream1S")

Hello,

If you need an alternative, you can use the Config package in "%SYS"

Ex : 

New $Namespace
Set $Namespace = "%SYS"
Set properties("Database") = "YourPackageDatabaseCode"
Set sc = ##class(Config.MapPackages).Create("YourNameSpace","PackageName", .properties)
Quit sc

There is also a library to do this with a json configuration file config-api, but it's heavy just for a mapping.

Hi @Robert Cemper, @Vitaliy.Serdtsev 

Thank you for your replies!
I found a solution to do this without any change to an existing code, not simple but It works and could be useful in a critical situation.

I read the code of ^%ETN and see these lines :

UserError() s $zt="UserErrorE"
 i $d(^rOBJ("%ZERROR")) d 
 . n %00000 d ^%ZERROR

So, If we create a "%ZERROR" routine, we have an entry point :

ROUTINE %ZERROR

%ZERROR
    If $Data(^zForceCommit($Job)) { ; to avoid do this for all processes...
        While $TLEVEL {
            TCOMMIT
        }
    }

    Quit

And then, we must terminate the process like that:

Set pid = "1234" ; pid to terminate
Set ^zForceCommit(pid)=""
Zn "%SYS"
Set process = ##class(SYS.Process).%OpenId(pid)
Set sc = process.Terminate(1)

It's important to use the SYS.Process class and the Terminate method with argument 1 to use ^%ETN.