Bug 1025389 - Start and complete commands of a task in one JMS request produces NPE
Start and complete commands of a task in one JMS request produces NPE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
medium Severity high
: ER5
: 6.0.0
Assigned To: Marco Rietveld
Ivo Bek
Depends On:
  Show dependency treegraph
Reported: 2013-10-31 11:11 EDT by Ivo Bek
Modified: 2016-09-20 01:05 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:09:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
stacktrace (80.26 KB, text/plain)
2013-10-31 11:11 EDT, Ivo Bek
no flags Details

  None (edit)
Description Ivo Bek 2013-10-31 11:11:14 EDT
Created attachment 817960 [details]

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 11:58:49 EDT
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 10:07:37 EDT
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 09:39:00 EST
Verified in BPMS 6.0.0.ER5

Note You need to log in before you can comment on or make changes to this bug.