I'm using mule standalone 3.4. I am trying to create a flow using the Salesforce connector to perform a query operation and then pass the payload to a spring component. The result is the component doesn't get called.
<flow name="sfcdContact" doc:name="sfcdContact">
<quartz:inbound-endpoint repeatInterval="2000"
startDelay="3000"
jobName="sfcdContact">
<quartz:event-generator-job/>
</quartz:inbound-endpoint>
<sfdc:query config-ref="Salesforce"
query="${salesforce.query.contact}"
doc:name="sfcdContactQuery"/>
<component>
<spring-object bean="salesForceConsumer"/>
</component>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<flow-ref name="ErrorHandling"/>
</catch-exception-strategy>
</flow>
If I remove the sfdc portion from the flow, the spring component is successfully invoked. If I remove the component portion from the flow and replace it with:
<logger message="\#\#\# query operation payload \#[payload]" level="INFO" doc:name="Logger"/>
The results are successfully entered into the log. So it seems the pieces work correctly individually.
I have the logs set to debug, and no errors are reported.
Here's the Java code:
public class SalesForceConsumer {
public Object consume(@Payload Object payload) throws Exception {
System.out.println("SalesForceConsumer::consume called");
return payload;
}
}
I also tried modifying the signature to:
public Object consume(@Payload HashMap<String,Object> payload)
Which is what the doc indicates is returned from the connector.
Is there any reason why the Salesforce connector can't be combined with a bean, or do I have it configured incorrectly? Thank-you.