0 Replies Latest reply on Feb 18, 2008 5:35 AM by manjula athani

    jbpm 3.2.2

    manjula athani Newbie

      Hi all,

      I'm using jboss jbpm 3.2.2. using graphical tool created my application in which I want embed an action on a particular event/ transition. when that action class is invoked I get this exception :

      Error signalling token: An exception of type "org.jbpm.graph.def.DelegationException" was thrown.


      <process-definition xmlns="" name="Hello2">

      <start-state name="start">


      <task-node name="process">


      <task-node name="show sum">


      <end-state name="end"></end-state>

      MyAction is available in the same package as that of processDefinition.xml

      import org.jbpm.context.exe.ContextInstance;
      import org.jbpm.graph.def.ActionHandler;
      import org.jbpm.graph.def.ProcessDefinition;
      import org.jbpm.graph.exe.ExecutionContext;
      import org.jbpm.graph.exe.ProcessInstance;

      public class MyAction implements ActionHandler {
      private static final long serialVersionUID = 1L;

      public void execute(ExecutionContext executionContext) throws Exception {
      // TODO Auto-generated method stub
      ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("processdefinition.xml");

      ProcessInstance processInstance = new ProcessInstance(processDefinition);

      ContextInstance contextInstance = processInstance.getContextInstance();

      String getnum1 = (String)contextInstance.getVariable("num1");
      String getnum2 = (String) contextInstance.getVariable("num2");

      String sum = getnum1 + getnum2;



      kindly help.