To better understand the requirements, can you post at least one sample source message and a (manually transformed message?
Enrico
- Log in to post comments
To better understand the requirements, can you post at least one sample source message and a (manually transformed message?
Enrico
"Do you mean we have to compile those changed codes in the final deployment environment, at customer site?"
Yes, at least only for the production class extending Ens.Production.
Enrico
"we find that the new codes are not visible in the management portal"
Are you sure that your code is from APPCODE database?
Regarding the production settings, replacing the production class only is not sufficient, you need to compile the production class in the final environment. When a production is compiled "some data" is saved in the (APPDATA in your case) database.
Enrico
Two alternatives comes to my mind:
Use not deprecated HS.FHIR.DTL.vSTU3.* classes, something like:
Set payload=##class(HS.FHIR.DTL.vSTU3.Model.Resource.Bundle).FromJSON(pHttpResponse.Data,"vSTU3")
And then "navigate" the payload instance as a classic IRIS class.
Other option, use FHIRPath
Enrico
OK, I've created an idea:
Implement samples of $system.external interface (aka "InterSystems External Servers")
Now the problem is finding someone ABLE to implement it, not WILLING....
Enrico
The idea is simple and I'm not sure it can be considered "documentation improvement" or it make sense in the "open exchange".
The idea is: add all the missing documentation for $system.external!!
The problem in not poor documentation, the problem is the MISSING DOCUMENTATION.
And in case you wonder, yes, I have reported this to WRC and sent a feedback to the ISC documentation team.
Nothing has happened.
On the same topic:
Using arrays in $system.external .NET gateway
Enrico
For some unknown reason I was convinced he was using version 2018, I probably mixed up with a differente question!
Since it's IRIS version 2020, using the new External Language Server is definitely the way to go, I apologize for my confusion.
Enrico
Hi,
before using the Java class/method you need to import/create the proxy classes within Caché using ##class(%Net.Remote.Gateway).%ExpressImport() (or method %Import).
Have a look to the documentation here:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…
Enrico
Converting the Base64 stream to a pdf is trivial, extracting and searching text inside a pdf....can be hard to (almost) impossible.
Enrico
When a new task is created in System Management Portal (SMP) there is a field:
"Namespace to run task in"
The task will run in that namespace, to find what database it corresponds to check the namespace definition.
Enrico
Ciao Pietro,
I'm afraid you cannot change FailureTimeout "at the first iteration", however, for the specific case you describe, in the Business Operation you can override the method OnFailureTimeout() and there programmatically change the default behavior when the FailureTimeout has been reached. Something like:
/// Override this method to provide custom handling of retry / failure timeout.<p/>
/// Set ..Retry=1 to override normal error return and re-evaluate flag properties.<p/>
/// Return 0 to skip further (default) FailureTimeout processing, 1 to perform default processing.
Method OnFailureTimeout(pRequest As %Library.Persistent, Output pResponse As %Library.Persistent, ByRef pSC As %Status) As %Boolean
{
If pRequest.severity = "high" {
Set ..Retry=1
Quit 0
} Else {
Quit 1
}
}
This is just a simple example, you may want to test/check pSC....
Give it a try and let us know.
Ciao,
Enrico
What type of messages?
In general, a message is an instance of a persistent class, so "size" is a vague term.
Enrico
What's the class/type of test.document property?
sendstream.OriginalFilename is replaced/modified by the StreamSet() method
Why not use the latest jdbc driver version?
https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-j…
Instead of adding user & password to the url string, can be entered in the SQL GW configuration page and still works. This way the password is masked and not in clear text.
Not if you add in SQL GW Connection config ";trustServerCertificate=true" in the URL, as Jeffrey example
Wow how did you pin point that down?
The second time I called the method/query (like your) I looked at the variables and found that %objlasterror was set, then from terminal:
d $system.OBJ.DisplayError()
To get properly formatted error message.
BTW, what is a "Domain Service Account"? From a JDBC authentication I guess it's just a normal domain account with user/password.
Are having the authentication issue with Microsoft JDBC driver only with Domain Service Account or with standard domain user accounts as well?
Enrico
It's an issue of the jTDS, using the connection the second time and IRIS try to reuse the connection there is an error:
ERROR #5023: Remote Gateway Error: java.lang.AbstractMethodError
at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833)
at com.intersystems.jdbcgateway.JDBCGateway.isValid(JDBCGateway.java:1982)
at com.intersystems.jdbcgateway.JDBCGatewayHelper.processMessage(JDBCGatewayHelper.java:642)
at com.intersystems.gateway.JavaGateway.getJDBCGatewayMessage(JavaGateway.java:2015)
at com.intersystems.gateway.JavaGateway.processMessage(JavaGateway.java:519)
at com.intersystems.gateway.JavaGateway.run(JavaGateway.java:458)
at com.intersystems.gateway.JavaGateway.run(JavaGateway.java:421)
My guess is that for IRIS the connection "is not valid" therefore open a new connection.
It's a known issue already reported.
If you search for "jTDS AbstractMethodError isValid()" you will find many entries..
Enrico
Just tested using "mssql-jdbc-12.2.0.jre8.jar", Java 8 and IRIS:
IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT
It works fine, the connection is reused correctly. No additional connections are made if I run a query (like your) multiple times from terminal.
I'm using IRIS for Windows, you use same version for RedHat, maybe a platform specific bug?
What jdbc driver & java are you using?
Enrico
So, if you run the FindNPI() method multiple times you end up with miltiple connections to SQL Server?
I'm curious, what do you get if from terminal you run:
ZWrite %JDBCGateway
Set x=##class(osuwmc.CPD.vProviderNPIEns).FindNPI(123)
ZWrite %JDBCGateway
Set x=##class(osuwmc.CPD.vProviderNPIEns).FindNPI(123)
ZWrite %JDBCGateway
Set x=##class(osuwmc.CPD.vProviderNPIEns).FindNPI(123)
ZWrite %JDBCGateway
How many connection to SQL Server are there before and after these commands?
Enrico
In a tag-based CSP page...
just use a class and the CSPURL parameter
Well, that's a change of the game! 😁
Enrico
why would a query against a Linked Table spawn a new connection every time, wouldn't it reuse a connection?
AFAIK it should work exactly that way and reuse the existing connection.
Evidently in your case it is not reusing the existing connection and create a new connection leaving the old connection "floating".
The "kill %JDBCGateway()" suggested by WRX simply force the close connection so you don't have "floting" connections left over.
There is probably some peculiar behavior in your code......if it's not a bug in your IRIS version.
In fact connections are stored in %JDBCGateway() array, it would be interesting, after disabling the kill, to see the full content of that array before & after using the linked tables a few times.
Enrico
I know this is old, but recently I found a new way to export/import a package to a global, this may simplify the solution.
1) create a studio project with all the classes that need to me exported. This can be done programmatically, create an instance of %Studio.Project, use AddItem()...etc.
2) Export the project to a global like ^IRIS.Temp("myProjExport"). Open %Studio.Project, export ot global using DeployToGbl() method
3) in target namespace import calling ##class(%Studio.Project).InstallFromGbl()
Using ^IRIS.Temp has the advantage of easy/shared access from all namespaces.
Enrico
In fact, even subclassing %CSP.WebSocket or adding your instance methods class as superclass would not work because all the code you write inside a CSP page run in class methods, so you cannot call an instance method.
And this brings back my initial question:
What would be the instance (i.e. $this) of the method?
None I think, within a CSP page code there is no current instance, the "page" is not instantiated, even when using %CSP.WebSocket as superclass.
But...how are you using %CSP.WebSocket??
Something like:
<CSP:CLASS SUPER="%CSP.WebSocket">
Or what/how?
Enrico
Create a new class, say myCSP.WebSocket, that extends %CSP.WebSocket.
Add your instance method to myCSP.WebSocket class and use it as superclass of your CSP page(s).
Enrico
The problem/error is importing the project/code from the global, not importing the global itself.
My guess is that the code has been exported in deployed mode without source, so it can be imported only in the same version. If so, you need the source to recompile.
Enrico
If you are looking for actual call that have been made (and not purged), you can SQL query the table Ens.MessagHeader and look in the columns SourceConfigName and TargetConfigName.
The lines down in the production configuration are...well....derived looking/parsing the code and are not fully reliable/accurate depending on how you pass the target parameter to the SendRequestSync/SendRequestAsync methods (if you writhe the code of your Business Hosts).
Enrico
Supposing it's possible, does it make sense? Note that it's a genuine question, a doubt I have.
What would be the instance (i.e. $this) of the method?
Enrico
To create a custom CSP login page:
- Ensure that the Web Gateway user (CSPSystem) has permissions to read the database for where the custom login page is located. Assign the desired database resource to an appropriate role, and then assign that role to the CSPSystem user.
See:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
And...this is the demonstration that the feedback button in the documentation pages really does work!
I admit I ran into this problem sometime ago, after realizing the problem I felt the documentation had to mention that "detail"....so I pressed the feedback button and filed the request/advice.
Now that "detail" is the first step in the recipe of creating a custom login page.
Well done InterSystems Documentation team!
Now we only need to encourage people to actually read the documentation ![]()
Or search the community:
https://community.intersystems.com/post/custom-login-page-iris
Enrico ![]()
Hi Claude,
both the json samples you provide do no parse correctly, can you provide a valid json sample?
Enrico