JBoss Community

Re: error running ksession.startProcess with Persistence

created by Odelya Holiday in jBPM - View the full discussion

sure:

 

 

EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.persistence.jpa");

                    Environment env = KnowledgeBaseFactory.newEnvironment();

                    env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);

                    env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());

                    env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());

                    ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);

 

I also updated my first post with the SQL that causes it

Reply to this message by going to Community

Start a new discussion in jBPM at Community