IBM Support

Customizing the Dojo Toolkit to improve Process Portal application load time for IBM Business Process Manager (BPM)

Troubleshooting


Problem

The number of browser requests Process Portal makes to the server during its initial load is not optimized for efficiency and performance.

Symptom

After you log into the Process Portal, it might load slowly.

Diagnosing The Problem

You can use a tool, such as Mozilla Firebug, to capture HTTP trace when you log into into Process Portal for the first time. Review the trace files to see if multiple URLs for Dojo resources are being requested. For example, a Dojo URL: .../portal/js/dojo/1.6.1/dijit/themes/soria/layout/AccordionContainer.css.

If there are many calls to the server for these Dojo resources, then you might be able to reduce the number of calls by incorporating a compressed Dojo Layer.

Resolving The Problem

In Business Process Manager Version 7.5.x,, Process Portal leverages the Dojo Toolkit and can be customized with a compressed layer to allow for more efficient loading in distributed environments. Complete the following steps to build a compressed a Dojo layer, which drastically reduces the overall number of browser requests performed on the initial Process Portal application load:

  1. Back up the existing <WAS_HOME>\BPM\Lombardi\process-server\applications\Portal.ear file. The customization scripts modify this enterprise application archive (EAR) file in place, so it is important to back up this file from its original location.

  2. Clean out the <WAS_HOME>\BPM\Lombardi\tools\portal-app directory so that only the redeployPortal.bat script remains.

  3. Run the redeployPortal.bat script without any parameters to extract the contents of the Portal.ear file for editing.

  4. Download and extract the http://download.dojotoolkit.org/release-1.6.1/dojo-release-1.6.1-src.zip file.

  5. Copy the portal751.dojo161.base.profile.js file into the dojo-release-1.6.1-src\util\buildscripts\profiles directory. The contents of the portal751.dojo161.base.profile.js file exists at the end of these steps. If you previously customized the Portal.ear file and those customizations required additional dojo.require statements, you might want to include those customizations as additional items in the build profile later in these steps. You can view these package loading requests using the Java™Script console in the browser, such as the Mozilla Firefox Firebug add-on or the Microsoft Internet Explorer Developer Tools, when the page is loading.

  6. Copy the Portal.ear\portal.war\js\dojo\1.6.1\dojo\_base\html.js file to the extracted dojo-release-1.6.1-src\dojo\_base directory, which overwrites the version of the html.js file that is in the Dojo source. The file is overwritten due to a bug, which affects Internet Explorer 9, in the Dojo source version that was corrected in the shipped IBM version of Dojo. All of the other files are exactly the same between the two versions.

  7. Run the following command from the dojo-release-1.6.1-src\util\buildscripts directory:
    build.bat action=release
    profileFile=profiles\portal751.dojo161.base.profile.js
    version=7.5.1.custom copyTests=false optimize=shrinksafe
    cssOptimize=comments


    This command uses the Dojo profile you saved into the profiles directory, gathers all of the used JavaScript packages into one file, removes unnecessary HTML (using copyTests= false), removes comments from the JavaScript code, and inlines all of the necessary CSS files for the Dijit package themes.

  8. Replace the corresponding files or folders in the Portal.ear\portal.war\js\dojo\1.6.1 directory with the generated dojo-release-1.6.1-src\release\dojo files and directories in the following list:
    • dojo/dojo.js
    • dojo/dojo.js.uncompressed.js
    • dojo/nls
    • dijit/themes

      Note: It is a best practice to keep an original version of these files from the Portal.ear (or the original Portal.ear in its entirety) as a backup for development, test, and debug purposes.

  9. Rerun the redeployPortal.bat script with the correct deployment target parameters that are necessary. This process deploys the application to running servers so the node and server or cluster information might be necessary. See the Customizing the look and feel of IBM Process Portal topic in the information center for specific documentation on the required parameters.

  10. Clear any browser caches and log into the Process Portal.

Note: Dojo implementation changed in BPM 8.0. This process is only valid for BPM 7.5 releases.

Contents of portal751.dojo161.base.profile.js:

dependencies = {
    layers: [
        {
            // This is a specially named layer, literally 'dojo.js'
            // adding dependencies to this layer will include the modules
            // in addition to the standard dojo.js base APIs.
            name: "dojo.js",
            dependencies: [
                "dojo.data.util.simpleFetch",
                "dojo.data.util.sorter",
                "dojo.data.util.filter",
                "dojo.number",
                "dijit._base",
                "dijit._base.focus",
                "dijit._base.manager",
                "dijit._base.place",
                "dijit._base.popup",
                "dijit._base.window",
                "dijit._base.scroll",
                "dijit._base.sniff",
                "dijit._base.typematic",
                "dijit._base.wai",
                "dijit._Calendar",
                "dijit._Container",
                "dijit._CssStateMixin",
                "dijit._HasDropDown",
                "dijit._Templated",
                "dijit._Widget",
                "dijit._WidgetBase",
                "dijit.Calendar",
                "dijit.Dialog",
                "dijit.form._DateTimeTextBox",
                "dijit.form._FormWidget",
                "dijit.form.Button",
                "dijit.form.ComboBox",
                "dijit.form.DateTextBox",
                "dijit.form.DropDownButton",
                "dijit.form.nls.validate",
                "dijit.form.TextBox",
                "dijit.form.TimeTextBox",
                "dijit.form.ValidationTextBox",
                "dijit.TimePicker",
                "dijit.Tooltip",
                "dojox.data.XmlStore",
                "dojox.xml.parser"
            ]
        }
    ],
    prefixes: [
        [ "dijit", "../dijit" ],
        [ "dojox", "../dojox" ]
    ]
}

[{"Product":{"code":"SSFTN5","label":"IBM Business Process Manager Advanced"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Process Portal","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"7.5.1;7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSFTBX","label":"IBM Business Process Manager Express"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"","label":"Linux zSeries"},{"code":"PF033","label":"Windows"}],"Version":"7.5.1;7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSFTDH","label":"IBM Business Process Manager Standard"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"","label":"Linux zSeries"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.5.1;7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

BPM

Document Information

Modified date:
15 June 2018

UID

swg21619139