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]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to