[jboss-user] [jBPM] - Re: jbpm5 RULEFLOW VARIABLE CHANGED null

Luis Tamayo do-not-reply at jboss.com
Mon Sep 5 18:56:56 EDT 2011


Luis Tamayo [http://community.jboss.org/people/luis.tamayo] created the discussion

"Re: jbpm5 RULEFLOW VARIABLE CHANGED null"

To view the discussion, visit: http://community.jboss.org/message/624869#624869

--------------------------------------------------------------
Yes I am

ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new CommandBasedWSHumanTaskHandler( ksession ));
                    ksession.getWorkItemManager().registerWorkItemHandler("MiNotificacion", new EmailWorkItemHandler());

EmailWorkItemHandler code is:

import org.drools.runtime.process.WorkItem;
import org.drools.runtime.process.WorkItemHandler;
import org.drools.runtime.process.WorkItemManager;


public class EmailWorkItemHandler implements WorkItemHandler { 

          public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { 
                    // extract parameters
                    try {
                              System.out.println("================================>> ingresa a executeWorkItem EmailWorkItemHandler");
                              String from = (String) workItem.getParameter("From");
                              System.out.println("================================>> From " + from );
                              String to = (String) workItem.getParameter("To");
                              //String message = (String) workItem.getParameter("Message");



                              manager.completeWorkItem(workItem.getId(),null);

                    } catch (Exception e) {

                              e.printStackTrace();
                    }
          } 


}
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/624869#624869]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110905/95eda159/attachment-0001.html 


More information about the jboss-user mailing list