JBoss Community

How to properly use ContentMarshallerHelper for Human Task Output in JBPM5.3?

created by Thomas Setiabudi in jBPM - View the full discussion

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=[B@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

Start a new discussion in jBPM at Community