hi, have you solved your problem? I did something similar with seam 2.0.1GA and 
jbpm 3.2.2. 

Everything worked all right. process-definition looked like:


  | <process-definition 
  |     name="myWf"
  |     xmlns="urn:jbpm.org:jpdl-3.2"
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |     xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 
http://jbpm.org/xsd/jpdl-3.2.xsd";>
  |     
  |    <start-state name="start" >
  |       <transition to="step1"/>
  |    </start-state>
  |    
  |    <task-node name="step1" end-tasks="true">
  |            <event type="node-enter">
  |             <create-timer name="myTimeout" duedate="30 seconds" 
transition="toExpire">
  |                 <action name="testWriteOut" 
expression="#{timerLogger.logTimer}"/>
  |             </create-timer>
  |            </event>
  |             <task name="stepOneTask" description="task 1">     
  |                    <assignment actor-id="#{currentUser.id}" />
  |            </task>      
  |            <transition name="finished" to="end"/>  
  |            <transition name="toExpire" to="expire"/> 
  |    </task-node>
  | ...
  | 

The action I call looks like:

  | package my.package;
  | 
  | import java.io.Serializable;
  | 
  | import org.jboss.seam.ScopeType;
  | import org.jboss.seam.annotations.End;
  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Logger;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.annotations.Scope;
  | import org.jboss.seam.log.Log;
  | 
  | @Name( "timerLogger" )
  | @Scope( ScopeType.CONVERSATION )
  | public class TimerLogger implements Serializable {
  |     /**
  |      * 
  |      */
  |     private static final long serialVersionUID = 6974693306545880498L;
  | 
  |     @Logger
  |     private Log log;
  | 
  |     @In(value="aContextVariable", scope=ScopeType.BUSINESS_PROCESS)
  |     String aContextVariable;  // this is a business process context variable
  |     
  |     @End
  |     public void logTimer( )
  |     {
  |             System.out.println( "---------------- timer was created." );
  |             log.info( "--------- variable: " + aContextVariable );
  |     }
  | }
  | 

My jbpm.cfg.xml looks like:

  | <jbpm-configuration>
  | 
  |   <jbpm-context>
  |     <service name="persistence">
  |        <factory>
  |           <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
  |              <field name="isTransactionEnabled"><false/></field>
  |           </bean>
  |        </factory>
  |     </service>
  |     <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
  |     <service name="message" 
factory="org.jbpm.msg.db.DbMessageServiceFactory" />
  |     <service name="scheduler" 
factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory"/> 
  |      <!--   <service name="scheduler" 
factory="org.jbpm.scheduler.ejbtimer.EjbSchedulerServiceFactory" />--> 
  |     <service name="logging" 
factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
  |     <service name="authentication" 
factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" 
/>
  |   </jbpm-context>
  | 
  |    <!-- configuration property used by persistence service impl 
org.jbpm.persistence.db.DbPersistenceServiceFactory -->
  |    <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
  |    
  |    <!-- configuration resource files pointing to default configuration 
files in jbpm-jpdl.jar -->
  |    <string name="resource.business.calendar" 
value="org/jbpm/calendar/jbpm.business.calendar.properties" />
  |    <string name="resource.default.modules" 
value="org/jbpm/graph/def/jbpm.default.modules.properties" />
  |    <string name="resource.converter" 
value="org/jbpm/db/hibernate/jbpm.converter.properties" />
  |    <string name="resource.action.types" 
value="org/jbpm/graph/action/action.types.xml" />
  |    <string name="resource.node.types" 
value="org/jbpm/graph/node/node.types.xml" />
  |    <string name="resource.parsers" 
value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
  |    <string name="resource.varmapping" 
value="org/jbpm/context/exe/jbpm.varmapping.xml" />
  |    <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
  |    
  |    <int    name="jbpm.byte.block.size" value="1024" singleton="true" />
  |    <string name="jbpm.mail.smtp.host" value="localhost" />
  |    <bean   name="jbpm.task.instance.factory" 
class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" 
/>
  |    <bean   name="jbpm.variable.resolver" 
class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
  |    <bean   name="jbpm.mail.address.resolver" 
class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
  |    
  |    <!-- note that the default job executor needs to be overwritten with a 
null value -->  
  |    <!-- <null name="jbpm.job.executor" /> -->
  |    
  |    
  | </jbpm-configuration>
  | 

I am using the JobExecutor Servlet in web.xml

  |    <servlet>
  |       <servlet-name>JobExecutorServlet</servlet-name>
  |       
<servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class>
  |       <load-on-startup>1</load-on-startup>
  |    </servlet>
  |    <servlet-mapping>
  |       <servlet-name>JobExecutorServlet</servlet-name>
  |       <url-pattern>/jobs</url-pattern>
  |    </servlet-mapping>
  | 
Hoping it helps a little bit. 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128915
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to