Attributing your code

Attributes (introduced in version 9.3) are a feature of Synergy DBL that enables you to automate the population and maintenance of the Synergy Method Catalog (SMC). The SMC identifies the Synergy routines that you have prepared for remote calling. The most efficient way to populate the SMC with details about your routines is by attributing your code. (You can also populate the SMC by entering data manually using the Method Definition Utility.)

xfServerPlus supports two attributes—xfMethod and xfParameter—each of which has a number of properties that are used to describe your Synergy routines. The xfMethod attribute is required, but xfParameter may be optional, depending on the type of parameter you are defining. The example below shows a simple xfMethod attribute statement for the function ReturnError.

{xfMethod(interface="ConsultApp", elb="EXE:Consult")}
function ReturnError ,string
    req in userToken       ,a22
    endparams

Once you have added attributes to your Synergy code, you will run the dbl2xml utility using one or more Synergy source files as input. (Some additional changes to your code may be necessary before you can use dbl2xml. For example, you may need to add parameter modifiers [IN, OUT, REQ, etc.], as shown in the example above.) The dbl2xml utility outputs an XML file containing information about your routines. This XML file is then imported into the SMC.

All of the options for defining routines and parameters that are available in the MDU, including documentation comments, are also available when you attribute your code. Attributes can be used regardless of the xfNetLink client you are using.

For more information about the SMC, see Defining Your Synergy Methods. For detailed instructions on attributing your code, see Using attributes to define Synergy methods. For the dbl2xml syntax, see dbl2xml utility.