WebPD opened editors limit modification

IDE environment in IBM BPM migrated from Eclipse-based app to WebPD, a web-based process editor. WebPD built on top of IBM BPM Coach Framework, based on dojo toolkit, hosting complex visual editors suffers from performance and stability issues. It can simply reload itself mid your work (because of some internal broken assertion), editor can stuck and manual reload is needed etc. The more artifacts opened the less stable it is. To limit resource consumption and countermeasure poor experience IBM introduced limit of 10 simultaneously opened artifacts. Fine. Unless you run BPM debug session that opens dozen of nested artifacts and fails badly. Then either you stay out of luck or you hack it this way.

Client-side hack

Browsing thru IBM BPM 8.6 documentation got me nowhere, nothing about editors limit configuration. These was the moment I admired web technology, the way it allows everyone to open sources, to see and mess up on its own simply using dev tools available in every modern browser.

webpd-limit-1   webpd-limit-2

When the warning message popped up, I decided to find a place where this check is performed and neutralize it. I searched thru WebPD runtime source definitions to find where the title of warning resides. There was set of textual resources defined, title amongst them. I run search again using resource variable name this time just to get to hasReachedEditorLimit method that name was speaking for itself. Tuning parameter _openEditorLimit was quickly narrowed in shellStateModel (SSM) module.

webpd-limit-3   webpd-limit-4

On first sight it looked like hardcoded limit of 10 artifacts. I found however that initialize method of SSM module takes configuration that overrides many defaults, limit included, and that constructor of ShellManager (SM) module uses that initialization procedure.

webpd-limit-6

At that point I could disable limit in browser console overriding variable value in module that AMD guarantees to be singleton (hence change is picked up by WebPD itself). Since this change is runtime only, to make it permanent one can make a script of Greasemonkey/Tampermonkey browser extensions, and have problem solved forever:

require(['com.ibm.bpm.web.core/model/shellStateModel'], function(ssm){
    ssm._openEditorLimit = Math.MAX_SAFE_INTEGER;
});

Server-side configuration

Since my hack was just temporary solution IBM was asked to deliver more global and transparent solution to customer. It turned out there is unpublished setting to reconfigure default 10 opened artifacts limit:

Go to 100Custom.xml and add <open-editor-limit>20</open-editor-limit> entry, changing 20 to value you want. Make sure this property is no defined in higher priority 00Static.xml config file. New defaults will be picked up and served to all clients after Process Center node restart.

Note that IBM warns that more editors may lead to OutOfMemory probmes. So far I have not seen them. You have been warned however and you apply global server-side setting on your own.

This entry was posted in Software and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.