[jboss-user] [jBPM] - Re: User Task Assignment and Assignment Restrictions

jemmerling do-not-reply at jboss.com
Fri Jan 13 08:46:14 EST 2012


jemmerling [https://community.jboss.org/people/jemmerling] created the discussion

"Re: User Task Assignment and Assignment Restrictions"

To view the discussion, visit: https://community.jboss.org/message/646693#646693

--------------------------------------------------------------
Here is a code snippet from the Human Task Example in jbpm-examples that accesses content via the API. Is this what you have in mind?



BlockingGetTaskResponseHandler getTaskResponseHandler = new BlockingGetTaskResponseHandler();
  taskClient.getTask(task4.getId(), getTaskResponseHandler);
  Task task = getTaskResponseHandler.getTask();
  BlockingGetContentResponseHandler getContentResponseHandler = new BlockingGetContentResponseHandler();
  taskClient.getContent(task.getTaskData().getDocumentContentId(), getContentResponseHandler);
  Content content = getContentResponseHandler.getContent();
  ByteArrayInputStream bis = new ByteArrayInputStream(content.getContent());
  ObjectInputStream in;
  try {
    in = new ObjectInputStream(bis);
    Object result = in.readObject();
    in.close();
    Map<?, ?> map = (Map<?, ?>) result;
    for (Map.Entry<?, ?> entry: map.entrySet()) {
    System.out.println(entry.getKey() + " = " + entry.getValue());
    }
  } catch (IOException e) {
    e.printStackTrace();
  } catch (ClassNotFoundException e) {
    e.printStackTrace();
  }
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/646693#646693]

Start a new discussion in jBPM at Community
[https://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/20120113/c2066431/attachment-0001.html 


More information about the jboss-user mailing list