Bug 1022410 - Unable to complete a task with JBPM remote API via JMS due to a no 'current status' match
Summary: Unable to complete a task with JBPM remote API via JMS due to a no 'current s...
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
medium
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-23 08:47 UTC by Ivo Bek
Modified: 2016-09-20 05:05 UTC (History)
4 users (show)

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


Attachments (Terms of Use)
the process with single human task (7.90 KB, application/xml)
2013-10-23 08:47 UTC, Ivo Bek
no flags Details
the server log (249.19 KB, text/x-log)
2013-10-23 08:48 UTC, Ivo Bek
no flags Details

Description Ivo Bek 2013-10-23 08:47:44 UTC
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'
	at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeJmsCommand(AbstractRemoteCommandObject.java:184)
	at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:77)
	at org.jbpm.services.task.impl.command.CommandBasedTaskService.complete(CommandBasedTaskService.java:61)

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.

How reproducible:


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.

Actual results:


Expected results:


Additional info:

Comment 1 Ivo Bek 2013-10-23 08:48:54 UTC
Created attachment 815275 [details]
the server log

Comment 2 Ivo Bek 2013-10-23 09:32:14 UTC
The same issue appears on rhel6-x86_64, Oracle JDK 1.6, and MySQL 5.5.

Comment 3 Ivo Bek 2013-10-23 11:05:16 UTC
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

Comment 4 Mauricio Salatino 2013-10-23 11:35:37 UTC
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.

Comment 5 Mauricio Salatino 2013-10-23 11:36:24 UTC
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.

Comment 6 Kris Verlaenen 2013-10-23 13:07:23 UTC
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?

Comment 7 Ivo Bek 2013-10-23 13:44:24 UTC
Mauricio,

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.

Comment 8 Kris Verlaenen 2013-10-23 14:19:06 UTC
Marco, seems there's an issue when trying to start a task through JMS, could you take a look?

Comment 10 Ivo Bek 2013-12-04 08:36:04 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.