Skip to content

Instantly share code, notes, and snippets.

@aschrijver
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aschrijver/cf78a1de3c045de91714 to your computer and use it in GitHub Desktop.
Save aschrijver/cf78a1de3c045de91714 to your computer and use it in GitHub Desktop.
jBPM, Spring, Camel question
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:kie="http://drools.org/schema/kie-spring"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://drools.org/schema/kie-spring
http://drools.org/schema/kie-spring.xsd">
<kie:kmodule id="MyModule">
<kie:kbase name="kbaseMain" packages="package.path.to.process.definition">
<kie:ksession name="ksessionMain" type="stateful" />
</kie:kbase>
</kie:kmodule>
<bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor" />
<!-- Makes Camel aware of jBPM in route definitions. -->
<bean id="kiePolicy" class="org.kie.camel.component.KiePolicy" />
<camelContext id="camelWorkflowContext" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="activemq:queue:inbox" />
<log message="Routing message from inbox queue to ksessionMain with data ${body}" />
<policy ref="kiePolicy">
<unmarshal ref="jaxb" />
<to uri="kie:ksessionMain" />
<marshal ref="jaxb" />
</policy>
</route>
</camelContext>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment