Discussion:
[jboss-user] [jBPM] - JBPM5 database empty
y lab
2013-01-21 10:53:02 UTC
Permalink
y lab [https://community.jboss.org/people/yjboss] created the discussion

"JBPM5 database empty"

To view the discussion, visit: https://community.jboss.org/message/793208#793208

--------------------------------------------------------------
Hi,
I use persistence jpa with my JBPM5 application.
after starting a process, all  work fine but the database is empty , any idea ?

here how i start my process

     emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
                        kbase = readKnowledgeBase();
                        Environment env = KnowledgeBaseFactory.newEnvironment();
                        env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
                        env.set(EnvironmentName.TRANSACTION_MANAGER,TransactionManagerServices.getTransactionManager());
     session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null,env);
     session.startProcess("com.sample.bpmn.hello");

and my persitence.xml in PJ.

Thanks for your helps
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793208#793208]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-01-21 14:19:12 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: JBPM5 database empty"

To view the discussion, visit: https://community.jboss.org/message/793253#793253

--------------------------------------------------------------
y lab,

which db? what do you mean by db emtpy.. no data? or no tables?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793253#793253]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
doboss
2013-01-21 14:32:35 UTC
Permalink
doboss [https://community.jboss.org/people/doboss] created the discussion

"Re: JBPM5 database empty"

To view the discussion, visit: https://community.jboss.org/message/793259#793259

--------------------------------------------------------------
JBPM will not actually persist anything if the process runs and completes. (There is no state to save.) However, if you turn on history logging, you will see some data in some of those tables. Or, if your process does not finish (gets to a save/wait state) you will see some state in the DB.

Here is a way to log history:

JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(session);

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793259#793259]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
y lab
2013-01-21 15:35:23 UTC
Permalink
y lab [https://community.jboss.org/people/yjboss] created the discussion

"Re: JBPM5 database empty"

To view the discussion, visit: https://community.jboss.org/message/793270#793270

--------------------------------------------------------------
Thanks four your reply ;
Then if my process dont  have  a way state i dont need perssistence !!!!!!!!!!
i have learn that i must use perssitence in jbpm5.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793270#793270]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...