Real Time Information Director User Documentation

RTID Metadata Language
Hewlett-Packard Company 8 529618-002
if a query response corresponds exactly to an insert or update document, the same
metadata can serve for the insert/update and the query response.)
In addition to the metadata you explicitly define, the Director creates certain metadata
automatically:
For each insert or update document definition that you create, the Director
creates a corresponding query document definition, suffixed with the characters
_R”. For example, if you define an update document called PERSONALDATA,
the Director automatically defines a query document called
PERSONALDATA_R. Thereafter, whenever an inbound PERSONALDATA
document is processed, the Director returns an XML response of type
PERSONALDATA_R. This response can be used to select the newly inserted or
updated data from the database.
Similarly, when you create a query response document definition (specifying
the information to be provided in response to a query), the Director generates a
document definition for the query itself. For example, if you define a query
response called PATIENTEVENTSHISTORY, the Director creates a query
document definition called PATIENTEVENTSHISTORY_R. The query
document definition defines how the query has to be expressed.
Note: In Subscription processing, a predefined query is triggered by a database change.
Thus, a document delivered to a client as the result of a subscription is just one case of
response to a query. You don’t have to specify the query, but you do have to specify the
triggering event. For details, see the document entitled RTID Subscriptions.
Types of Document Metadata
Director metadata mainly defines the content and format of documents the Director can
process or generate. Thus, a document definition can contain one or two types of
metadata:
Content metadata. This metadata is required for all documents. The Director
uses it to create and execute prepared SQL statements that delete old records,
insert new records, or update existing records related to an XML message. The
metadata describes relationships among tables and associations among records in
multiple tables. For an incoming message that is not an SAP IDoc, the metadata
also maps the incoming data to records and columns in the data store.
Format metadata. This metadata is used only for processing SAP IDocs. It
specifies, for each XML tag in an IDoc, the column in the data store where the
data will be stored. Just as the XML document can contain nested segments (each