Hi there,
From a simple Process deployment, we are encountering several problem with a class. Following the code and the config file below.
<?xml version="1.0" encoding="UTF-8"?> <process-definition xmlns="" name="MyApp"> <swimlane name="swimlane1"> <assignment class="mypackage.MyActionHandler"></assignment> </swimlane> <start-state name="start-state1"> <transition to="task-node1"></transition> </start-state> <task-node name="task-node1"> <task name="javaCall" signalling="false" priority="highest"> <action class="mypackages.MyActionHandler"></action> <assignment></assignment> <controller class="mypackage.MyActionHandler"> null </controller> </task> <transition to="end-state1"></transition> </task-node> <end-state name="end-state1"></end-state> </process-definition>
package mypackage.process;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
public class MyActionHandler implements ActionHandler {
private static final long serialVersionUID = 1L;
String swimlaneName;
public void execute(ExecutionContext executionContext) {
System.out.println("ErnieErnieErnieErnieErnieErnieErnieErnieErnie@jboss.com");
}
}
<May 21, 2007 6:39:15 PM CEST> <Notice> <Stdout> <000000> <ERROR [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] (ProcessBean.java:161) - Failed to start process: mypackage.MyActionHandler java.lang.ClassCastException: mypackage.MyActionHandler
you use one and the same actionhandler for assignment, actionhandler and controller? Is that on purpose? afaik (cannot check now) they should implement different interfaces and that you didn't.