RPC HELP XWB IS RPC AVAILABLE

From VistApedia
Jump to: navigation, search

RPC Broker Help Home

XWB IS RPC AVAILABLE

Example

Checking RPC Availability on a Remote Server

Use this RPC to determine if a particular RPC is available on a VistA M Server. The RPC PARAMETER passes the name of the RPC to be checked. The RUN CONTEXT PARAMETER allows you to test availability to a local or a remote user. The VERSION NUMBER PARAMETER allows you to check for a minimum version of an RPC on a remote VistA M Server.

RETURN VALUE: Boolean

  • 1 = RPC Available
  • 0 = RPC Not Available

RPC PARAMETER: Pass the name of the RPC to be tested in Param[0].Value, and the type (literal) in Param[0].PType.

RUN CONTEXT PARAMETER (Optional): Pass the run context (local or remote) of the RPC in Param[1].Value, and the type (literal) in Param[1].PType. Possible values are:

  • L = Check if available to be run locally (by a user logged into the VistA M Server)
  • R = Check if available to be run remotely (by a user logged in a different VistA M Server)

If this parameter is not sent, the RPC is checked for both local and remote and both run contexts must be available for the return to be ‘1’ (RPC Available). The check is done against the INACTIVE field in the REMOTE PROCEDURE file.

VERSION NUMBER PARAMETER (Optional): Pass the minimum acceptable version number of the RPC in Param[2].Value, and the type (literal) in Param[2].PType. This parameter is only used if the RUN CONTEXT parameter = "R". If a numeric value is in this parameter, it will be checked against the value in the VERSION field of the REMOTE PROCEDURE file. If the version number passed is less than or equal to the number in the VERSION field, the RPC will be marked available.

If the VERSION field is null, the check will fail for a numeric value in this parameter.

Also, the current context of your user must give them permission to execute the XWB IS RPC AVAILABLE (it must be included in the RPC multiple of the "B"-type option registered with the CreateContext function).