Difference between revisions of "RPC HELP Tutorial Step 5"

From VistApedia
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
 
Using VA FileMan, create a new RPC entry in the REMOTE PROCEDURE file. Set up the RPC as follows:
 
Using VA FileMan, create a new RPC entry in the REMOTE PROCEDURE file. Set up the RPC as follows:
  
     NAME: ZxxxTT LIST
+
     '''NAME''': ZxxxTT LIST
     TAG: TERMLIST
+
     '''TAG''': TERMLIST
     ROUTINE: ZxxxTT
+
     '''ROUTINE''': ZxxxTT
     RETURN VALUE TYPE: GLOBAL ARRAY
+
     '''RETURN VALUE TYP'''E: GLOBAL ARRAY
     WORD WRAP ON: TRUE
+
     '''WORD WRAP ON''': TRUE
     DESCRIPTION: Used in RPC Broker developer tutorial.
+
     '''DESCRIPTION''': Used in RPC Broker developer tutorial.
  
The [[RPC_HELP_RPCs|RPC]]'s RETURN VALUE TYPE is set to GLOBAL ARRAY. This means that the RPC expects a return value that is a global reference (with data stored at that global reference).
+
The [[RPC_HELP_RPCs|RPC]]'s RETURN VALUE TYPE is set to [[RPC_HELP_BROKER_RETURN_VALUE_TYPES#Return_Value_Types_--_Global_Array|GLOBAL ARRAY]]. This means that the RPC expects a return value that is a global reference (with data stored at that global reference).
 
Also, the RPC's WORD WRAP ON is set to TRUE. This means each data node from the VistA M Server is returned as a single node in the [[RPC_HELP_TRPCBroker_Results|Results]] property of your [[RPC_HELP_TRPCBroker|TRPCBroker]] component in Delphi. Otherwise, the data would be returned concatenated into a single node in the [[RPC_HELP_TRPCBroker_Results|Results]] property.
 
Also, the RPC's WORD WRAP ON is set to TRUE. This means each data node from the VistA M Server is returned as a single node in the [[RPC_HELP_TRPCBroker_Results|Results]] property of your [[RPC_HELP_TRPCBroker|TRPCBroker]] component in Delphi. Otherwise, the data would be returned concatenated into a single node in the [[RPC_HELP_TRPCBroker_Results|Results]] property.
 
 

Latest revision as of 18:47, 15 July 2015

RPC Broker Help Home

Tutorial Home

Tutorial: Step 5 -- RPC to List Terminal Types

Now that you've created an RPC-compatible routine to list terminal types (Step 4), you can go ahead and create the RPC itself (the entry in the REMOTE PROCEDURE file) that will call the routine.

To create an RPC that uses the TERMLIST^ZxxxTT routine:

Using VA FileMan, create a new RPC entry in the REMOTE PROCEDURE file. Set up the RPC as follows:

   NAME: ZxxxTT LIST
   TAG: TERMLIST
   ROUTINE: ZxxxTT
   RETURN VALUE TYPE: GLOBAL ARRAY
   WORD WRAP ON: TRUE
   DESCRIPTION: Used in RPC Broker developer tutorial.

The RPC's RETURN VALUE TYPE is set to GLOBAL ARRAY. This means that the RPC expects a return value that is a global reference (with data stored at that global reference). Also, the RPC's WORD WRAP ON is set to TRUE. This means each data node from the VistA M Server is returned as a single node in the Results property of your TRPCBroker component in Delphi. Otherwise, the data would be returned concatenated into a single node in the Results property.

In the next step of the tutorial (Step 6) you will call this RPC from the tutorial application, through its TRPCBroker component.

PREV: Step 4: RPC Routine to List Terminal Types

NEXT: Step 6: Call the ZxxxTT LIST RPC