Use the Expression Evaluator to Identify and Terminate Process Instances

It’s vaguely interesting that one of my lazier posts (http://garyjoy.postach.io/post/javascript-to-re-assign-a-task-in-ibm-bpm) is one of the most read, even two years after it was written.

I recently found myself solving a different problem in a similar way and figured that I should share this with the world as well.

A pet peeve of mine is the use of “All Users" in IBM BPM and the consequential untidiness that it’s use generates. I don’t want to see obscurely named tasks or meaningless (to me at least) exposed services when using the portal, even in the development environment.

The following javascript expressions can be used in the Process Inspector to identify (and terminate) the Process Application for a given Process Instance ID:

tw.system.findProcessInstanceByID(12345).processApp.acronym;
tw.system.findProcessInstanceByID(12345).abort();

If the expressions above saved you time in tracking down the sandbox that was leaking into your portal please consider forwarding a link to my blog to the owner of said sandbox. It’s win-win!

If you have any expressions that you frequently use please share them in the comments below...



comments powered by Disqus