Difference between revisions of "RPC HELP M Entry Relationship"
From VistApedia
(Created page with " RPC Broker Help Home <h2>Relationship Between an M Entry Point and an RPC</h2> An RPC can be thought of as a wrapper placed around an M entry point for us...") |
(No difference)
|
Latest revision as of 00:27, 6 July 2015
Relationship Between an M Entry Point and an RPC
An RPC can be thought of as a wrapper placed around an M entry point for use with client applications. Each RPC invokes a single M entry point.
An M entry point has defined input and output values/parameters that are passed via the standard M invoking methods. An RPC, however, needs to do the following:
- Accept input from the Broker (i.e., passing data/parameters from the client application).
- Pass data to the M entry point in a specified manner.
- Receive values back from the M code in a pre-determined format.
- Pass M code output back through the Broker to the client application.
You can use the $$BROKER^XWBLIB function in M code to determine whether the code is being run in an environment where it was invoked by the Broker. This can help you use M code simultaneously for Broker and non-Broker applications.
You can use the RPCVersion property to support multiple versions of an RPC. The RPCVersion RPCVersion Example shows you how to do this on the client and server sides.