cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 5.16.3

raka
Champ in-the-making
Champ in-the-making
Hi,

I think I spot a bug in Activiti Engine (still present in the latest version to date, 5.16.3).

The javadoc says "resolveTask" can only be done for task whose delegation state is pending. Here the  excerpt:

"void resolveTask(String taskId)
Marks that the assignee is done with this task and that it can be send back to the owner. Can only be called when this task is DelegationState.PENDING delegation. After this method returns, the delegationState is set to DelegationState.RESOLVED."

But, when I tried this (using REST API) on a task whose delegationState is null, it returned, without error:

url: http://localhost:8080/activiti-rest/service/runtime/tasks/2509
body: {"action" : "resolve", "variables": [
   {"name": "varA", "value": "value_A", "scope": "local", "type": "string"}
]}


After successful completion of that REST call, I invoked this to check: http://localhost:8080/activiti-rest/service/runtime/tasks?processInstanceId=2505&includeProcessVaria...

And I could see the delegationStatus of the task is now set to "resolved" (plus, the "assignee" field is set to the same value as the owner. Originally it was null).

Based on the javadoc, I was expecting a different behaviour (I was expecting that the "resolve" action would fail).

Is it a bug?

Best regards,
Raka
2 REPLIES 2

raka
Champ in-the-making
Champ in-the-making
Sorry I forgot to put the correct title, and I couldn't find a way to edit the subject after the post.

trademak
Star Contributor
Star Contributor
Hi Raka,

Yes that's not correct. Right now it's not checked if the delegation state is actually pending.
We should do that. Could you raise a JIRA issue for this?

Thanks,