Red Hat Bugzilla – Bug 1022410
Unable to complete a task with JBPM remote API via JMS due to a no 'current status' match
Last modified: 2016-09-20 01:05:11 EDT
Created attachment 815274 [details]
the process with single human task
Description of problem:
I have a simple process with single human task. To perform all operations I use Jbpm remote API via JMS. BPMS runs on W2k12, Oracle JDK 1.7, and Postgresql 9.2.
When there is a request to complete a task, client will fail with org.kie.services.client.api.command.RemoteRuntimeException: PermissionDeniedException thrown with message 'User '[UserImpl:'admin']' was unable to execution operation 'Complete' on task id 2 due to a no 'current status' match'
The server log contains:
00:58:08,903 WARN [org.kie.services.remote.jms.RequestMessageBean] (Thread-3 (HornetQ-client-global-threads-23724632)) User '[UserImpl:'admin']' was unable to execution operation 'Complete' on task id 2 due to a no 'current status' match
Unfortunately there is nothing more interesting.
These are the commands I perform http://pastebin.com/7c0yt7bp
And I am going to attach the BPMN process definition and full server log.
It's important to use the JMS client because via REST client the task complete operation works.
Steps to Reproduce:
1. Install and configure BPMS 6.0.0.ER4 with EAP 6.1.0 to run on W2k12, Oracle JDK 1.7, and Postgresql 9.2
2. Create the process definition with single human task in BPMN designer or put the attached BPMN into your existing project.
3. Start and perform task operations remotely with Jbpm remote API via JMS.
Created attachment 815275 [details]
the server log
The same issue appears on rhel6-x86_64, Oracle JDK 1.6, and MySQL 5.5.
To sum it up, these configurations produce the issue:
1) W2k12, Oracle JDK 1.7, and Postgresql 9.2
2) RHEL6 x86_64, Oracle JDK 1.7, and MSSQL2008R2
3) RHEL6 x86_64, Oracle JDK 1.7, and MySQL 5.5
4) RHEL6 x86_64, Oracle JDK 1.7, and Oracle11gR2
I've reassigned the issue to Marco, because he is dealing with the remote interfaces. But please make sure that you don't use the admin user to interact with tasks. If you can reproduce the issue with another user then we can look into this issue to fix it.
Also make sure that the task is started before you are trying to complete it, because if not you will end up with an error like the one that you are pasting here.
The exception means the given user was not allowed to complete the task in its current status. Most likely, this is because the task hasn't been started yet, as Mauricio suggested. Ivo, could you please verify that the task was actually started before you try to complete it?
I've changed user and the steps to also check the task status and you right that the task wasn't started. java.lang.AssertionError: expected:<InProgress> but was:<Reserved>
But there are no exceptions during the start operation as you can see in the server log.
Marco, seems there's an issue when trying to start a task through JMS, could you take a look?
This was fixed by the commits made for 1025389:
Verified in BPMS 6.0.0.ER5