Salesforce

Command Line Requester (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Command Line Requester (Magic xpa 2.x)

The Command Line Requester (MGrqcmdl) is a requester management program that allows for:

  • Executing remote Magic xpa services

  • Managing the Magic Request Broker (MRB) and the Magic xpa Runtime engines (to start and stop the MRB or Magic xpa Runtime engines)

  • Querying the Magic Request Broker regarding the status of specific requests that were issued to Magic xpa Runtime Engines

  • Querying the Magic Request Broker regarding the status of the Magic xpa Runtime engines

The Command Line Requester is activated by selecting the MGrqcmdl.exe file.

The Command Line Interface

The Magic Request Broker can be queried by using the Command Line requester. The Command Line requester is the MGrqcmdl.exe program, which can be run in a DOS-Prompt window. Like other Magic requesters, the Command Line requester uses the mgreq.ini file to determine the address of the Magic Request Broker to which it communicates.

Execution parameters

The full syntax tree for using the Command Line requester is listed below and can also be viewed by using the MGRQCMDL command without parameters.

-APPNAME (or -APP)

Application name

-PRGNAME (or -PRG)

Program name

[ -ARGUMENTS ]

Program arguments, separated by commas

[ -VARIABLES]

Named variables, separated by commas

[ -PRIORITY ]

Priority of execution (0 - 9)

[ -USERNAME ]

Username required by the application

[ -PASSWORD ]

Password required by the application or by the broker

[ -FILENAME ] (or [-FILE])

Name of a file to contain the request results

[ -NOWAIT ]

Asynchronous request mode

[ -HOST, -PORT ]

Broker's address

Data types

-A

alphanumeric

-B

BLOB

-D

double

-F

float

-L

logical (True/False)

-N

integer

-U

NULL

Management parameters

-QUERY

Query results -

RT

[(appname)] Registered Enterprise Servers. To view the Magic xpa engines that are available for service to the MRB, use the command:mgrqcmdl -query=rt

APP

[(host/port)] Applications supported by Enterprise Server. To view the Magic xpa applications that are available for service to the MRB, use the command: mgrqcmdl -query=app

CTXS

(host/port) Context supported by Enterprise Server

QUEUE
(or QUE)

[(appname)] Requests in queue

LOG

[(appname)] [=reqid[-reqid]] Historic information

LOAD

[(appname)] Statistics about application or the broker

PENDING

=<reqid> : Number of requests pending before the request

-REQID

=<reqid> : Request manipulation (priority, removal)

-CLEAR

Removing a request from the queue

-EXE

=<ExeEntry>[/<args>] Activating an executable by the broker. To load an additional Magic xpa engine, use the command: mgrqcmdl -exe=AppName

Where AppName is the name of an entry in the [APPLICATIONS LIST] section of the mgrb.ini file.

Note: When using the command line, the application will only be loaded once, even if the mgrb.ini entry referred to here is set to load more than once.

-TERMINATE
(or -TER)

Termination requests. When the engine is instructed to terminate, it terminates gracefully, which means it does not open any new contexts in the terminating engine. Requests for a new context are directed to other available engines. If another engine cannot be found, the request is rejected. The terminating engine continues to process existing contexts, and will terminate after the last context is properly closed or after the set timeout has passed.

When the timeout value equals zero, the server engine waits indefinitely to terminate. The timeout default value is zero.

ALL

All Enterprise Servers, including the broker

RTS

All Enterprise Servers, but not the broker

host/port

A specific Enterprise Server

TIMEOUT

Terminate the engine within this time period (seconds). To stop any Magic xpa engine, use the command: mgrqcmdl - terminate=EngineId - timeout

where EngineId is the engine’s host and port number.

When the engine is instructed to terminate, it terminates gracefully without any new contexts being opened in the terminating engine. Requests for a new context are directed to other available engines. If another engine cannot be found, the request is rejected. The terminating engine continues to process existing contexts, and will terminate after the last context is properly closed or after the set timeout has passed.

When the timeout value equals zero, the server engine waits indefinitely to terminate. The timeout default value is zero.

For example, you can use the following commands:

  • mgrqcmdl -query=rt – To view the Magic xpa engines that are available for service to the Magic Request Broker

  • mgrqcmdl -query=app – To view the Magic xpa applications that are available for service to the Magic Request Broker. If the Magic Request Broker is not running, the following error message is issued:

Command Line Requester: Connection to broker refused (error -102)

  • mgrqcmdl -exe=AppName – To load an additional Magic xpa engine, where AppName is the name of an entry in the [APPLICATIONS LIST] section of the Mgrb.ini file.

  • mgrqcmdl - terminate=EngineId - timeout – To terminate any Magic xpa engine, whose engine identifier is the engine’s host and port number.

Reference
Attachment 
Attachment