From do-not-reply at jboss.com Mon Mar 30 05:01:15 2009 Content-Type: multipart/mixed; boundary="===============4533685888801364320==" MIME-Version: 1.0 From: gchanteb To: jboss-user at lists.jboss.org Subject: [jboss-user] [JBoss jBPM] - custom events / executionContext Date: Mon, 30 Mar 2009 05:01:15 -0400 Message-ID: <23316733.1238403675133.JavaMail.jboss@colo-br-02.atl.jboss.com> --===============4533685888801364320== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi all, I'm trying to implement custom events. It works, but i have some questions: I made a test with this process definition: | = | | | | = | | | | | | | | | | | = | | = | With Action1: public void execute(ExecutionContext executionContext) throws Exception = | { | executionContext.getToken().getNode().fireEvent("custom-event", execu= tionContext); | } And Action2: public void execute(ExecutionContext executionContext) throws Exception = | { | System.out.println("custom-event!"); | } I start and signal the process with jbpm-console, it's ok. But, first question: If i change in my processdefinition.xml | | to | | I have an exception... : anonymous wrote : Error signalling token: An exception of type "org.jbpm.Jb= pmException" was thrown. The message is: couldn't get value for file 'class= es/java/lang/bsh.class' Question 1- Why ? My System.out.println("node-enter!"); into node-enter! My second question is: Question 2 - I would like to start my custom-event into an EJB. I would lik= e to know how to recover the "executionContext" in my code? I made this test which doesn't work: public void launchCustomEvent(String processName, long idProcess) | { | System.out.println("Launch custom event for "+processName+" / "+idPro= cess); | = | jbpmContext =3D JbpmConfiguration.getInstance().createJbpmContext(); | ProcessInstance processInstance =3D jbpmContext.getProcessInstance(id= Process); | ExecutionContext executionContext =3D new ExecutionContext(processIns= tance.getRootToken()); | processInstance.getRootToken().getNode().fireEvent("custom-event", ex= ecutionContext); | } Thx. View the original post : http://www.jboss.org/index.html?module=3Dbb&op=3Dv= iewtopic&p=3D4221866#4221866 Reply to the post : http://www.jboss.org/index.html?module=3Dbb&op=3Dpostin= g&mode=3Dreply&p=3D4221866 --===============4533685888801364320==--