This content has been marked as final.
Show 4 replies
-
1. Re: Process Logging Not Happening Correctly
etluchs Feb 22, 2008 4:02 AM (in response to cbax007)I've got a similar problem with jbpm-jpdl 3.2.1. Funnily, only variable instance changes are logged, nothing else. Maybe, there's some logging-configuration necessary which is not obvious from the docs?
-
2. Re: Process Logging Not Happening Correctly
etluchs Feb 23, 2008 2:25 PM (in response to cbax007)For me, the solution was to explicitly call ProcessContext.save(ProcessInstance) before the end of each transactions. Obviously, some kinds of log-entries are not saved automatically via some cascading collection, but require explicit saving.
-
3. Re: Process Logging Not Happening Correctly
xnejp03 Sep 10, 2008 8:21 AM (in response to cbax007)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 -
4. Re: Process Logging Not Happening Correctly
kukeltje Sep 10, 2008 1:53 PM (in response to cbax007)Is it a configuration error (transaction setup?) or bug in the enterprise package?
Might be either... Not sure how the transaction of the CommandServiceBean is configured in jBPM.