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. The following steps describe how to configure a proxy for Apache HTTP Server Version 2.4.
  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 the following to the httpd.conf file:
    <Location /apps/>
    ProxyPass http://10.100.87.51:8080/apps/ nocanon
    </Location>
    ProxyPass "/bpm/" "http://10.100.87.51:8080/bpm/"
    ProxyPass "/bpmresources/" "http://10.100.87.51:8080/bpmresources/"
    ProxyPassreverse / http://10.100.87.51:8080/
    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 directiveused for /apps/ path.
    • the AllowEncodedSlashes directive.

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

  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 use a load balancer, add the following to the httpd.conf file:

   <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>/
	
	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. 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>

Configuration Changes

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