![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
1. Make the source table, ECTS_EMPLOYEES, known to the example XML document: Click the Tables tab, locate the table in the Tables view, and then drag the table name to the area called Table.
2. Type ects_employees in the “Root name” text field.The table root name is the name assigned as the opening and closing tags for all the occurrences of the table to be included in the XML document, that is, the name of the tag that encloses one table occurrence. The table and document root names must be different.
3. Type ECTS_EMPLOYEES in the “Map name” text field.
4. Optional. To include all the fields even if they have null values, select Generate empty.
5. Optional. Select the “Null after update” option to clear the table buffer after each occurrence is loaded into the output table during the reading of an XML document.Otherwise, the buffer remains uncleared at the end of each occurrence. This selection is important only if some occurrences in the XML document contain missing fields. If the buffer is not cleared, a missing field from one occurrence acquires a value anyway from a prior occurrence.
6. Specify the parameters. For this tutorial, specify a selection criterion of deptno=10 in the Key predicate field.If you parameterize the source table, the criteria for selecting occurrences and ordering field values apply only when you create an XML document. You can specify variable values identified by curly brackets, for example, {REGION}, constants, or both as the format of the entries here.
7. Optional. Specify the preprocess and postprocess production and consumption rules in their respective fields (Production Rules and Consumption Rules).Object Service Broker executes the production rules when producing the document and the consumption rules when reading the document. for the production of the document.In the rest of the fields, specify how you want the output table updated when the XML document is read, that is, when to commit the updates and whether the updates replace existing data. Do the following:
1. Optional. Select “Replace existing data” to cause the data from the XML document to overwrite the existing table data.Deselecting that checkbox means that you expect all the data occurrences in the XML document to be new, that is, the primary key values do not already exist in the table.
2. Optional. Select “Update at end of element” when specifying the options for updating the occurrences of child XML documents in relation to updating the occurrences of the parent document. This selection ensures simultaneous processing for all the updates to each occurrence.Deselecting that option means that processing of the updates from the child documents occurs as partial-occurrence updates, after which the updates from the parent document are processed separately. You usually select this option for a child document definition to prevent a partially complete occurrence from being added to the database.The default is to commit updates at the end of all data processing or at every COMMITLIMIT exception, whichever occurs first. Selecting None means no explicit commit and that you opt for TIBCO Object Service Broker’s default commit at the end of the transaction.If you specify the attributes of a parent XML document, specify the handling of the child documents by performing either of these two steps:
• Select “After N roots” to set a commit point after every N roots from the child document. An additional option is then displayed, in which you specify a value for N.
When producing XML documents, you can specify any table type for the definition. Remember, however, that this table then applies to both the produce and consume messages when it’s part of an XML document.TDS tables work well for static data. For dynamic data, we suggest TEM tables to avoid unnecessary updates and commits to TDS. Similarly, opt for TEM tables when consuming XML documents.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |