[jboss-user] [jBPM] - Pass parameters to user task from java class

Prageeth Jayasinghe do-not-reply at jboss.com
Sat May 7 13:19:49 EDT 2011


Prageeth Jayasinghe [http://community.jboss.org/people/pragiya] created the discussion

"Pass parameters to user task from java class"

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

--------------------------------------------------------------
Hi all;
      I am using 'Apache mina' library and I need to pass parameters(variables) to the user task. I am using JBPM 5.1.
I searched previous posts and found following code. In this code I am using a ContentData object. But I don't know what should I do in my bpmn file.
How do I map this ContentData object with the variables in bpmn file. Pls help.

      TaskClient client =
        new TaskClient(new MinaTaskClientConnector(taskOwner,
                                                   new MinaTaskClientHandler(
                                                     SystemEventListenerFactory.getSystemEventListener())));
      .......................
      .......................
      .......................
      .......................      
 
      ContentData cData = null;
      Map<String, Object> map = new HashMap<String, Object>();
      map.put("mobileNo", "123456");
      if (map != null) {
      ByteArrayOutputStream bos = new ByteArrayOutputStream();
      ObjectOutputStream out;
      out = new ObjectOutputStream(bos);
      out.writeObject(map);
      out.close();
      cData = new ContentData();
      cData.setContent(bos.toByteArray());
      cData.setAccessType(AccessType.Inline);
      client.complete(taskId, taskOwner, cData, responseHandler);
--------------------------------------------------------------

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

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/20110507/5eddc161/attachment.html 


More information about the jboss-user mailing list