Skip to content

TIBCO BusinessWorks™ 5.x: how to use the generator tool in a nutshell

This blog guides you in a couple of steps on how to use the BusinessWorks code generator, which I wrote about in my previous blog (where you can also download the tool itself). The objective is to explain how to create a TIBCO BusinessWorks component that hosts façade services. The TIBCO BW component also uses a design time library.

Step 1

Create the template folder structure starting from the skeleton provided. Be aware that the tool replaces all the placeholders used in the configuration as well as the properties files and that are grouped within.

Figure 1 Template folder structure with placeholders

NOTE: the template contains some BusinessWorks processes with placeholders in them. So any change to the placeholders’ name has to be reflected also to the template, in order to let the tool to work properly. Also the name of the fixed folder name “Generated” can be changed, but the paths that refer to it have to be adjusted accordingly.

Step 2

Adjust the configuration file and the properties files as required. There is a possibility to add properties to the configuration file that are applicable at the component level (e.g. CompanyName or DtlVersion) and some other at the façade service level (e.g. ServiceName and HTTP port). It’s also possible to add other properties in the configuration file and reference them through the placeholder grouped between “double” curly brackets.

Figure 2 Customization of the configuration file

NOTE: if changes are applied to the operations’ names also the schema files that refer to them are affected. In this sample the operations are not changed and neither are their default location.

Step 3

Run the generator tool, either by double clicking on the executable jar file or launching it through the command line with the java command and the –jar option.


Figure 3 Running the generator tool
NOTE: a log file is created as soon as the tool starts. The location of the configuration file is recognized automatically if it’s in the same location of the jar file. In case the “Output dir” folder is opened in a windows explorer or in a command-line window, the tool might fail, because the folder is set as read only and the first thing that the tool does it to delete its contents.

Step 4

Open the generated project with TIBCO Designer and the first pop-up window indicates that there is a warning. This is due to a palette’s version mismatch. It’s enough to accept the changes to make the projects compatible.

Figure 4 Palette’s versions mismatch

Then it’s required to manually add the file alias to the physical location where the design time library is saved.

Figure 5 Add the reference to the file alias

Show the libraries within the project, refresh it and validate. The project is valid and ready to be extended or customized.

Figure 6 TIBCO BusinessWorks project generated and valid

Step 5

It might happen that the template that you are using is based on a different version of TIBCO BusinessWorks palettes, in comparison to the version of TIBCO BusinessWorks that you have installed. In this step we will show how it’s possible to customize the tool adding a new property.

Step 5.1

Open the “.folder” file in the “Component” template and replace the palette’s version “5.12.0” with the placeholder {{DesignerPaletteVersion}}.

Figure 7 New property to set the TIBCO Designer palette’s version

Step 5.2

Add the new property to the configuration file, setting the expected value (in this sample it’s 5.11.0 since this is the palette version on my machine).

Figure 8 Configuration of the new property

Step 5.3

Run again the TmnsBWCodeGeneration and in a couple of seconds the new project has been generated. Open the project with TIBCO Designer and you don’t get the pop-up window anymore (Figure 4) about the palette conversion warning.

Devoteam: the #1 partner when it comes to Tibco BusinessWorks

Due to our background in Integration and DevOps, we are the #1 partner for well-known Dutch organizations when it comes to Tibco BusinessWorks. Curious to learn more? Read all of our success stories, use cases, and technical blog-posts.