It's something custom. We have implemented some solutions (e.g. notifications system) using the feature you mentioned in the past but we always ended up creating new classes to handle the complexity we needed.
After that, start your Object Gateway, you should see something like: Executing O.S. command: java -Xrs -classpath /shared/FirstDemo.jar:/shared/gson-2.8.5.jar:/shared/intersystems-utils-3.1.0.jar:/usr/irissys/dev/java/lib/JDK18/intersystems-gateway-3.1.0.jar:/usr/irissys/dev/java/lib/JDK18/intersystems-jdbc-3.1.0.jar com.intersystems.gateway.JavaGateway 4444 "" "" 127.0.0.1 ""
Modify some of the PEX components in the production, e.g. FirstOperation:
Queue handling can be an interesting topic. There are several concepts that be discussed like using $system.Events or $sytem.Semaphore (network support), transactions, etc.
I guess you need to run some routine to export/import your classes from a Linux shell.
You can use operating system authentication when opening a terminal session:
- Allow "Operating System authentication" in System > Security Management > Authentication/CSP Session Options
- Allow "Operating System authentication" System > Security Management > Services > Terminal - Create a user in cache with the same username as the user in Linux that will run the bash script.
Then you can just invoke a routine / classmethod from your linux shell and use $system.OBJ.Export / Import to export or import classes, include files, etc.
You should also think about using Ens.Director to stop / start production or business hosts as needed. For instance:
[cacheowner@demo tmp]$ whoami cacheowner [cacheowner@demo tmp]$ ccontrol session HSEX15 "##class(Test.MyClass).Run()" Run! Exporting to XML started on 12/23/2015 16:25:57 Exporting routine: Test.MyInclude.inc Export finished successfully.
Where: Class Test.MyClass Extends %RegisteredObject { ClassMethod Run() As %Status { set ret = $$$OK try { write "Run!",! do $system.OBJ.Export("Test.MyInclude.inc","/tmp/include.xml") } catch ex { set ret = ex.AsStatus() do $system.Status.DisplayError(ret) } quit ret } }
go to post
Thanks so much for all your kind words and support! It鈥檚 awesome to be part of such a great community. I really appreciate every message.
Looking forward for next chance to have a coffee or beer together , whichever happens first 馃榾
Let鈥檚 keep doing amazing things together!
go to post
Boomerang 馃榾
go to post
It simply calls the subscriber endpoint via
$classmethod
and passing the message payload as parameter :)It could be improved adding way more types of endpoints such as remote HTTP endpoints (REST), etc.
go to post
Hi Eduard!
It's something custom. We have implemented some solutions (e.g. notifications system) using the feature you mentioned in the past but we always ended up creating new classes to handle the complexity we needed.
Anyway are still experimenting with this one :)
go to post
Hi Tirthankar,
You probably need to set up the Object Gateway classpath correctly.
I've just got it working as follows:
I've copied them from the jgw container:
docker cp jgw:/jgw/FirstDemo.jar shared/ docker cp jgw:/jgw/gson-2.8.5.jar shared/ docker cp jgw:/jgw/intersystems-gateway-3.1.0.jar shared/ docker cp jgw:/jgw/intersystems-jdbc-3.1.0.jar shared/ docker cp jgw:/jgw/intersystems-utils-3.1.0.jar shared/
You can also generate your .jar files, just make sure it contains all the required dependencies.
127.0.0.1
4444
/shared/FirstDemo.jar:/shared/gson-2.8.5.jar:/shared/intersystems-utils-3.1.0.jar
After that, start your Object Gateway, you should see something like:
Executing O.S. command: java -Xrs -classpath /shared/FirstDemo.jar:/shared/gson-2.8.5.jar:/shared/intersystems-utils-3.1.0.jar:/usr/irissys/dev/java/lib/JDK18/intersystems-gateway-3.1.0.jar:/usr/irissys/dev/java/lib/JDK18/intersystems-jdbc-3.1.0.jar com.intersystems.gateway.JavaGateway 4444 "" "" 127.0.0.1 ""
FirstOperation
:localhost
4444
That should work.
go to post
Hi,
It seems the code was using a deprecated image name.
I've just updated it to use
intersystemsdc/jgw
.Please, try again.
go to post
Hi,
Try using ..%Process to access the actual business process instance (BPL).
Set SourceConfigName = ..%Process.%PrimaryRequestHeader.SourceConfigName
go to post
Hi Cristiano,
Backend image is built using this Dockerfile.
In this case, it is downloading RESTForms2 using wget and then loading it into IRIS. The download is done in the Dockerfile using wget https://github.com/intersystems-community/RESTForms2/archive/master.tar.gz
Make sure in your logs that you had no errors while downloading RESTForms using wget.
go to post
Hi Alex,
It really sounds very interesting having a "row driven" unit test methodology with the messages contained in XData blocks.
It would be great also having Object to Object support.
You should definitely share it to community :)
go to post
Hi Sameera,
Make sure that workdir is configured in ^GITConfig with a trailing slash.
set ^GITConfig($username,"workdir")="c:\GitCode\"
Also make sure that your workdir c:\GitCode\ is a proper initilized git repository.
go to post
Hi Dmitry,
It's a very interesting approach using %XGEN!!
I've just uploaded the Rule Engine example to GitHub if you are interested on adding features.
https://github.com/intersystems-ib/cache-iat-ruleengine
go to post
Hi Eduard,
I've just published the PubSub example in GitHub:
https://github.com/intersystems-ib/cache-iat-pubsub
Queue handling can be an interesting topic. There are several concepts that be discussed like using $system.Events or $sytem.Semaphore (network support), transactions, etc.
go to post
Hi all,
I've just published the PubSub example in:
https://github.com/intersystems-ib/cache-iat-pubsub
go to post
Hi Timur,
I have many examples that we have been using during ad-hoc sessions with customers in Spain.
Those sessions were called IAT (you know we tend to pick up tricky names
)
And at this moment they are not in our github repository, so I'm just sharing some of them here.
We could upload some of these examples to github and use proper names if you are interested.
go to post
Hi Eduard,
I have some $system.Event examples. Have a look at:
https://community.intersystems.com/post/simple-systemevent-examples
Also, I've just uploaded a very basic WorkMgr example:
https://community.intersystems.com/post/simple-workmgr-example
Depending on what you are trying to achieve you could go one way or the other, or maybe combine them.
go to post
Hi Mario,
I guess you need to run some routine to export/import your classes from a Linux shell.
You can use operating system authentication when opening a terminal session:
- Allow "Operating System authentication" in System > Security Management > Authentication/CSP Session Options
- Allow "Operating System authentication" System > Security Management > Services > Terminal
- Create a user in cache with the same username as the user in Linux that will run the bash script.
Then you can just invoke a routine / classmethod from your linux shell and use $system.OBJ.Export / Import to export or import classes, include files, etc.
You should also think about using Ens.Director to stop / start production or business hosts as needed.
For instance:
[cacheowner@demo tmp]$ whoami
cacheowner
[cacheowner@demo tmp]$ ccontrol session HSEX15 "##class(Test.MyClass).Run()"
Run!
Exporting to XML started on 12/23/2015 16:25:57
Exporting routine: Test.MyInclude.inc
Export finished successfully.
Where:
Class Test.MyClass Extends %RegisteredObject
{
ClassMethod Run() As %Status
{
set ret = $$$OK
try {
write "Run!",!
do $system.OBJ.Export("Test.MyInclude.inc","/tmp/include.xml")
} catch ex {
set ret = ex.AsStatus()
do $system.Status.DisplayError(ret)
}
quit ret
}
}
Anyway, you can check out the Ensemble production deployment capabilities:
http://docs.intersystems.com/ens20152/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_deploying