[JBoss jBPM] - Timer never stop
by greenHand
I ran into a situation like this when I try a test process. I have a very simple process:
<?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="" name="TryTimer">
| <start-state name="start-state1">
| <transition to="task-node1"></transition>
| </start-state>
| <task-node name="task-node1">
| <task name="asignApprover">
| <assignment class="com.pbsg.mst.wf.ApproverAssignmentHandler"></assignment>
| </task>
| <event type="node-enter">
| <create-timer duedate="5 seconds" name="myTimer" repeat="10 seconds">
| <action name="printsomething" class="com.pbsg.mst.wf.ApproverReminderAction"></action>
| </create-timer>
| </event>
| <event type="node-leave">
| <cancel-timer name="myTimer"></cancel-timer>
| </event>
| <transition to="end-state1"></transition>
| </task-node>
| <end-state name="end-state1"></end-state>
| </process-definition>
I have this in onMessage in my MDB:
NewProcessInstanceCommand newProcessInstanceCommand = new NewProcessInstanceCommand(
| "TryTimer");
| newProcessInstanceCommand.setKey(msg.getJMSCorrelationID());
| RemoteCommandServiceHome commandServiceHome = (RemoteCommandServiceHome) ctx
| .lookup("ejb/CommandServiceBean");
| RemoteCommandService commandService = commandServiceHome.create();
| ProcessInstance pi = (ProcessInstance) commandService
| .execute(newProcessInstanceCommand);
|
| String name = pi.getRootToken().getNode().getName();
| long id = pi.getId();
| JbpmContext jbpmContext = getJbpmContext();
| ProcessInstance pi2 = jbpmContext.getProcessInstance(id);
| pi2.signal(); //leaving start node
| name = pi2.getRootToken().getNode().getName();
| id = pi2.getId();
| jbpmContext.close();
| jbpmContext = getJbpmContext();
|
| name = pi2.getRootToken().getNode().getName();
| pi2.signal();
| jbpmContext.close();
The the session time out because of a breakpoint, then an exception is thrown. I believe this caused that the process never leave the node, so the timer never gets cancelled.
Now the ActionHandler prints the debug message 10 seconds. Even I shut down the app server. When the server is restarted, it starts printing without getting new MQ message.
I am not sure how to stop the running timer. Can anyone help?
A more fundemental question is that how to end the task and leave the node programatically and hopefully the timer can be stopped? I did not specify actorId for the task. The methods in TaskMgmtSession require a instance or an id. Is there a way that I get all the task instance without requiring an id?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156162#4156162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156162
17 years, 10 months
[EJB 3.0] - Re: Running 4.2.2 and 4.0.3SP1 EJBs in the same environment
by pc762012
Hello Imellis85,
I know this was posted a long time ago. Could you tell me how you resolved your issue. I am having a very similar problem where in I am migrating my J2EE application from 4.0.5.GA to jboss 4.2.2.GA
I changed the necassary jbossall-client.jar file needed for compilation. There are no errors and as I see it no code changes are required.
But it pops up the following error when I try to remotely access all the EJB2.1 I have on the server.
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException:org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingCOntext.lookup(NamingContext.java:668)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
at javax.naming.InitialContext.lookup(Unknown Source)
If you or anyone else can shed some light on this matter, it would be most helpful.
pc
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156160#4156160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156160
17 years, 10 months