Agentry Data Markup Language
To synchronize data between the mobile application and the back-end system, the back end must have access to the mobile application’s data values. This access is provided in Agentry using the Agentry Data Markup Language, or SDML.
SDML tags provide access to the data values of the mobile application. Additionally, SDML includes a full set of functions, or function tags, that you can use to perform logical operations in relation to these values, or to drive the overall logic that Agentry Server executes against the back end system.
The SDML tags used during synchronization reside within the scripts for step definitions that are defined for SQL database, HTTP-XML, and file system connection types. The synchronization components of data tables and complex tables for each of these system connection types can also contain SDML. In addition to SQL step definitions, other .sql script files run by the server also contain SDML tags. Although steps that are defined for Java Virtual Machine system connections can also access SDML tags, these tags might not be contained directly in the source code of the Java Steplet files used by these steps.
The Agentry Server preprocesses script file steps that contain SDML markup. This processing is called tag expansion: each tag within the script is expanded, and the value it represents replaces the tag name. Function tags are expanded, and the results replace the function tag name. Once the tag expansion has completed, the resulting text is submitted to the back-end system for processing.
There are two categories of tags within the SDML: data and function. Data tags represent data values that are available to the script file based on when it is executed. This information must be provided to the script file that contains the tags. For step definitions, the values in scope are dictated by the step usage definition. For .sql scripts that are run by the server but not a part of the step definition, the values in scope depend on how that script is used. Some values are globally available, such as the user ID for logging in to the Agentry Client.
Function tags provide the logical, mathematical, string manipulation, and other similar functionality to the SDML. They are, with certain exceptions, globally available, and can take values that are passed in as arguments, parameters, or expressions. These values are processed during tag expansion, with the resulting values placed within the script.
SELECT A.FIELD1, B.FIELD2, C.FIELD3, FROM TABLEA A, TABLEB B, TABLEC C WHERE A.NAME = ‘<<user.agentryID>>’ AND A.ACCTNUM = ‘<<object.acctnum>>’ AND B.ACCTNUM = A.ACCTNUM AND C.ACCTNUM = B.ACCTNUM
The value <<user.agentryID>> is replaced with the user ID as entered when the user logs into the Agentry Client. The data tag <<object.acctnum>> is replaced with the value of the acctnum object property that is currently being processed.