TC ONG [https://community.jboss.org/people/devilkazuya99] created the discussion
"java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper" To view the discussion, visit: https://community.jboss.org/message/740612#740612 -------------------------------------------------------------- String respond = "SOME_VALUE"; Map result = new HashMap(); result.put("answer", respond); ContentData contentData = null; ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream out; try { out = new ObjectOutputStream(bos); out.writeObject(result); out.close(); contentData = new ContentData(); contentData.setContent(bos.toByteArray()); contentData.setAccessType(AccessType.Inline); } catch (IOException ioe) { ioe.printStackTrace(); } localTaskService.complete(taskId, userName, contentData); My process has a sequence of human tasks. When I ran the code above, the first task executed fine, but the second task gives me: java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper Any idea why it suddently doesn't work? Full stack trace: Application Message - java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper java.lang.ClassCastException: java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper at org.jbpm.task.utils.ContentMarshallerHelper.unmarshall(ContentMarshallerHelper.java:157) at org.jbpm.process.workitem.wsht.SyncWSHumanTaskHandler$TaskCompletedHandler.handleCompletedTask(SyncWSHumanTaskHandler.java:354) at org.jbpm.process.workitem.wsht.SyncWSHumanTaskHandler$TaskCompletedHandler.execute(SyncWSHumanTaskHandler.java:329) at org.jbpm.task.service.local.LocalTaskService$SimpleEventTransport.trigger(LocalTaskService.java:307) at org.jbpm.task.event.MessagingTaskEventListener.taskCompleted(MessagingTaskEventListener.java:73) at org.jbpm.task.event.TaskEventSupport.fireTaskCompleted(TaskEventSupport.java:46) at org.jbpm.task.service.TaskServiceSession.postTaskCompleteOperation(TaskServiceSession.java:502) at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:468) at org.jbpm.task.service.local.LocalTaskService.complete(LocalTaskService.java:80) -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/740612#740612] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
