Question

I have recently asked a question here where I asked how to reference a String object in the mule registry from a Mule Flow. That has been successfully answered my current problem is that I cannot populate this in the registry before the flow is initialized.

Thus in the following segment (password="#app.registry['password']]) null is always used and my connection fails:

<sfdc:config name="ConfigurableSalesforceConnection"username="${sfdc.username}"password="#app.registry['password']]"securityToken="${sfdc.securityToken}"doc:name="Salesforce" url="${sfdc.url}" />

Amongst other things I have added a listener to my flow, but this adds the value too late and the flow has already been initialized.

<notifications>
    <notification event="CONTEXT"/>
    <notification-listener ref="Initializer"/>
</notifications>
<spring:beans>
    <spring:bean id="Initializer" name="Initializer"
        class="initializer.InitAccountSync" />
</spring:beans>

My question consists of two parts, firstly is there a way to fore the reinitialization of a flow after start-up, and/or how can I store a value in the mule-context registry before said initialization?

Thanks in advance.

Était-ce utile?

La solution

The registry is shared with Spring, you can register some java.lang.String beans using SpEL or a MethodInvokingFactoryBean.

However, for this case, if you are not retrieving it outside mule, what I would recommend is leverage jasypt.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top