Hi @Aziz Cotrim,
I think inheritance is more commonly used in Iris, but you can also use composition. It's more a matter of choosing the design patterns you utilize. In Iris, we have all the power and freedom of OOP.
- Log in to post comments
Hi @Aziz Cotrim,
I think inheritance is more commonly used in Iris, but you can also use composition. It's more a matter of choosing the design patterns you utilize. In Iris, we have all the power and freedom of OOP.
Hi @Aziz Cotrim,
Like @Robert Barbiaux pointed, the recommended way to handle long running calls outside the IRIS, is Deferred Responses.
Hi @Aziz Cotrim,
During development, to debug the entire BS->BP-BO integration flow, I set the INVOCATION parameter of both BP and BO to InProc. This way, execution occurs in the process that created the first message sent, in this case, BS.
I create a debugging routine or class method where I instantiate BS and continue debugging from there.
Below is a code snippet to start the debugging process from a BS.
ClassMethod Debug()
{
Break
#Dim bs As Ens.BusinessService = ""
#Dim statuscode As %Status = ##Class(Ens.Director).CreateBusinessService("BS Name", .bs)
If ($System.Status.IsError(statuCode))
{
Write "Error creating a BS instance: ", $System.Status.GetErrorText(statusCode)
Return
}
Set statusCode = bs.ProcessInput(input, .output)
If ($System.Status.IsError(statuCode))
{
Write "Error returned form ProcessInput method: ", $System.Status.GetErrorText(statusCode), !
Return
}
}For more information:
Invoking a Business Service Directly
Defining a Business Operation Class
Hi @Aziz Cotrim
One approach I use, to take advantage of both what @Nick Petrocelli said and what @Yaron Munz said, is to create a message that will be the common basis for defining the properties. I define it as abstract and create specific messages inheriting from this base class, adding the %Persistent class to the inheritance list. This way, the storage will be individual for each message, but maintaining a single definition.
Take a look at my Interopway Rest project. I use this approach.
Hi @Scott Roth
The OnTask is a built in method of EnsLib.SQL.InboundAdapter that execute the query and call ProcessInput method from Business Service passing a EnsLib.SQL.Snapshot to be processed.
Happy anniversary for all of us.
My Christmas trees.
Create a GetMethod to return the value of the property and use it in the expression.
Hi Adeel,
IRIS 2019 does not support java 11. I suppose this is the cause of error. The maximum supported version of java is 8. See documentation:
Supported Technologies | InterSystems Supported Platforms | InterSystems IRIS Data Platform 2019.1
Regards.
Hy guys,
In the end, I had to use an intermediate file to signal an error when executing the Caché class, because using the environment variable didn't reflect it in the process that runs csession.
I'll create an Open Exchange application with the complete solution later..png)
Thanks @Dmitry Maslennikov and @Alexander Pettitt
I had already tested your suggestions, without success.
I'll create an environment variable with the execution result and encapsulate it in a Python script to test the result.
Regards.
Hi Alon,
Have you look at the Interopway XDBC. It's a module that I developed to support xDBC Integratoins, has examples of CRUD operations and call Stored Procedures.
Regards.
Thanks Brett.
Hi @Scott Roth
You can do in the BS, but in my opinion use the common approach sending a message from the BS to a BO. In the BO you insert the data into internal table, with this approach you have how to trace data if some error occur.
Hi Isayas,
You need to use TCP Client Server Communications (commands Open, Use, Read, Write) you can get information about this in the documentation https://docs.intersystems.com/iris20243/csp/docbook/DocBook.UI.Page.cls?KEY=GIOD_tcp.
In the OpenExchange exists a simple sample developed by @Robert Cemper . Follow https://openexchange.intersystems.com/package/Simple-remote-server-control
Regards.
Thanks @Mark Bolinsky great article.
Cache/Ensemble they do the configuration. See the screenshot below. I just did a new installation of Ensemble. The highlighted columns are the file update time..png)
Hi @Nezla
If you install Ensemble before install ISS, you need to setup the CSPModule manually in IIS. If ISS is intalled before install Enemble, the Ensemble install setup the CSP Module on IIS for you.
For more information read the documentation:
Watch the Webinar Configuring IIS for Better Performance and Security with (intersystems.com.
You can traverse the entire global with a loop and $Order function.
A simple routine to traverse your global can be:
Teste
Set ^DataTest = 3
Set ^DataTest(1) = $lb("","1329","JMMK-G1D6")
Set ^DataTest(2) = $lb("","1516","AMEV-GVPF")
Set ^DataTest(3) = $lb("","2333","4QC6-4HW3")
Set key = ""
// Print the header filds
Write "Reference", $Char(9), "Code" , !
For
{
// first parameter is global and key,
// second parameter opredr to travers globa. 1 = ascending subscript order (the default) or –1 = descending
// third is target that receives the value if the key is defined
Set key = $Order(^DataTest(key), 1, data)
If (key = "")
{
Quit // Exit for loop
}
Set reference = $ListGet(data, 2)
Set code = $ListGet(data, 3)
//
Write reference, $Char(9), code, !
}Output o execution:
> Do Teste^Teste
> Reference Code
> 1329 JMMK-G1D6
> 1516 AMEV-GVPF
> 2333 4QC6-4HW3
See Using Globals Object Script Tutorial , $Order Function for more examples e details.
Hi @Julius Kavay you are correct. I miss the part:
The XML fragment is surrounded by plain text.
Hi Michael.
The class %XML.TextReader is used to read arbtrary XML documents.
Thanks for recognitions!!
I always try to do my best in share with others DC members.
Hi William,
In SMP go to Interoperability->Interoperate->ASTM->ASTM Schemas Structures.png)
Via Studio go to File->OpenFile, filter by AST Document "*.ast".png)
Hi Water,
You can use the Method Correlate form %XML.Reader class.
See the docuemtnation about importing XML into Objects.
Hi Nimisha.
Could you give us more detailed information of the scenario? Your doubt is about loop over the resulset? Or how to retrieve value from resultset and put into a SQL Query?
Hi Yakov,
You can set in the Connection String (JDBC) or using the adapter method SetConnectAttr
Check the database documentation to see the rigth values.
Hi João,
I think you can use the $View function with -5 mode.
Hello Adrian,
I think the problem is that you are concatenate a String with a Stream?
"DOC^Application^PDF^Base64^" _ target.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ObservationValue(1)}
You need to create a new Stream, call method write of the new Stream with the value "DOC^Application^PDF^Base64", after append the old Stream to the new one.