In BusinessWorks 5.X it is common to set the value of a shared resource configuration option (for example an URL) with a concatenation of Global Variables and fixed string.
For example a JMS URL can be defined with the following : tcp://%%JMS/Server%%:%%JMS/Port%%
Unfortunately this convenient feature was not available in early BusinessWorks 6.X releases.
Starting from BusinessWorks 6.6.0 and BusinessWorks Container Edition 2.5.0 it is possible to create properties that are defined as the concatenation of other properties and use such properties in Mappings or to configure shared resources.
This is done simply in the Module Properties panel by concatenating string elements and property names enclosed with %%, for example:
Property1=Hello
Property2= Emmanuel
Property3 = %%Property1%% %%Property2%% How are you ?
(note that there is a space character between %%Property1%% and %%Property2%%)
The value of Property3 will be : Hello Emmanuel How are you ?
Note that when properties are in folders and sub folders you have to use the ‘/’ separator, for example:
Property3 = %%/Folder1/Property1%%%%/Folder2/Folder3/Property2%%
See below some examples:
As you can see above for the ‘Selector’ property, system properties, like BW.HOST.NAME, can also be used in concatenation, but note that this is available only starting from BusinessWorks 6.8.1 and BusinessWorks Container Edition 2.7.2.
Reference elements
Please refer to BusinessWorks 6.7 Release Notes -> New Features document and section:
“Ability to create complex value by combining two module properties”
Additional elements
You can refer to the attached project.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now