How to call BO to other BO
Hi all,
I'm wondering if it is possible to call a Business Operation from other Business Operation.
I have a BO that writes logs into a database, using a personal message. I can create a set obj=##class(MyLogs).%New() but the BO has all parameters about connection.
Is it possible?
Best regards.
Comments
I (and not only me) don't consider it "best practice" but sometime is necessary and I admit I have done it a few times.
You can definitely call another BO from a BO, the only limitation is that you can only make a sync call.
Just use ..SendRequestSync() method, same as you would do in a BP.
To do async calls shouldn't be a problem:
https://docs.intersystems.com/iris20243/csp/docbook/DocBook.UI.Page.cls…
True, only if you don't need/want a response from the called BO.