AnsweredAssumed Answered

Activiti 5.16.3

Question asked by raka on Oct 7, 2014
Latest reply on Oct 10, 2014 by trademak

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&includeProcessVariables=true

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,