Proper Way to Pass camelBody 'From' one Route To Another

cancel
Showing results for 
Search instead for 
Did you mean: 
jediwompa
Member II

Proper Way to Pass camelBody 'From' one Route To Another

Is there a proper /betterway to get Activiti to set the body automatically from one route to another, instead of manually fetching it out of the properties like so

@Component
public class TestRoute extends RouteBuilder {
    @Autowired
    protected TestProcessor processor;

    @Override
    @SuppressWarnings("unchecked")
    public void configure() throws Exception {
        from("activiti:test:step1")
            .process(processor)
            // end route
            .end();

        from("activiti:test:step2")
            .setBody(exchangeProperty("camelBody"))
            // do something with that body from step1
            // end route
            .end();
}