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
Fixed: 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/2b5a326bafdf2c566700a488fe4b37afe22f257a master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/60221be546f0d4b66ab81e5c6efc7d22e597f4a1
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.
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().
Verified in BPMS 6.0.0.ER5