Bug 1025389 - Start and complete commands of a task in one JMS request produces NPE
Summary: Start and complete commands of a task in one JMS request produces NPE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ER5
: 6.0.0
Assignee: Marco Rietveld
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-31 15:11 UTC by Ivo Bek
Modified: 2016-09-20 05:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:09:04 UTC
Type: Bug
Embargoed:


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

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


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