How to access property values in mappings in BusinessWorks and BusinessWorks Container Edition

Emmanuel Marchiset
3 min readApr 7, 2024

This article is to explain how to access both Module property values and Java property values in a BusinessWorks mapping.

Module properties

There are two kinds of module properties some are defined by the application developer and some are predefined in BusinessWorks.

The module properties defined by the application developer are managed in the ‘User’ tab of the Module Properties:

The User tab of the Module Properties panel

The predefined module properties are visible in the ‘System’ tab of the Module Properties:

The System tab of the Module Properties panel

The value of a given module property can be accessed in a mapping using the following XPATH function:
bw:getModuleProperty()

For example to access a property called ‘MyProperty’ that is part of a group called ‘Service’ you have to use the following XPATH formula:
bw:getModuleProperty(“/Service/MyProperty”)

Similarly, this function can also be used to access the predefined properties.

For example, to access the property ‘BW.APPNODE.NAME’, that contains the name of the appnode hosting the application, have to use the following XPATH formula:
bw:getModuleProperty(“BW.APPNODE.NAME”)

Note that the deployment unit name and version are the name and version of the running application.

It is also possible to access properties defined in Shared Modules using the following syntax:

bw:getModuleProperty(“//<Shared Module Name>///<GroupName>/<PropertyName>”)

For example to access the value of the property “MsgLabel” part of the “SMProperties“ group of the “MySharedModule” Shared Module you have to use the following syntax:

bw:getModuleProperty(“//MySharedModule///SMProperties/MsgLabel”)

In case there are multiple group levels the name of each sub-level should be included like this:
bw:getModuleProperty(“//<Shared Module Name>///<GroupNameLevel1>/<GroupNameLevel2>/<GroupNameLevelN>/<PropertyName>”)

For more details you may refer to the following KB article:
https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-46830

Note that starting from BusinessWorks 6.10 it is possible to directly use Module Properties in Mappings (with the limitation that in case the name of a property would change the developer would have to update the impacted mappings manually). Module Properties are available in the DataSource tab of the Mapper, you can select a property and drag and drop it in the target field, this automatically creates an XPATH formula using the getModuleProperty() function to access the property value.

Directly using a Module Property in a Mapping

System properties

System properties are in fact the Java properties defined by default in Java or defined in the appnode tra file or config.ini file.

The value of a given system property can be accessed in a mapping using the following XPATH function:

bw:getSystemProperty()

The values of the following java system properties are accessible using this approach:
file.encoding
java.version
user.home
os.name

For example to access the Java property ‘java.version’ you have to use the following XPATH formula:
bw:getSystemProperty(“java.version”)

The values of the properties defined in an appnode tra file or config.ini file, can also be accessed using this function but for some properties it is only working in deployed mode.

For example to access the appnode Java property ‘logback.configurationFile’ you have to use the following XPATH formula:
bw:getSystemProperty(“logback.configurationFile”)

--

--

Emmanuel Marchiset

I work as an Architect at TIBCO Software on Integration products. Opinions here are my own.