[jboss-user] [jBPM] - Skip a UserTask with resultMapping

Antonio De Berardis do-not-reply at jboss.com
Fri Sep 9 10:55:27 EDT 2011


Antonio De Berardis [http://community.jboss.org/people/antoniodb83] created the discussion

"Skip a UserTask with resultMapping"

To view the discussion, visit: http://community.jboss.org/message/625777#625777

--------------------------------------------------------------
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
[http://community.jboss.org/message/625777#625777]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110909/5ce1ea09/attachment.html 


More information about the jboss-user mailing list