Sure, to discuss.
- Log in to post comments
Sure, to discuss.
@Evgeny Shvarov ,
If there is an interest, this module could be an extension for ZPM client.
Thank you @Evgeny Shvarov !
iris-config.json - empty? Yes, this is template. Loading this file do nothing.
For testing purposes, you should fill this file with the content in this article.
Yes, that's it.
Thank you @Evgeny Shvarov
So, the main goals are REST expose and the rupture between config and code.
%Installer allows to create, users, roles, mapping too, but it's not possible to configure SQL Privileges, SSL Configuration, SQL Connexion (config-api can do).
There are a few features existing in %Installer and not in config-api, but we have a good base to implement if needed.
Exactly @Guillaume Rongier !
I am a Manifest Installer user and It works fine.
However, sometimes people which deploy applications aren't ObjectScript developers.
Manifest Installer, need to create a class, write an XML, compile.
I would like a rupture between the configuration and the code.
Moreover, everything is exposed in REST. It could be interesting to integrate IRIS configuration from a tool in another language.
Thank you!
Glad to contribute!
It's useless on your local dev, but depending your goal : You can try to dump
zzDumpDoc(pkg, targetDir="c:\dev\testdumpdoc\")
new (pkg, targetDir)
Do:'##class(%File).DirectoryExists(targetDir) ##class(%File).CreateDirectoryChain(targetDir)
Set pkgDot = pkg _ ".", class = pkgDot, restore = 0
If $Isobject($Get(%request)) {
Set oldRequest = %request
Set oldResponse = %response
Set oldSession = %session
Set restore = 1
}
Set %request = ##class(%CSP.Request).%New()
Set %response = ##class(%CSP.Response).%New()
Set %session = ##class(%CSP.Session).%New("0123456789")
Do %session.Unlock()
Set %request.Data("PAGE",1) = "CLASS"
For {
Set class = $Order(^oddDEF(class))
Quit:$e(class,1,$l(pkgDot))'=pkgDot
Set %request.Data("LIBRARY",1) = $namespace
Set %request.Data("CLASSNAME",1) = class
Set initialIO = $IO
Set file = targetDir_class_".html"
OPEN file:("NRW"):2
USE file
Do ##class(%CSP.Documatic.PrintClass).OnPage()
USE initialIO
CLOSE file
}
If restore {
Set %request = oldRequest
Set %response = oldResponse
Set %session = oldSession
}
quit
There exits more elegant way to redirect the output (check the community).
Hi @Yuri Marx ,
I don't know.
If nothing exists:
Perhaps we can write a script to call CSP.Documatic.PrintClass.cls and dump the html response into file.
ex : /csp/documatic/%25CSP.Documatic.PrintClass.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.Integer
A %Net.HttpRequest is not required. I guess we can create a %request object, redirect the IO and calling OnPage method.
What an exciting contest!
So happy to win in experts votes and third in community votes.
Congrats to all participants for your great apps.
Thanks to experts and community for your support!
Also special thanks to the OEX Team and all members behind the scene.
Hi,
You can try my document converter with a Generated Interoperability client app.
Install the latest version (v1.3.2+)
Set sc = ##class(dc.openapi.client.Spec).generateApp("doc", "https://www.lscalese.ovh/documentconverter/api/v1/_spec")
Open Swagger tools : http://localhost:52795/swagger-ui/index.html
Explore : http://localhost:52795/docrest/_spec
see this gif video download link for full screen view

Yes, I agree with @Vic Sun.
The built-in web server shouldn't be used in production.
If you're a docker user, perhaps [this](https://github.com/lscalese/isc-webgateway-letsencrypt) can help you.
So, using encryption with let's encrypt needs a fully qualified domain name, but Docker file file and setupWebGateway.sh
could help you.
Hi @Botai Zhang
Take a look to this post : https://community.intersystems.com/post/running-management-portal-priva…
Hello,
I would say by using https protocol.
Thank you @Henrique Dias !
Thank you @Yuri Marx @Guillaume Rongier @Eduard Lebedyuk
Hi @Yuri Marx ,
Great!
I must test this app.
I'm working on document converter tool, perhaps may I integrate OCR with your app.
Hi!
Congrats for your victory @Henrique Dias and all nominate @Nikolay Solovyev, @henry!
Thanks to the community team for their advice and @Evgeny Shvarov for his help and availability.
Thank you for your votes!
Hi,
The demo is temporarily hosted on AWS server.
login : contest
password : Contest2004
Demo page link
Swagger-UI LINK
By default, Swagger-UI open URL localhost:52773, replace by http://3.124.175.55/csp/jsonfilterrest/_spec
Hi @lw wei,
I don't know if an API exists to do this, but if nothing exists you can use the job command with an input file.
example :
JOB ^STURECOV:("%SYS"::infile:outfile):3"infile" is the path to your input file that contains all entries for each read.
"outfile" optional, but interesting to know what happened.
Hello @Arto Alatalo
If there is no overload on production server, perhaps can you perform a D ^%BENCHLANG on production and dev machine?
It's benchmark CPU against ObjectScript language.
Compare the COSMark result.
Thank you for your feedback @Robert Cemper
I didn't run a benchmark, because in my case it's a deprecated class without intensive usage.
It's good to know the indirection performance is not bad. ![]()
Interesting @Robert Cemper !
I wrote a similar code the last year in order to have storage compatible Caché\healthshare and Iris.
We have a legacy persistent class mapped on ^CacheMsg global, my solution :
<Data name="msg">
<Delimiter>"^"</Delimiter>
<Piece>1</Piece>
</Data>
<Global>@($s($zv'["IRIS":"^CacheMsg",1:"^IRIS.Msg"))@</Global>
It works very well, but perhaps a little bit slow due to indirection usage.
I'll keep this code until a complete migration to Iris and then It will be removed.
Thank you Evgeny.
We need it!
Thank you @Evgeny Shvarov .
Glad to see a feature for custom parameters.
Yes, that's it ! We can see a dot.
It works fine.
Thank you for your help.
Hello @Timothy Leavitt
Thank you for this great article!
I tried to add "UnitTest" tag to my module.xml but something wrong during the publish process.
<UnitTest Name="tests" Package="UnitTest.Isc.JSONFiltering.Services" Phase="test"/>
tests directory contain a directory tree UnitTest/Isc/JSONFiltering/Services/ with a %UnitTest.TestCase sublcass.
Exported 'tests' to /tmp/dirLNgC2s/json-filter-1.2.0/tests/.tests
ERROR #5018: Routine 'tests' does not exist
[json-filter] Package FAILURE - ERROR #5018: Routine 'tests' does not exist
ERROR #5018: Routine 'tests' does not exist
I also tried with objectscript-math project. This is the output of objectscript-math publish -v :
Exported 'src/cls/UnitTests' to /tmp/dir7J1Fhz/objectscript-math-0.0.4/src/cls/unittests/.src/cls/unittests
ERROR #5018: Routine 'src/cls/UnitTests' does not exist
[objectscript-math] Package FAILURE - ERROR #5018: Routine 'src/cls/UnitTests' does not exist
ERROR #5018: Routine 'src/cls/UnitTests' does not exist
Did I miss something or is a package manager issue ?
Thank you.
Hello @Evgeny Shvarov ,
I tested the following code in an Iris terminal to add %DB_%DEFAULT role, It seems to work :
Write !,"Current user roles : ",$Roles
Zn "%SYS"
Set tSc = ##class(Security.Applications).Get("/csp/user",.p)
Write !,"Get application : ",$SYSTEM.Status.GetOneErrorText(tSc)
Set p("MatchRoles")=p("MatchRoles")_":%DB_%DEFAULT"
Set tSc = ##class(Security.Applications).Modify("/csp/user",.p)
Write !,"Modify application : ",$SYSTEM.Status.GetOneErrorText(tSc)
Kill pYeah + 1 with Dmitriy
I wish to read nice ObjectScript code !
Hello @Mario Sanchez Macias ,
I think it's not a correct usage of %ConvertJSONToObject, the third argument must be a target object instance.
Depending on your need, you should use "%Array of %String". It's more flexible for SQL that "%List".
If "valueRecived" variable is a dynamic array like ["green","yellow","blue"], you can test this code :
Set valueRecived = ["green","yellow","blue"]
Set array = ##class(%ArrayOfDataTypes).%New()
Do ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(valueRecived.%ToJSON(),,.array)
Zw array