Call Remote (Magic xpa 4.x)
The Call Remote operation lets you call a program in another engine. The calling program can pass parameters to the remote service and can receive values from it. The Call Remote operation can be executed in a synchronous mode (Wait) or asynchronous mode (No wait).
Place the cursor to the right of the word Remote, and zoom to the Remote Program dialog box.
The Remote Program dialog box includes the following properties:
|
|
Service
|
You can select a Service from the Services list. The Service is defined in the Services repository.
|
Program Name
|
The public name of the program to be executed. You can specify the program name dynamically by defining a Program Name Expression in the Expression Editor.
When you use the Magic xpi service in the Call Remote operation, a message is created in the space (using the program name set in this property).
|
Program Name Expression
|
You can zoom to the Expression Editor to specify an expression that evaluates to the Program Name at runtime.
|
|
Remote calls cannot be made from an enterprise server to a partitioning server.
|
Exceptions: This operation is not supported for Offline tasks. You cannot call Offline programs from this operation.
When a Call Remote operation is encountered during runtime, the local runtime engine uses the middleware to locate an available engine, and then sends the request to that engine. If the operation's Wait property is set to No or evaluates to No, Magic xpa will continue processing after the Remote Program request is passed to a server. If the Wait property is set to Yes or evaluates to Yes, Magic xpa waits for the completion of the request or until a timeout failure occurs. After the request has been completed, the variables that were sent are recomputed, and the flow of the program continues.
To call a Magic xpi server using the Call Remote operation, the following jar files need to be made available in the classpath (either in the machine’s environment variable or in the CLASSPATH entry in the Magic.ini file):
mgxpi-commons.jar
log-commons-logging.jar
uniRequester.jar
mgxpi-gs.jar
log4j-1.2.16.jar
All the jars
Note: When calling Magic xpi using the Call Remote operation, only the return argument is supported as the return value and not arguments by ref.
The Call Remote properties are:
Condition
Service
Program Name
Arguments
Result
Lock
Wait
Result File
Return Code
Reason Code
Message ID
Priority
Call Operations
Call Properties
How Do I Dynamically Call a Program Within Another Application Not Defined as a Component?
The Online and Rich Client Samples projects (program ES12 and RES12)