You should never concatenate query parameters in the query text, instead use placeholders and parameters.

Like this:

 set tQuery="SELECT ProvId, AllwOpenSchYN, IsAllwSchedYN FROM "_context.EpicClaritySerMycTable_" WHERE ProvId=? AND Market=?"
 set tStatement = ##class(%SQL.Statement).%New()
 set qStatus = tStatement.%Prepare(tQuery)
 set rset = tStatement.%Execute(context.ProvId,context.Market)
 do rset.%Next()
 if rset.%SQLCODE<0 { 
    $$$TRACE("SQL Query ["_tQuery_"] FAILED")
 } else {
    set tAllwOpenSchYN = rset.AllwOpenSchYN
    set tIsAllwSchedYN = rset.IsAllwSchedYN
    set tProvId = rset.ProvId
       
 }
 

Suggested reading: Dynamic SQL Best Practices

To me it looks that the remote system (147.185.133.137) it's connecting and then disconnect before sending any data.
Maybe setting Archive IO can provide some hint, but I'm not sure what happen with Archive IO when no data is received, like seems in this case.

I would try to test/connect using something like Postman and see if it works as expected.

Please note that %GlobalCharacterStream class in deprecated in favor of %Stream.GlobalCharacter class.

I'm puzzled by the line:

That method convert an object to a stream, but in fact you are passing a stream and it seems you expect it returns an object.

Also note that this two lines:

don't do anything, you can safely remove them.

To exchange (in/out) ObjectScript collections (arrays/lists) and streams to/from Java using the new $system.external interface you use the "magical undocumented" %getall() and %setall() methods.

You can get some sample code of using it in the Open Exchange project samples-dynamicgateway-java.

For example for streams you can try something like:

        w !,"TRY #"_$I(TEST)
        #Dim argc As %Stream.GlobalCharacter = ##Class(%Stream.GlobalCharacter).%New()
        do argc.Write($C(40))
        do argc.Write($C(41))
		Set bytesArrayIn=javaGate.new("byte["_argc.Size_"]")
		Do bytesArrayIn.%setall(argc)
        do test.testByteArr(bytesArrayIn)

Hi @Ashok Kumar , you also need to use lock to properly implement ACID, something like:

LEARNING>lock +^myTracker("onSomething")
LEARNING>w ^myTracker("onSomething")
1
LEARNING>ts
 
TL1:LEARNING>s ^myTracker("onSomething")=12
TL1:LEARNING>w ^myTracker("onSomething")
12
TL1:LEARNING>trollback
LEARNING>w ^myTracker("onSomething")
1
LEARNING>lock -^myTracker("onSomething")
LEARNING>

does it also work for global (i.e the hierarchical  data model)?

Simple answer: yes, it sure does.

Your code implementation need to use transactions (TSTART, TCOMMIT, TROLLBACK) commands to implement ACID.

Don't forget that, in the end, using Objects and/or SQL, the code executed use globals.

Using Objects and/or SQL the framework implement transaction for you, using globals you need to implement/code it.

Wow @Jeffrey Drumm !

It's amazing to see how we had the same idea/solution! 😂

Probably because it's a good idea/solution! 😊

Regarding the debug vs. assign action, maybe assign is easier and simpler to adopt because does not need to change RuleLogging setting that can "conflict" (mess) if more debug actions are used that are not required in production.
Using debug has the advantage to be able to disable the logging from portal/settings, if/when required.
It depends on the environment and requirements, soooo.....good we have to options! 😉

Having said that, it would be great if IRIS will add specific Action(s) to log info/warning/error in the event log.