Published on InterSystems Developer Community (https://community.intersystems.com)

Home > %Net.DB.Connection

Question
Suzy Green · Aug 10, 2022

%Net.DB.Connection

I am trying to use the IRIS connection to connect from our LIS to Health Connect (ENSEMBLE) directly.  You can do this in the same namespace using this:

I ##class(Ens.Director).CreateBusinessService(Ensemble Service Name,.theService)
I theService.ProcessInput(TRAN,.response)

I would like to be able to do the same thing across servers using IRIS connection.  I have the following connection:

 

                set connection = ##class(%Net.DB.DataSource).CreateConnection(host, port, namespace, user, pwd)
                if 'connection.IsConnected set ERRTXT="NotConnected" quit
                set irisC=connection.CreateIris()

                set theService = irisC.ClassMethodValue("Ens.Director","CreateBusinessService",Ensemble Service Name,.theService)
                //How do I replace the line below to use the IRIS instance I established above?
                set response = theService.OnProcessInput(TRAN,.response)

                do connection.Disconnect()

Everything works great until we try to send the transaction: theService.OnProcessInput(TRAN,.response).  Is there any thing that I can use with the IRIS connection to be able to execute theService.OnProcessInput(TRAN,.response)?

Thank you.




 

#Interoperability #ObjectScript #Health Connect #InterSystems IRIS for Health
Product version: IRIS 2021.2
$ZV: IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT [Health:3.5.0]

Source URL:https://community.intersystems.com/post/netdbconnection