Hi Anatoly, I just committed a first version of the a flow configured from spring, you can take a look in the drools svn trunk. More precisely inside test: drools-spring/src/test/java/org/drools/container/spring/beans/persistence/JPASingleSessionCommandServiceFactoryTest.java
I'll write a blog about this during the week. Hope you like it :-) -- Bauna On Wed, Apr 21, 2010 at 5:28 PM, tolitius <[email protected]> wrote: > > Thanks for working on it! > > I apologize if I posted on the wrong list ( I made my own judgment, that > things "about" the code go on the dev-list :) ) > > In any case I have not done extensive testing, but I was able to > successfully integrate Drools (JPA Persistable ) with Spring. Needed to > built several jars here and there, added missing component as I described > here: > http://n3.nabble.com/Missing-Artifact-JPAKnowledgeFactoryServiceImpl-tp740835p740974.html > + some config tweaks. > > So now I can get this running successfully: > > public class WorkflowSpringConfigurationTest { > > �...@resource > JPAKnowledgeServiceBean jpaKnowledgeProvider; > > �...@test > public void shouldCreateApplicationContextAndInjectKnowledgeProvider() > { > // should Create Application Context And Inject > KnowledgeProvider > } > > �...@test > public void shouldStartTheFlow() { > StatefulKnowledgeSession session = > jpaKnowledgeProvider.newStatefulKnowledgeSession(); > > session.startProcess( "ultra-simple-flow" ); > } > > �...@test > public void shouldSuspendTheFlow() { > StatefulKnowledgeSession session = > jpaKnowledgeProvider.newStatefulKnowledgeSession(); > > session.getWorkItemManager().registerWorkItemHandler( > "WaitToBeCompleted", new > DoNothingWorkItemHandler() ); > > session.startProcess( "suspendable-flow" ); > } > > �...@test > public void shouldResumeTheFlow() { > StatefulKnowledgeSession session = > jpaKnowledgeProvider.loadStatefulKnowledgeSession( 2 ); > > session.getWorkItemManager().completeWorkItem( 1, null ); > } > } > > hard coded IDs here are used due to the fact that in a test config I have > "<prop key="hibernate.hbm2ddl.auto">create</prop>" as a JPA property, so > they are always the same. > > /Anatoly > -- > View this message in context: > http://n3.nabble.com/Missing-Artifact-JPAKnowledgeProviderLocalClient-tp740387p741171.html > Sent from the Drools - Dev mailing list archive at Nabble.com. > _______________________________________________ > rules-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-dev > _______________________________________________ rules-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-dev
