[jboss-user] [JBoss jBPM] - jbpm 3.2.2

manjula_athani do-not-reply at jboss.com
Mon Feb 18 05:35:47 EST 2008


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. 

-------processdefinition.xml-----------

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


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


	<task-node name="process">
		
		
			
				
				
			
		
		
	</task-node>

	<task-node name="show sum">
	
			
				
				
				
			
		
		
			
		
		
	</task-node>


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


</process-definition>
--------------------------------------------------------
MyAction is available in the same package as that of processDefinition.xml

MyAction.java
_______________
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;
	  contextInstance.setVariable("sum",sum);

	 }

	}
________________

kindly help.
Manjula

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130047#4130047

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130047



More information about the jboss-user mailing list