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)
. Create a Module Property with the type of the connection to be managed (for example ‘HTTP Connector’) and select a default connection
. In the activities or bindings that need to use one of these connections at runtime configure the target connection using the created 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’
. 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.
. Select the SSL Client Configuration to use when SSL is enabled, you can re-use an existing Configuration or create a new one
. 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
Management of HTTP connections in BusinessWorks 6.8 / BusinessWorks Container Edition 2.7
Details are available in the following article:
How to switch between HTTP and HTTPS using a property in BusinessWorks and BusinessWorks Container Edition
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