Thomas Setiabudi
2012-11-30 02:22:08 UTC
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"How to properly use ContentMarshallerHelper for Human Task Output in JBPM5.3?"
To view the discussion, visit: https://community.jboss.org/message/779236#779236
--------------------------------------------------------------
Hi,
I have one output on my human task, the output is of type String, and I map this output to one of the process variable.
The problem is, the mapped value becomes:
MarshalledContentWrapper{content=[***@342371e7, marshaller=org.drools.marshalling.impl.SerializablePlaceholderResolverStrategy, type=class java.lang.String}
how to make it resolve correctly to the String value?
here is my code
1. Map<String, Object> taskOutput = new HashMap<String, String>(1);
2. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â taskOutput.put("EvaluationResult",
3. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "good");
4.
5. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ContentData contentData = new ContentData();
6. contentData = ContentMarshallerHelper.marshal(taskOutput,
7. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â new ContentMarshallerContext(), null);
8.
9. taskClientHelper.completeTask(taskId.longValue(),
10. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â userId, contentData);
Any help is appreciated.
Best Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779236#779236]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
"How to properly use ContentMarshallerHelper for Human Task Output in JBPM5.3?"
To view the discussion, visit: https://community.jboss.org/message/779236#779236
--------------------------------------------------------------
Hi,
I have one output on my human task, the output is of type String, and I map this output to one of the process variable.
The problem is, the mapped value becomes:
MarshalledContentWrapper{content=[***@342371e7, marshaller=org.drools.marshalling.impl.SerializablePlaceholderResolverStrategy, type=class java.lang.String}
how to make it resolve correctly to the String value?
here is my code
1. Map<String, Object> taskOutput = new HashMap<String, String>(1);
2. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â taskOutput.put("EvaluationResult",
3. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "good");
4.
5. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ContentData contentData = new ContentData();
6. contentData = ContentMarshallerHelper.marshal(taskOutput,
7. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â new ContentMarshallerContext(), null);
8.
9. taskClientHelper.completeTask(taskId.longValue(),
10. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â userId, contentData);
Any help is appreciated.
Best Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779236#779236]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]