Since IBM Business Process Manager (BPM) V8.5.5, users can use the command BPMConfig -update to change the context root to a customized value for a deployment environment. The specified context root is used as a prefix to the default BPM context root. As part of this blog, I wanted to provide set of step-by-step instructions for changing the context root from its default value to new value. I will also mention a few points that you should pay attention to when you use the command.
About the default context root value
The default context root can start with or without a leading forward slash (/). For example, let's take a look at the default context root for Process Portal.
To view the WAS administrative console page, click Applications > Application Types > WebSphere enterprise applications > application_name (IBM_BPM_Portal_SingleCluster)> Context root for web modules.
You will see that the context root for Process Portal is 'ProcessPortal' without a leading forward slash (/).
The URL that you can use to access Process Portal is: http://localhost:9080/ProcessPortal/
However, if you modify the context root using the command line and change it back to default value using the syntax below:
BPMConfig -update -profile dmgr_profile -de DE_name -component ProcessPortal -contextRootPrefix /
BPMConfig -update -profile dmgr_profile -de DE_name -contextRootPrefix /
The reverted default context root for Process Portal is '/ProcessPortal' with a leading forward slash (/).
The URL that you use to access Process Portal is http://localhost:9080/ProcessPortal/
You should be able to access the default Process Portal URL when the context root has or does not have the forward slash - '/'. These two values are both our default context roots since the leading forward slash (/) is necessary during coding and does not affect the parsing.
How to make a change
You can follow the steps below to change the context root to a customized value for a deployment environment:
Back up the profile before running the command.
Stop dmgr, nodes, and all of the running servers.
Navigate to the <install_root>\bin directory.
Run the BPMConfig -update command as below:
-update [-profile PROFILE_NAME -de DE_name [-component COMPONENT_name] -contextRootPrefix prefix]
The -profile PROFILE_NAME value identifies the deployment manager profile.
The -de DE_name value identifies the deployment environment name.
The -component COMPONENT_name value identifies the component, and the only value (with respect to a custom context root) is ProcessPortal.
The -contextRootPrefix prefix value specifies the custom context root prefix that you want to use.
The prefix must begin with a leading forward slash (/). The specified prefix is added to the beginning of the default context root.
If you specify a leading forward slash (/) by itself, the -contextRootPrefix parameter will revert any customized context root back to the IBM BPM default context root. (/ProcessPortal).
Change the context root for all of the applications:
BPMConfig -update -profile mydeploymentmgrprofilename -de mydeploymentenvname -contextRootPrefix /myibmprocessportal
Change the context root ONLY for Process Portal:
BPMConfig -update -profile mydeploymentmgrprofilename -de mydeploymentenvname -component ProcessPortal -contextRootPrefix /myibmprocessportal
Re-download and install Process Designer since Process Designer must use the new context root configuration.
Update your client applications to use the new custom context root.
Update the web server plug-in. If the product applications are mapped to a web server, the plugin-cfg.xml file for the web server must be updated with the new context roots. Any web server plug-ins might need to be propagated.
Clear your browser cache before you start any of the IBM Business Process Manager user interfaces.
Restart the server and try to access the applications using new URLs.
Examples of new URLs for Process Portal:
http://localhost:9080/ProcessPortal/ OR https://localhost:9443/ProcessPortal/
Useful hints to keep in mind:
Important: If you update the value of -contextRootPrefix, you must change any hardcoded URLs in your existing applications. To successfully deploy applications, the Process Center must at least be at the V126.96.36.199 level.
If you have more than one deployment environment in your cell, you can either use context root prefixes to differentiate between the multiple deployment environments or you can use the BPMConfig -update -virtualHost command to configure another virtual host.
If you added a supported customization to your IBM BPM Standard deployment environment, such as a context root prefix or an update to the virtual host mapping, the same customization is automatically applied to the IBM BPM Advanced deployment environment during the upgrade.
Additional resources that you might find useful:
BPMConfig command-line utility in BPM 8.5.5: http://www.ibm.com/support/knowledgecenter/SSFPJS_8.5.5/com.ibm.wbpm.ref.doc/topics/rbpmconfig.html?lang=en
BPMConfig command-line utility in BPM 8.5.6: http://www.ibm.com/support/knowledgecenter/SSFPJS_8.5.6/com.ibm.wbpm.ref.doc/topics/rbpmconfig.html?lang=en
title image (modified) credit: (cc) Some rights reserved by freeimages.com