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.

Hi @Robert Cemper !

Good Idea!

I tested, but unfortunately, It seems already too late, the rollback is already performed.

%ZSTOP routine

ROUTINE %ZSTOP
%ZSTOP
    Quit

SYSTEM
    Set ^zJob($i(^zJob)) = $ZDATETIME($HOROLOG, 3, 1) _" LABEL-SYSTEM (" _ $JOB _ ") "_$NAMESPACE _ " TLEVEL: "_$TLEVEL
    Do ZFORCECOMMIT
    Quit

LOGIN
    Quit
JOB
    Set ^zJob($i(^zJob)) = $ZDATETIME($HOROLOG, 3, 1) _" LABEL-JOB (" _ $JOB _ ") "_$NAMESPACE _ " TLEVEL: "_$TLEVEL
    Do ZFORCECOMMIT
    Quit
CALLLIN
    Quit

ZFORCECOMMIT
    If $Data(^zForceCommit($Job)) {
        While $TLEVEL {
            TCOMMIT
        }
    }
    Quit

Even if the process is in a transaction before "terminate", the ^zJob trace records a $TLEVEL with the value 0.

Maybe it's just not possible (or possible with a not documented procedure).

Thank you.

Hi @Benjamin De Boe,

Yes, I recently took a look, but indeed I need it on an old version  (2018 )

However, our customers should migrate but I think that i can't use DataMove on production systems before the end of 2023.

In my opinion, DataMove is complete but just needs to be wrapped for special use cases (ex: manage global mapping on mirror switch).  It's not a problem, we can do this easily with a simple global and ZSTART routine (such as the sample).  

Maybe, I should modify this tool in this way if there is an interest.