[jboss-dev-forums] [jBPM Development] - Re: SessionInfo and ProcessInstanceInfo tables are not getting updated when starting the process using JPAKnoweldgeService

uvijayreddy657 do-not-reply at jboss.com
Tue Sep 20 09:57:09 EDT 2011


uvijayreddy657 [http://community.jboss.org/people/uvijayreddy657] created the discussion

"Re: SessionInfo and ProcessInstanceInfo tables are not getting updated when starting the process using JPAKnoweldgeService"

To view the discussion, visit: http://community.jboss.org/message/627505#627505

--------------------------------------------------------------
Mauricio,

I am including ProcessInstanceInfo, SessionInfo and WorkItemInfo in persistence.xml. I am attaching my persistence.xml here. If any modifications required please suggest me. 

I am using JPAKnowledgeService only to create session. This is the code which I am using:

Properties properties = **new** Properties(); 
 
properties.put("drools.processInstanceManagerFactory","org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory"); 
properties.put("drools.processSignalManagerFactory"
,
"org.jbpm.persistence.processinstance.JPASignalManagerFactory");


KnowledgeSessionConfiguration config = KnowledgeBaseFactory.+newKnowledgeSessionConfiguration+(properties);


kbase = kbuilder.newKnowledgeBase();










Environment env = KnowledgeBaseFactory.+newEnvironment+();
env.set(EnvironmentName.++ENTITY_MANAGER_FACTORY++, emf
);
env.set(EnvironmentName.++GLOBALS++, *new*
 MapGlobalResolver());env.set(EnvironmentName.+APP_SCOPED_ENTITY_MANAGER+,emf.createEntityManager());

userTransaction = TransactionManagerServices.+getTransactionManager+();env.set(EnvironmentName.++TRANSACTION_MANAGER++, userTransaction
);
env.set(EnvironmentName.++TRANSACTION++, userTransaction,userTransaction);

StatefulKnowledgeSession  ksession = JPAKnowledgeService.+newStatefulKnowledgeSession+(kbase, config, env);



--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110920/81677dde/attachment.html 


More information about the jboss-dev-forums mailing list