[jboss-user] [JBoss jBPM] - "org.jbpm.graph.def.DelegationException"

manjula_athani do-not-reply at jboss.com
Mon Feb 18 23:03:36 EST 2008


Hi All,


I'm invoking an ActionHandler on some event (node-enter), but it is giving 
this exception : "org.jbpm.graph.def.DelegationException".
Here I'm giving code for action handler class and processdefinition.xml

MyAction.java
__________


  | package Hello4;
  | 
  | 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 sum="test";
  |   
  |   contextInstance.setVariable("sum",sum);
  | 
  |  }
  | 
  | }
  | 

__________
processdefinition.xml
________________

  | <process-definition  xmlns=""  name="Hello4">
  | 
  |  <start-state name="start">
  |   <event type='node-leave'>
  |     <action class='MyAction' />
  |       </event>
  |  </start-state>
  |   
  | <end-state name="end1">
  |   </end-state>
  | 
  | </process-definition>
  | 

___________

Thanks & Regards
Manjula

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

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



More information about the jboss-user mailing list