AnsweredAssumed Answered

REST API Bugs/Changes 'kermit' hardcoded

Question asked by ruben1 on Aug 29, 2011
Latest reply on Aug 29, 2011 by trademak

a few days ago I updated to Activiti 5.7. The reimplemented REST API doesn't behave like the old one (I had Activiti 5.6 before the update).

I had the problem that claiming tasks wouldn't work. I checked and discovered that the "Perform Task Operation" (REST call 'PUT /task/{taskId}/[claim|complete]') should return with '{"success": true}' (if successful). In the current version however only an HTTP 200 without a body is returned. No problem, fixed my app (though you could update the docs to the lates changes in the API, maybe there are more responses which have changed). But where have all the claimed tasks gone (since the error was only client side)?
Every claimed task got somehow magically assigned to 'kermit', regardless that I was working with my own user. So I digged a little deeper and soon found the following code in the REST webapp:

public class TaskOperationResource extends SecuredResource {
  public void executeTaskOperation(Representation entity) {
      String currentUserId = "kermit";
      if ("claim".equals(operation)) {
        ActivitiUtil.getTaskService().claim(taskId, currentUserId);

After a few swearwords (and maybe a few more ;)) I decided to build my own REST API since it is clearly listed as <EXPERIMENTAL/> in the documentation and this was proof enough for me. Anyways, the integration in SPRING is very easy and the documentation did suffice and I got it set up and running in almost no time.

I just wanted to let you and other users know about this hardcoded 'kermit' in the REST API.