[jboss-user] [JBoss jBPM] - Problem with a simple process definition using a Timer (JPDL

Fleury do-not-reply at jboss.com
Tue Jun 19 04:53:59 EDT 2007


Hey,

I can not make the process definition below working. The timer seems never to fire. No action is executed. Curiously, a lot of tokens are created in the database...
Could you please test this process definition and report what you observe ? I do not know if the problem comes from my configuration or from jpdl3.2 (this process was working with jpdl 3.1.4).

Thank you very much for your help

LF


The process definition :




<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   xmlns="urn:jbpm.org:jpdl-3.1"  name="bistable">
  |    <start-state name="start">
  |       <transition name="to_timer" to="Timer"></transition>
  |    </start-state>
  |    <state name="Timer" async="true">
  |       <timer name='startParallelProcesses' 
  |             duedate='1 seconds' 
  |             repeat='30 seconds' transition="to_parallel_processes">
  |          <action name="action1" class="com.sample.action.MessageActionHandler" async="true">
  |             <message>Firing timer</message>
  |          </action>
  |        </timer>
  |        <transition name="to_parallel_processes" to="fork1"></transition>
  |       <event type="node-leave">
  |         <action name="action1" class="com.sample.action.MessageActionHandler" async="true">
  |             <message>Leaving timer</message>
  |          </action>
  |       </event>
  |    </state>
  |    <fork name="fork1" async="true">
  |       <transition name="to_node1" to="node1"></transition>
  |       <transition name="to_node2" to="node2"></transition>
  |    </fork>
  |    <node name="node1" async="true">
  |       <event type="node-enter">
  |          <action name="action1" class="com.sample.action.MessageActionHandler" async="true">
  |             <message>Entering node1</message>
  |          </action>
  |       </event>
  |       <transition name="to_join1" to="join1"></transition>
  |    </node>
  |    <node name="node2" async="true">
  |       <event type="node-enter">
  |          <action name="action1" class="com.sample.action.MessageActionHandler" async="true">
  |             <message>Entering node2</message>
  |          </action>
  |       </event>
  |       <transition name="to_join1" to="join1"></transition>
  |    </node>
  |    <join name="join1" async="true">
  |       <transition name="back_to_timer" to="Timer">
  |       <action name="action1" class="com.sample.action.MessageActionHandler" async="true">
  |             <message>Back to timer</message>
  |          </action>
  |       </transition>
  |    </join>
  | </process-definition>


The MessageActionHandler class :

  | package com.sample.action;
  | 
  | import org.apache.commons.logging.Log;
  | import org.apache.commons.logging.LogFactory;
  | import org.jbpm.graph.def.ActionHandler;
  | import org.jbpm.graph.exe.ExecutionContext;
  | 
  | public class MessageActionHandler implements ActionHandler {
  | 
  | 	private static final long serialVersionUID = 1L;
  | 	
  | 	String message;
  | 
  | 	public void execute(ExecutionContext context) throws Exception {
  | 		log.info(message);
  | 	}
  | 
  | 	private static final Log log = LogFactory.getLog(MessageActionHandler.class);
  | }[/img]

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055502



More information about the jboss-user mailing list