JBoss Community

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

created by Thomas Setiabudi in jBPM - View the full discussion

I found this lines of code in AsyncWSHumanTaskHandler.java

 

 

 public void execute(Content content) {
                Object result = ContentMarshallerHelper.unmarshall( content.getContent(), env);
                results.put("Result", result);
                if (result instanceof Map) {
                    @SuppressWarnings("rawtypes")
     Map<?, ?> map = (Map) result;
                    for (Map.Entry<?, ?> entry : map.entrySet()) {
                        if (entry.getKey() instanceof String) {
                            results.put((String) entry.getKey(), entry.getValue());
                        }
                    }
                }
                manager.completeWorkItem(task.getTaskData().getWorkItemId(), results);
        }
 

 

 

If this is the code in jbpm console that listens to the task complete event, it means it uses ContentMarshallerHelper too..

Reply to this message by going to Community

Start a new discussion in jBPM at Community