Red Hat Bugzilla – Bug 1266092
Process instances with "actions" (script tasks, service tasks, rule tasks) can throw an NPE due to a race condition involving the data services
Last modified: 2016-09-20 01:13:17 EDT
Created attachment 1076537 [details]
Log from smoke tests showing the NPE caused when the script task is executed in a process
Description of problem:
The "data services" in BPMS/kie-wb, which are located in the jbpm-kie-services module, piggy-back on the code used to actually used to build the process instance.
However, there seems to be a race condition in which the data services/jbpm-kie-services builder code (instead of the normal/jbpm-bpmn2 builder code) is used to build a process instance.
When that happens, the process instance is not completely built because the data services builder logic only collects information, but does not build the process instance.
This results in, among other things, an NullPointerException when a script task is executed, because the script task "Action" has not been completely built.
Version-Release number of selected component (if applicable):
As of community 6.3.x.
This is not always reproducible because the problem is caused by a race condition [https://en.wikipedia.org/wiki/Race_condition].
Steps to Reproduce:
1. Repeatedly start a process containing a script task in BPMS/kie-wb.
The race condition seems to be most likely to happen immediately after a deployment is deployed.
An NPE is thrown (see attached log from our smoke tests).
The process completes without error.
This race condition was exposed by our smoke tests.
This is a huge test blocker. I do not know why it was not discovered by our smoke tests. But because of this bug exactly 1/3 of integration tests fail.
Verified on BPMS 6.2.0 ER4