[jboss-user] [JBoss jBPM] - Re: Process Logging Not Happening Correctly
xnejp03
do-not-reply at jboss.com
Wed Sep 10 08:21:54 EDT 2008
I have the same problem. When I create process via Seam annotation @CreateProcess, it creates the logs properly, when the process starts using LocalCommandService, it only logs the creation of the process and not the subsequent transitions and automated nodes.
My jbpm.cfg.xml:
|
| <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="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| </jbpm-context>
|
Hibernate cfg:
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
|
| <property name="show_sql">false</property>
| <property name="connection.datasource">java:/JbpmDS</property>
| <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
| <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
| <!-- <property name="hbm2ddl.auto">create-drop</property> -->
|
| <!--property name="transaction.flush_before_completion">true</property-->
My process definition:
|
| <start-state name="start-state1">
| <transition to="automated node"></transition>
| </start-state>
|
|
| <node name="automated node">
| <action name="write to db 1" class="test.MyActionHandler"></action>
| <transition to="fork1"></transition>
| </node>
|
My client code (in a Seam component):
| @Transactional
| public String startBusinessProcess() {
|
| try {
| InitialContext ic = new InitialContext();
| LocalCommandServiceHome serviceHome = (LocalCommandServiceHome)ic.lookup("java:ejb/CommandServiceBean");
| LocalCommandService service = serviceHome.create();
| StartProcessInstanceCommand command = new StartProcessInstanceCommand();
| command.setActorId(actor.getId());
| command.setKey("key");
| command.setProcessName("testProcess");
| service.execute( command );
| } catch (NamingException e) {
| e.printStackTrace();
| } catch (CreateException e) {
| e.printStackTrace();
| }
|
| return null;
| }
|
Is it a configuration error (transaction setup?) or bug in the enterprise package? Anyone can help?
Thanks,
Petr
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175563#4175563
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175563
More information about the jboss-user
mailing list