Configuring a Production to Use XML Virtual Documents
This topic describes the configuration steps needed to use XML virtual documents in a production.
For information on settings not described here, see Reference for Settings.
Other topics describe how to create items to use in the production: data transformations, rule sets, and search tables.
Loading XML Schemas into InterSystems IRIS
For XML virtual documents, it is useful, but not required, to load the corresponding XML schemas into InterSystems IRIS. If the schemas are available in InterSystems IRIS, then InterSystems IRIS can validate the documents, and you can use the schema-dependent virtual property paths (rather than only the DOM-style paths). Also, the DTL editor and the Business Rule Editor provide assistance with the document structure.
To load an XML schema into InterSystems IRIS, use the XML Schema Structures page.
Adding a Business Service to Handle Inbound XML as Virtual Documents
To add a business service to handle inbound XML documents as virtual documents, do the following:
-
To your production, add a business service that is based on the class EnsLib.EDI.XML.Service.FileServiceOpens in a new tab or EnsLib.EDI.XML.Service.FTPServiceOpens in a new tab.
-
Specify where this business service will find the inbound XML documents.
For example, for EnsLib.EDI.XML.Service.FileServiceOpens in a new tab, specify the File Path setting, which is the directory that the business service will check for new files.
-
Optionally specify other settings as needed. In particular, you might want to specify the following:
-
Doc Schema Category, which specifies the XML schema that applies to the inbound documents. Select a XML schema that you have previously loaded.
You must choose a schema if you want to validate the messages. The schema can also be used if you define search tables.
-
Charset, which specifies the character set of the inbound data. InterSystems IRIS automatically translates from this character encoding. For more options, see Charset in Reference for Settings.
-
Search Table Class. See Defining Search Tables for XML Virtual Documents.
Make sure that this search table class is consistent with the kinds of messages received by this business host. For example, if the business host receives messages whose root element is <Transaction>, it would not be appropriate to use a search table class that used properties in an <Employee> element.
-
-
Specify where to send the XML documents. To do so, specify a comma-separated list of values for the Target Config Names setting. Each value should be the name of either a business process or a business operation.
Adding a Business Process to Handle XML Virtual Documents
To add a business process to handle XML virtual documents, do the following:
-
To your production, add a business process that is based on the class EnsLib.MsgRouter.VDocRoutingEngineOpens in a new tab.
-
For this business process, specify the Business Rule Name setting. Choose the appropriate business rule set that acts on XML virtual documents.
For information on defining these, see Defining Rule Sets for XML Virtual Documents.
-
Optionally specify other settings as needed.
-
Configure the appropriate business host or hosts in the same production to send XML virtual documents to this business process:
-
For a business service, edit the Target Config Names setting to include the name of this business process.
-
For a business process, specify a Business Rule Name that routes messages to this business process.
-
Adding a Business Operation to Handle XML Virtual Documents
To add a business operation to send XML virtual documents to destinations outside of a production, do the following:
-
To your production, add a business operation that is based on the class EnsLib.EDI.XML.Operation.FileOperationOpens in a new tab or EnsLib.EDI.XML.Operation.FTPOperationOpens in a new tab.
-
Specify settings of this business operation as needed.
For example, for EnsLib.EDI.XML.Operation.FileOperationOpens in a new tab, specify the File Path setting, which is the directory to which the business operation will write the files. The directory must exist and must be accessible.
-
Optionally specify the Search Table Class setting. See Defining Search Tables for XML Virtual Documents.
Make sure that this search table class is consistent with the kinds of messages received by this business host. For example, if the business host receives messages whose root element is <Transaction>, it would not be appropriate to use a search table class that referred to an <Employee> element.
-
Configure the appropriate business host or hosts in the same production to send XML virtual documents to this business operation:
-
For a business service, edit the Target Config Names setting to include the name of this business operation.
-
For a business process, specify a Business Rule Name that routes messages to this business operation.
-
You might also want to add business operations to handle bad messages (for background, see Business Processes for Virtual Documents).