Home| Printable Version
The Insert action loads an XML node into the FactBase to supplement the initial incoming XML message. This node can be described as a fragment of XML within the business rule or it can be loaded from an external XML file. The insert action takes two parameters. The first (to location) is an XPath to the location in the FactBase where the information will be added. The second specifies the XML to insert. This can be defined in three different ways, either as the filename of the document to parse in, as an XPath pointing to the location in the FactBase where this filename is contained (XPath to document), or finally as an XML fragment embedded directly in the rule. For the first option, the file can be chosen by clicking the Choose File link and selecting the required file from the XStoreViewer window. If an XML fragment is being entered, then this should be typed directly into the text area. The entered content must be a valid XML fragment. The Insert action also takes a property called the Merge Option. This property can either be set to append or replace. Replace will replace the contents of the target location with the parsed xml. Append will add the parsed XML to the existing data, and is the default value. Screenshot of an example document insert action This second example shows how an XML fragment can easily be used to define the content to be inserted. In this example a SOAP Fault structure is being inserted because an error has been found with the incoming request structure. Screenshot of an example insert fragment action
Delete Insert Attribute