[jBPM] - java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper
by TC ONG
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&con...]
13 years
[jBPM] - No String constructor found on type [org.drools.builder.ResourceType]
by Ashok Kuppuswamy
Ashok Kuppuswamy [https://community.jboss.org/people/akuppu] created the discussion
"No String constructor found on type [org.drools.builder.ResourceType]"
To view the discussion, visit: https://community.jboss.org/message/780083#780083
--------------------------------------------------------------
I am trying to integrate with spring and I am stuck on this error
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initializing new StandardEnvironment
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initializing new StandardEnvironment
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2012-12-05 04:43:45 [main] DEBUG org.springframework.beans.BeanUtils - No property editor [org.drools.builder.ResourceTypeEditor] found for type org.drools.builder.ResourceType according to 'Editor' suffix convention
2012-12-05 04:43:45 [main] DEBUG org.springframework.beans.TypeConverterDelegate - No String constructor found on type [org.drools.builder.ResourceType]
java.lang.NoSuchMethodException: org.drools.builder.ResourceType.<init>(java.lang.String)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:197)
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510)
This is the config I have
<jbpm:kbase id="kbase">
<jbpm:resources>
<jbpm:resource type="BPMN2" source="classpath:Evaluation.bpmn"/>
</jbpm:resources>
</jbpm:kbase>
Any help is greatly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/780083#780083]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - JBPM - Catch Intermediate Signal fails sometime
by zaid_ahmmed
zaid_ahmmed [https://community.jboss.org/people/zaid_ahmmed] created the discussion
"JBPM - Catch Intermediate Signal fails sometime"
To view the discussion, visit: https://community.jboss.org/message/804965#804965
--------------------------------------------------------------
| | I have added "Signal Intermediate Event" to a human-task as a boundary-event as I have given in previous question (http://stackoverflow.com/questions/14473411/jbpm-5-human-task-recall).
Sometimes the signal is processed successfully and *sometimes* it is *NOT*. JBPM runtime just updates the process-instance-info and doesn't process the signal.
I am using +StatefulKnowledgeSession.signalEvent()+ , it is just updating the ProcessInstanceInfo at the backend and the event doesn't cancel the current activity in progress
What could be the problem ? Any bug related to this 'Signal Intermediate Event'? .
*LOG:*
08:34:38,955 INFO [stdout] (http--0.0.0.0-8280-20) 2013-03-13 08:34:38,954 [http--0.0.0.0-8280-20] DEBUG web.mvc.controller.SignalController - A new PROCESS signal recieved ..putProcessOnHOLD 08:34:38,966 INFO [stdout] (http--0.0.0.0-8280-20) 2013-03-13 08:34:38,966 [http--0.0.0.0-8280-20] DEBUG org.drools.container.spring.beans.persistence.DroolsSpringTransactionManager - Current TX name (According to TransactionSynchronizationManager) : core.service.impl.event.ExternalEventManagerImpl.dispatchSignal 08:34:38,978 INFO [stdout] (http--0.0.0.0-8280-20) 2013-03-13 08:34:38,978 [http--0.0.0.0-8280-20] DEBUG org.drools.container.spring.beans.persistence.DroolsSpringTransactionManager - Current TX: org.springframework.transaction.support.DefaultTransactionStatus@3dda5edd 08:34:38,987 INFO [stdout] (http--0.0.0.0-8280-20) Hibernate: select processins0_.InstanceId as InstanceId1_0_, processins0_.id as id1_0_, processins0_.lastModificationDate as lastModi3_1_0_, processins0_.lastReadDate as lastRead4_1_0_, processins0_.processId as processId1_0_, processins0_.processInstanceByteArray as processI6_1_0_, processins0_.startDate as startDate1_0_, processins0_.state as state1_0_, processins0_.OPTLOCK as OPTLOCK1_0_ from ProcessInstanceInfo processins0_ where processins0_.InstanceId=? 08:34:39,014 INFO [stdout] (http--0.0.0.0-8280-20) Hibernate: update ProcessInstanceInfo set id=?, lastModificationDate=?, lastReadDate=?, processId=?, processInstanceByteArray=?, startDate=?, state=?, OPTLOCK=? where InstanceId=? and OPTLOCK=?
Environment : JBPM 5.4.0.Final, Jboss 7.1.0.Final |
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/804965#804965]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years