Bug 1025389

Summary: Start and complete commands of a task in one JMS request produces NPE
Product: [Retired] JBoss BPMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0.0CC: kverlaen, smcgowan
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:09:04 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:
Attachments:
Description Flags
stacktrace none

Description Ivo Bek 2013-10-31 15:11:14 UTC
Created attachment 817960 [details]
stacktrace

Description of problem:

When you send a JMS request containing two commands to start and complete a task, the NPE is thrown on the server side and the task is not completed.

This is the way how to create a single JMS request containing start and complete task commands:
cmd = new StartTaskCommand(taskId, SALA_USER);
req = new JaxbCommandsRequest(deploymentId, cmd);
req.getCommands().add(new CompleteTaskCommand(taskId, SALA_USER, null));
response = sendJmsJaxbCommandsRequest(TASK_QUEUE_NAME, req, user, password);

The whole reproducer is here https://github.com/droolsjbpm/kie-tests/blob/6.0.x/kie-wb-tests/kie-wb-tests-base/src/main/java/org/kie/tests/wb/base/methods/JmsIntegrationTestMethods.java#L110

Comment 2 Marco Rietveld 2013-10-31 15:58:49 UTC
One important fact about human-task that came to light when researching this issue is that multiple human-task commands can not be execute within the same request scope. This means that clients will have to hack around using human-task in an EE environment when they do more than one human-task operation in a EJB or MDB.

Comment 3 Marco Rietveld 2013-11-01 14:07:37 UTC
The above issue is thus *NOT* an issue for the JMS or REST api, because we repeatedly inject a new em for every command and call em.joinTransaction().

Comment 4 Ivo Bek 2013-12-05 14:39:00 UTC
Verified in BPMS 6.0.0.ER5