Question Nimisha Joseph · Dec 22, 2023

Trouble Accessing SendRequestSync() in BPL Code Activity

Hi ,

I'm currently working on a BPL (Business Process Language) in InterSystems Ensemble, and I'm facing an issue when trying to call the SendRequestSync() method within a code activity. My understanding is that SendRequestSync() is part of Ens.BusinessProcess, and since Ens.BusinessProcessBPL extends Ens.BusinessProcess, I believe it should be accessible.

However, during compilation, I'm encountering an error stating that the method doesn't exist in the class.

Am I missing something here? Is there a specific way to access SendRequestSync() in the BPL code activity?

Any guidance or insights would be greatly appreciated!

Thanks in advance.

Product version: Ensemble 2018.1

Comments

Julian Matthews · Dec 22, 2023

Are you able to share the full error you're seeing?

I have just tested this, and I'm getting no such errors when compiling.

0
Nimisha Joseph  Dec 22, 2023 to Julian Matthews

Hi Julian,

This is the code activity from BPL.

<code xpos='200' ypos='750' >

<![CDATA[ set sc=..SendRequestSync("XXX Operation",context.XXDocument)]]>

</code>

Error:

xx.ContextResponseHandlers.1 Compiling routine xx.Thread1.1 ERROR: xx.Thread1.cls(S7+17) : MPP5376 : Method or Property 'SendRequestSync' does not exist in this class. TEXT: set sc=..SendRequestSync("XXX Operation",context.XXXDocument) Compiling routine XX.Thread1ChildThreads.1 Compiling routine XX.Thread1PendingResponses.1 Compiling routine XX.Thread1SyncResponses.1 Detected 1 errors during compilation in 1.160s.

0
Julian Matthews  Dec 22, 2023 to Nimisha Joseph

Hi Nimisha.

I see what you mean now.

It does seem like the code within a code block doesn't have access to the methods from Ens.BusinessProcess.

I suspect your only option for is to use the "Call" activity set to synchronous with a "Sync" after it.

0
Nimisha Joseph  Dec 22, 2023 to Julian Matthews

@Julian Matthews 
I already tried using call activity with sync.I'm using a %SQL.StatementResult to loop through rows and make synchronous web service calls.

The problem I'm facing is that this loop works only for the first iteration. If I set the call to be asynchronous,it iterates through all the rows correctly.

0