RPC HELP XWB DEFERRED RPC Example

From VistApedia
Jump to: navigation, search

Param

XWB DEFERRED RPC Example

The following is example of the XWB DEFERRED RPC:

   brkrRPCBroker1.RemoteProcedure := 'XWB DEFERRED RPC';
   brkrRPCBroker1.Param[0].Ptype:= Literal;
   brkrRPCBroker1.Param[0].Value := 'MY RPC’;
   brkrRPCBroker1.Param[1].Ptype:= Literal;
   brkrRPCBroker1.Param[1].Value := '1';
   brkrRPCBroker1.Param[2].Ptype:= Reference;
   brkrRPCBroker1.Param[2].Value := 'MY RPC PARAMETER';
   try
     brkrRPCBroker1.Call;
   except
     On EBrokerError do
       ShowMessage('Connection to server could not be established!');
   end;
   .; code to store HANDLE returned in brkrRPCBroker1.Results[0]

The application will need to use XWB DEFERRED STATUS, XWB DEFERRED GETDATA, and XWB DEFERRED CLEAR to complete the transaction.