[jboss-user] [jBPM] - Re: Jbpm 5 user form variables
Mauricio Salatino
do-not-reply at jboss.com
Wed Dec 1 07:53:09 EST 2010
Mauricio Salatino [http://community.jboss.org/people/salaboy21] created the discussion
"Re: Jbpm 5 user form variables"
To view the discussion, visit: http://community.jboss.org/message/573854#573854
--------------------------------------------------------------
Hi, the variables that you want to access inside the the Human task needs to be inserted in the content field
<dataInputAssociation>
<targetRef>_5_ContentInput</targetRef>
<assignment>
<from xs:type="tFormalExpression">#{doctor.id}, #{ambulance.id}, #{patient.id}, #{patient.name}, #{patient.age}, #{patient.gender}, #{emergency.location}, #{emergency.type}</from>
<to xs:type="tFormalExpression">_5_ContentInput</to>
</assignment>
</dataInputAssociation>
I have something like that in my process and then from your client side (Human Task Client UI):
client.start(taskSum.getId(), "control_operator", null);
BlockingGetTaskResponseHandler handlerT = new BlockingGetTaskResponseHandler();
client.getTask(taskSum.getId(), handlerT);
Task task2 = handlerT.getTask();
TaskData taskData = task2.getTaskData();
System.out.println("TaskData = "+taskData);
BlockingGetContentResponseHandler handlerC = new BlockingGetContentResponseHandler();
client.getContent(taskData.getDocumentContentId(), handlerC);
Content content = handlerC.getContent();
System.out.println("Content= "+content);
ByteArrayInputStream bais = new ByteArrayInputStream(content.getContent());
ObjectInputStream ois = new ObjectInputStream(bais);
String taskinfo =(String) ois.readObject();
System.out.println("TASKINFO = "+taskinfo);
//#{doctor.id}, #{ambulance.id}, #{patient.id}, #{patient.name}, #{patient.age}, #{patient.gender}, #{emergency.location}, #{emergency.type}
String[] values= taskinfo.split(",");
Assert.assertEquals(8 , values.length);
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573854#573854]
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/20101201/b10d3c22/attachment.html
More information about the jboss-user
mailing list