Hi,

I am facing problem in executing a custom action class in jbpm 3.1


Process is something like this...
start--->state1-->end1


Now at state1, I have a action class at the time of node-enter.

<state name="state1">
  |       <event type="node-enter">
  |          <action name="action1" 
class="com.sample.action.MessageActionHandler">
  |             <message>NASEEM</message>
  |          </action>
  |       </event>
  |       <transition name="action is executed" to="end1">
  |       </transition>
  |    </state>


My MessageActionHandler class...

package com.sample.action;
  | 
  | import org.jbpm.graph.def.ActionHandler;
  | import org.jbpm.graph.exe.ExecutionContext;
  | 
  | public class MessageActionHandler implements ActionHandler {
  | 
  |     private static final long serialVersionUID = 1L;
  |     
  |     /**
  |      * The message member gets its value from the configuration in the 
  |      * processdefinition. The value is injected directly by the engine. 
  |      */
  |     String message;
  | 
  |     /**
  |      * A message process variable is assigned the value of the message
  |      * member. The process variable is created if it doesn't exist yet.
  |      */
  |     public void execute(ExecutionContext context) throws Exception {
  |             
  |             
System.out.println("*************************************************************************");
  |             //context.getContextInstance().setVariable("message", message);
  |             //System.out.println("Message is>>>>>>>>>>>>> " + message);
  |             
  |     }
  | }
  | 

On the server console... I get this message...

anonymous wrote : .......
  | DEBUG [GraphElement] event 'node-enter' on 'State(state1)' for 'Token(/)'
  | DEBUG [GraphElement] executing action 'action[action1]'
  | .......
  | 

But my action class execute method is not executed?

My Action class is in the process project and I have selected java classes and 
resources. I deployed process definition on server-deployer /jbpm/upload

My Action class is not in the jbpm.war. I am not sure where I should put my 
Action class.


Please help me in this regard

Thanks in advance

Naseem

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044215
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to