JBoss Community

Why is Timer event not triggered in J2EE container?

created by Gary tse in jBPM - View the full discussion

Hi all,

 

I have a timer event that is suppose to automatically trigger after 3 minutes. 

 

When I'm testing it on standalone Java program, the bpmn works fine and the task following the timer event gets triggered.

 

However, the timer event just never gets triggered after I put the StatefulKnowledgeSession into a EJB on the server.

 

This is a portion of the timer (bpmn2)

 

    <boundaryEvent id="_5" name="TimerEvent" attachedToRef="_4" cancelActivity="false" >
      <timerEventDefinition>
        <timeDuration xsi:type="tFormalExpression">180s</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>

 

 

My stateless session EJB looks like this:

...
public class CommandDelegate implements SessionBean, ICommandDelegateLocalBM, ICommandDelegateRemoteBM {
 
private static StatefulKnowledgeSession  stateful;
 
public void startProcess(String processId, Map<String, Object> parameters) {
   stateful.startProcess(processId, parameters);
}

 

 

Here is my test client:

 

context = new InitialContext(env);
Object obj = context.lookup("ejb/CommandDelegateRemote");
remoteHome = (CommandDelegateRemoteHome)PortableRemoteObject.narrow(obj,CommandDelegateRemoteHome.class);
remote = remoteHome.create();
...
remote.startProcess("TestTimerBPMN", params);

 

 

Any ideas anyone?

Reply to this message by going to Community

Start a new discussion in jBPM at Community