JBoss Community

Skip a UserTask with resultMapping

created by Antonio De Berardis in jBPM - View the full discussion

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

If I do:

 

client.start(taskId, user, responseHandler);

                    ContentData contentData = null;

  if (action != 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

Reply to this message by going to Community

Start a new discussion in jBPM at Community