3 Replies Latest reply on Sep 12, 2011 11:14 AM by antoniodb83

    Skip a UserTask with resultMapping

    antoniodb83

      Hi, I have a User Task with a variable in the result mapping.

      If I do:

       

      client.start(taskId, user, responseHandler);

      ContentData contentData = null;

      Map<String, Object> data=new HashMap<String, Object>();

      data.put("myVar", "something");

      ByteArrayOutputStream bos = new ByteArrayOutputStream();

      ObjectOutputStream out;

      try {

           out = new ObjectOutputStream(bos);

           out.writeObject(data);

           out.close();

           contentData = new ContentData();

           contentData.setContent(bos.toByteArray());

           contentData.setAccessType(AccessType.Inline);

      } catch (IOException e) {

           e.printStackTrace();

      }

      client.complete(taskId, user, contentData, responseHandler);

       

      it works but when I do:

       

      client.skip(taskId,user,responseHandler);

       

      it puts the task in a "Obsolete" status but the corresponding workItem remains in the database and when the process ends I get the error:

       

      User '[User:'Administrator']' was unable to execution operation 'Skip' on task id 5 due to no 'current status' matchines.

       

      How can I skip the task?

      Thanks.

      Antonio