Created attachment 855125 [details] kjar containing process with human task Description of problem: the rest API call /task/{taskId}/content returns null content Version-Release number of selected component (if applicable): BPMS 6.0.0.CR1 How reproducible: Consistently Steps to Reproduce: 1. make sure the user has role 'Reviewer' 2. Log in into BPMS 3. Deploy the attached kjar (contains a very simple process with a human task) 4. In the BPMS UI, start an instance of the UserTask process - this will create a new task. Verify the taskId in the task tab. 5. In a command window, issue the following command: curl -HAccept:application/xml --user "<user>:<password>" "localhost:8080/business-central/rest/task/<taskId>/content" (Replace <user> and <password> with the actual username and password, and <taskId> with the actual task id) Actual results: nothing is returned from the call Expected results: task content in xml format Additional info: in org.kie.services.remote.rest.TaskResource, lines 272 - 280 JaxbContent content = null; if( contentId > -1 ) { cmd = new GetContentCommand(contentId); result = processRequestBean.doTaskOperationAndSerializeResult( cmd, "Unable get content " + contentId + " (from task " + taskId + ")"); content = (JaxbContent) content; } return createCorrectVariant(content, headers); line 278 should become content = (JaxbContent) result; instead of content = (JaxbContent) content;
Bernard, thanks very much for both the catch and fix!
Fixed. Commits: 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/96f4b40b master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/8e947118 (Integration) Tests added, as usual, to the kie-test repository: https://github.com/droolsjbpm/kie-tests/commit/122f5ddd https://github.com/droolsjbpm/kie-tests/commit/bc77b213 (I also added a constructor to the RemoteJmsRuntimeEngineFactory that makes it simpler to construct a JMS based RemoteJmsRuntimeEngine).
Verified on 6.0.1-ER1