[rules-dev] Missing Artifact: JPAKnowledgeProviderLocalClient

Pablo Nussembaum baunax at gmail.com
Tue Apr 27 17:23:20 EDT 2010


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 <webakaunt at gmail.com> 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
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>



More information about the rules-dev mailing list