Mapping and Transforming Data

Variables in the scope of a rule or rule function can be mapped to arguments of a function used in that rule or rule function.

See also XPath Formula Builder for related information, as well as Working with Rules and Functions.

The Function Argument Mapper allows you to supply the data that a function expects as input. For instructions on accessing the Function Argument Mapping wizard in the rule editor see Using the Function Argument Mappng Wizard.

XPath 1.0 and XPath 2.0

TIBCO BusinessEvents supports XPath 1.0 and XPath 2.0. The default is XPath 2.0 for the new projects. TIBCO BusinessEvents uses the Standard Widget Toolkit (SWT) mapper to support XPath 2.0 and XSLT 2.0.

The following BE functions SWT mapper, and the underlying implementation of these functions uses the related XML runtime:
  • Event.createEvent
  • Instance.createInstance
  • All XPath.evalAs functions, for instance XPath.evalAsString

Using the SWT mapper for XPath 2.0, you can perform the mapping in the same way you can do for XPath 1.0; however, the mapper uses the XPath 2.0 expressions. In contrast to XPath 1.0, the type casting from one data type to another data type is not done implicitly in XPath 2.0. In XPath 2.0, you must perform the explicit typecasting using the constructor function. BusinessEvents also provides the option in the Function Argument Mapping wizard to autofix the typecasting error. You can fix the common issues using the Mapper Function Migration wizard, see Migrating Mapper Functions From XPath 1.0 to XPath 2.0 for more details on how to common mapping issues. You can also use the studio-tools utility to fix those common issues, see Migrating Mapper Functions to XPath 2.0 Using Command Line for more details.

In XPath 1.0, the mapper has two different windows the Function Argument Mapping and XPath Function Builder; however, in XPath 2.0 both window are now combined in the same Function Argument Mapping wizard. Thus, if your project uses XPath 1.0 then you will see the Function Argument Mapping wizard and XPath Formula Builder in different windows. However, if your project uses XPath 2.0 then you will see the Edit tab inside the Function Argument Mapping wizard (see Function Argument Mapping Wizard for XPath 2.0).

The mapper for XPath 1.0 had some TIBCO provided functions that were not part of the XPath 1.0 specifications, for instance format-dateTime. These functions are currently unavailable with the SWT mapper for XPath 2.0, and the old XPath expression may give error, in such case you have to manually fix those error.

All the following sections provides information on mapping data with respect to XPath 1.0 user interface; however, you can perform all those functions in XPath 2.0. For reference on the user interface for XPath 2.0, see Function Argument Mapping Wizard for XPath 2.0.