How to select a connection configuration at runtime in BusinessWorks 6.X and BusinessWorks Container Edition

Emmanuel Marchiset
3 min readMay 16, 2021

It is quiet common to have to use different connection configurations in runtime environments, like for example to use a simple HTTP connection configuration in the ‘TEST’ environment and an HTTPS connection configuration with additional parameters, like the keystore file path and password, in the ‘PROD’ environment.

An interesting feature of BusinessWorks 6.X is that this is possible to have multiple connection shared resources in an application and to define which one is used at runtime by using a property.

The solution described below works for any kind of transport but note that for HTTP connections a new feature introduced in BusinessWorks 6.8 makes things more simple. Details are available at the end of this article.

This can be done by using the following approach :

. Define multiple connection shared resources as needed (for example one for HTTP and one for HTTPS)

Multiple HTTP Connection Shared resources

. Create a Module Property with the type of the connection to be managed (for example ‘HTTP Connector’) and select a default connection

Definition of a Module Property of type HTTP Connector

. In the activities or bindings that need to use one of these connections at runtime configure the target connection using the created Module Property

Example of a Binding where the HTTP connection is defined using the defined Module Property

. In the target runtime environment set the name of the connection to use in the profile of the application or using the TEA (the names of the available connections have to be provided by the development team).

For HTTP client configuration it is possible to use the approach below that is more simple:

. Create a Boolean property and set it to the default value ‘true’

Create a boolean property with the default value ‘true’

. In the Security section of the HTTP Client resource, configure the ‘Confidentiality’ field to have its value defined by the property defined in previous step. Note that because the default value has been set to true the ‘SSL Client Configuration’ panel appears.

Configure the ‘Confidentiality’ field to have its value defined by the property

. Select the SSL Client Configuration to use when SSL is enabled, you can re-use an existing Configuration or create a new one

Select the SSL Client Configuration to use when the property is enabled

. If SSL is not used in the development environment, you will need to change the value of the property controlling the SSL activation to false before testing your application

Set the default value of the property to ‘false’

Management of HTTP connections in BusinessWorks 6.8 / BusinessWorks Container Edition 2.7

Details are available in the following article

--

--

Emmanuel Marchiset

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