[jBPM] New message: "Repeat Timer Issue"
by Sean Mo
User development,
A new message was posted in the thread "Repeat Timer Issue":
http://community.jboss.org/message/529862#529862
Author : Sean Mo
Profile : http://community.jboss.org/people/seanmo
Message:
--------------------------------------------------------------
This happened on jBPM 4.0. Initially I defined a normal timer in my process definition, it worked well but after I changed it to a repeat timer (by adding repeat="30 seconds"), I encountered the following exception:
Mar 4, 2010 5:40:35 PM org.jbpm.internal.log.Jdk14Log error
SEVERE: exception while executing 'timer[23|2010-03-04 17:41:05,391|TimeoutEvent]'
org.jbpm.api.JbpmException
TimerImpl.java:150)at org.jbpm.pvm.internal.job.TimerImpl.execute(
TimerImpl.java:52)at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(
ExecuteJobCmd.java:74)at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(
ExecuteJobCmd.java:41)at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(
DefaultCommandService.java:42)at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(
CommandTransactionCallback.java:50)at org.springframework.transaction.support.TransactionTemplate.execute(
TransactionTemplate.java:128)at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(
SpringTransactionInterceptor.java:79)at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(
EnvironmentInterceptor.java:54)at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(
RetryInterceptor.java:55)at org.jbpm.pvm.internal.jobexecutor.JobExecutorThread.run(
JobExecutorThread.java:63)
Here's my timer definition:
<
custom expr=+"#{customWaitActivity}"+ name=+"Custom Wait"+ g=+"411,174,126,52"+>
<on event=+"TimeoutEvent"+>
<!--<timer duedate="30 seconds" />-->
<timer duedate=+"30 seconds"+ repeat=+"30 seconds"+ />
<event-listener class=+"jbpm.demo.wf.spring.SpringEventListenerDelegate"+>
<field name=+"beanName"+>
<string value=+"timerExpireHandler"+ />
</field>
</event-listener>
</on>
<transition name=+"timeout"+ to=+"Do Something"+ g=+"47,-8"+ >
<timer duedate=+"7 business days"+></timer>
</transition>
</custom>
Spring is used to control all the transactions in my project. All the other functions work fine so I think this may be a Spring integration bug of Timer. Here's my Sping Transaction config:
<
tx:annotation-driven transaction-manager=+"transactionManager"+ />
<bean id=+"transactionManager"+ class=+"org.springframework.orm.hibernate3.HibernateTransactionManager"+>
<property name=+"sessionFactory"+ ref=+"sessionFactory"+/>
</bean>
<bean id=+"sessionFactory"+ class=+"org.springframework.orm.hibernate3.LocalSessionFactoryBean"+>
<property name=+"dataSource"+ ref=+"demoDatasource"+ />
<property name=+"exposeTransactionAwareSessionFactory"+><value>true</value></property>
<property name=+"hibernateProperties"+>
<props>
<prop key=+"hibernate.dialect"+>org.hibernate.dialect.DB2Dialect</prop>
<prop key=+"hibernate.format_sql"+>false</prop>
<prop key=+"hibernate.show_sql"+>false</prop>
<prop key=+"use_sql_comments"+>false</prop>
<prop key=+"hibernate.hbm2ddl.auto"+>none</prop>
</props>
</property>
<property name=+"mappingLocations"+>
<list>
<value>classpath:jbpm.execution.hbm.xml</value>
<value>classpath:jbpm.repository.hbm.xml</value>
<value>classpath:jbpm.task.hbm.xml</value>
<value>classpath:jbpm.history.hbm.xml</value>
<value>classpath:jbpm.identity.hbm.xml</value>
</list>
</property>
</bean>
And jbpm.cfg.xml is properly set up according to the jbpm doc as below.
...
<
job-executor threads=+"2"+ idle=+"20000"+ lock=+"2400000"+ auto-start=+"true"+ init=+"immediate"+ />
<!-- Here we needed to change the transaction interceptor -->
<command-service>
...
<spring-transaction-interceptor />
</command-service>
<!-- Added spring as read-context -->
<script-manager default-expression-language=+"juel"+ default-script-language=+"juel"+
read-contexts=+"execution, environment, process-engine, spring"+ write-context=+""+>
<script-language name=+"juel"+ factory=+"org.jbpm.pvm.internal.script.JuelScriptEngineFactory"+ />
</script-manager>
...
<transaction-context>
...
<hibernate-session current=+"true"+ />
</transaction-context>
...
Could anyone help to take a look? Thank you very much in advance!
: no transaction in environmentat org.jbpm.pvm.internal.job.TimerImpl.execute(
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529862#529862
16 years, 1 month
[JBoss Tools] New message: "Re: Support for JPA 2.0 resp. Hibernate 3.5"
by Juergen Zimmermann
User development,
A new message was posted in the thread "Support for JPA 2.0 resp. Hibernate 3.5":
http://community.jboss.org/message/529861#529861
Author : Juergen Zimmermann
Profile : http://community.jboss.org/people/Juergen.Zimmermann
Message:
--------------------------------------------------------------
See the stacktrace below. The relevant attribute definition is as follows:
@Entity
@Table(name="kunde")
public abstract class Kunde implements java.io.Serializable {...}
@Entity
@DiscriminatorValue("P")
public class Privatkunde extends Kunde
...
@ElementCollection // JPA 2.0
@CollectionTable(name="kunde_hobby", http://community.jboss.org/mailto:joinColumns=@JoinColumn(name="kund...")) // JPA 2.0
@Column(name="hobby_fk")
private List<Integer> hobbiesDB;
The stacktrace:
org.hibernate.MappingException: Could not determine type for: java.util.List, at table: kunde, for columns: [org.hibernate.mapping.Column(hobby_fk)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276)
at org.hibernate.mapping.Property.isValid(Property.java:207)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458)
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:554)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:98)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:549)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529861#529861
16 years, 1 month
[jBPM] New message: "Re: Creating tasks in a loop with JBPM 4.3"
by Maciej Swiderski
User development,
A new message was posted in the thread "Creating tasks in a loop with JBPM 4.3":
http://community.jboss.org/message/529854#529854
Author : Maciej Swiderski
Profile : http://community.jboss.org/people/swiderski.maciej
Message:
--------------------------------------------------------------
Thanks for the attachment, much easier to follow
I think it should work quite well, it's a bit confusing (at least at first look) but that should cover your use case.
Perhaps you could try to make it more business focused, meaning create some groups of activities per position types or so - if possible and reasonable.This should give you some feeling that the process is modeled, visible forks and joins and not only looping
To me your process seems to be very technical that business experts can have problems to follow...but it could be only me...
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529854#529854
16 years, 1 month