Hosting Applications on External Web Servers

Custom client applications are functionally complete, standard J2EE web applications, packaged as WAR files. Although they are typically deployed to a Web Components BPM logical node, they can be deployed to other web servers.

You can deploy custom client applications to the following web servers:

  • Jetty
  • Apache Tomcat
  • IBM WebSphere
  • Red Hat JBoss Web Server or Wildfly

Use Application Development to export the application as a ZIP file, then deploy it to your chosen web server.

If you want to host a custom client application on an external web server, there are a number of issues you need to take account of.

SSO

When an application is hosted outside of ActiveMatrix BPM, it has no inherent SSO capabilities. You must implement your own SSO mechanisms. As long as these conform to the SSO capabilities provided by ActiveMatrix BPM, the application will be able to participate in SSO.

Cross-Domain Calls

If an application hosted on an external server is in a different domain relative to the ActiveMatrix BPM services API, any service invocation from the custom client will encounter Same Origin Policy (SOP) violations. To overcome this issue, you must provide a suitable proxy that can be used to proxy the service calls to ActiveMatrix BPM.

In addition to the usual proxy settings required, for example, configuring proxy modules, you must amend the httpd.conf file. The following steps describe how to configure a proxy for Apache HTTP Server Version 2.4.
Note: Similar settings are required when using other load balancers. Refer to the documentation for your specific load balancer for more information.
  1. Install Apache HTTP Server Version 2.4 with the modules required for proxy servlets. See the documentation provided with Apache HTTP Server Version 2.4.
  2. Add suitable rules to the httpd.conf file - for example:
    <Location /apps/>
    ProxyPass http://<bpmserver>:<port>/apps/ nocanon
    </Location>
    ProxyPass "/bpm/" "http://<bpmserver>:<port>/bpm/"
    ProxyPass "/bpmresources/" "http://<bpmserver>:<port>/bpmresources/"
    ProxyPassreverse / http://<bpmserver>:<port>/
    AllowEncodedSlashes NoDecode
    The REST URL that ActiveMatrix BPM uses for translations contains encoded characters in the URL. Therefore, you must use:
    • the nocanon argument for the ProxyPass directive used for /apps/ path.
    • the AllowEncodedSlashes directive.

      See the documentation provided with Apache HTTP Server Version 4.2 for more information.

    Note: Sub-domain mapping from the proxy to ActiveMatrix BPM is not supported. For example, this mapping is valid:
    ProxyPass "/bpm/" "http://<bpmserver>:<port>/bpm/"

    This mapping is not valid:

    ProxyPass "<mydomain>/bpm/" "http://<bpmserver>:<port>/bpm/"
  3. Export your custom client application from ActiveMatrix BPM Application Development. See the TIBCO ActiveMatrix® BPM Client Application Management Guide.
  4. Extract your application from <apache_config>\htdocs\appName.app where apache_config is the Apached HTTP Server configuration directory. See the documentation provided with Apache HTTP Server Version 4.2 for more information.
  5. Launch the URL for your custom client application.

Using a Load Balancer

If you want to use a load balancer, add appropriate entries to the httpd.conf file - for example:

<Location /apps/>
	ProxyPass http://<bpmserver1>:<port>/apps/ nocanon
	ProxyPass http://<bpmserver2>:<port>/apps/ nocanon
	</Location>

	ProxyPass "/bpm/" "http://<bpmserver1>:<port>/bpm/"
	ProxyPass "/bpmresources/" "http://<bpmserver1>:<port>/bpmresources/"
	ProxyPassreverse / http://<bpmserver1>:<port>/

	ProxyPass "/bpm/" "http://<bpmserver2>:<port>/bpm/"
	ProxyPass "/bpmresources/" "http://<bpmserver2>:<port>:8080/bpmresources/"
	ProxyPassreverse / http://<bpmserver2>:<port>/
	
 ProxyPass "/apps/" "http://<bpmserver1>:<port>/apps"

	ProxyPreserveHost On
	AllowEncodedSlashes NoDecode

where bpmserver1 and bpmserver2 are the IP addresses of the servers running AMX BPM.

Note: If you are using Apache 2.2, set ProxyPreserveHost to On which makes it preserve the host header when passing through the proxy. If the header is not set, it causes issues when accessing applications. See http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost.

Localization

If you have localized your application, the localized resource bundles must be deployed as a separate application and then you must register your application with the translation service. See "Localizing Applications" in TIBCO ActiveMatrix® BPM Client Application Management Guide.

Then, register your new application:
BPMTranslationServiceConfig.registerApp("applicationname", "MyPrefix")", null);
where
  • applicationname is the name of the application that contains the resource bundles.
  • MyPrefix is the application prefix that you want to use in the templates.
For example, if you have registered an application with the name MyPrefix, and you have a MyComponentMessages.properties file in the l10n folder of the application that contains the resource bundles with myKey, then you can refer to this key in your custom client application's angular templates as MyPrefix.MyComponent.myKey. For example,
<div translate="MyPrefix.MyComponent.myKey"></div>
Note: Applications hosted externally cannot register with the translation service running on the BPM node.

Configuration Changes

Any configuration changes required can be done by manually editing the application's configuration files.