03-27-2014 05:46 AM
java.lang.RuntimeException: Activit consumer already defined for activiti://TestProcess:sender!
at org.activiti.camel.ActivitiEndpoint.addConsumer(ActivitiEndpoint.java:60)
at org.activiti.camel.ActivitiConsumer.doStart(ActivitiConsumer.java:27)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1803)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2097)
at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2033)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1963)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1976)
at org.apache.camel.impl.DefaultCamelContext.startRouteService(DefaultCamelContext.java:1853)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:752)
at org.apache.camel.model.RouteDefinition.adviceWith(RouteDefinition.java:278)
at camel.test.AdviceActivitiConsumerRouteTest.testAdviceOnActivitiRoute(AdviceActivitiConsumerRouteTest.java:21)
…
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:/activiti-camel-test.xml")
public class AdviceActivitiConsumerRouteTest {
@Autowired
private ModelCamelContext camelContext;
@Test
public void testAdviceOnActivitiRoute() throws Exception {
camelContext.getRouteDefinitions().get(0).adviceWith(camelContext,
new AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
intercept().to("mock:foo");
}
});
}
}
public class CamelTestRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("activiti:TestProcess:sender")
.to("log:test");
}
}
<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
<packageScan>
<package>camel.test.route</package>
</packageScan>
</camelContext>
04-23-2014 04:16 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.