Bug 1266092

Summary: Process instances with "actions" (script tasks, service tasks, rule tasks) can throw an NPE due to a race condition involving the data services
Product: [Retired] JBoss BPMS Platform 6 Reporter: Marco Rietveld <mrietvel>
Component: Business CentralAssignee: Shelly McGowan <smcgowan>
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2.0CC: kverlaen, smcgowan
Target Milestone: ER4Keywords: TestBlocker
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:42:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log from smoke tests showing the NPE caused when the script task is executed in a process none

Description Marco Rietveld 2015-09-24 12:55:38 UTC
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. 


How reproducible:

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. 

Actual results:

An NPE is thrown (see attached log from our smoke tests). 

Expected results:

The process completes without error.

Comment 1 Marco Rietveld 2015-09-25 13:12:19 UTC
This race condition was exposed by our smoke tests.

Comment 2 Marco Rietveld 2015-09-29 12:17:26 UTC
Fixed. Commits: 

6.3.x: 
https://github.com/droolsjbpm/jbpm/commit/23502fbf

master: 
https://github.com/droolsjbpm/jbpm/commit/d8042c19

Comment 3 Tomas Livora 2015-09-29 15:34:48 UTC
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.

Comment 4 Tomas Livora 2015-10-15 09:05:44 UTC
Verified on BPMS 6.2.0 ER4