Question

I have a default catch exception strategy for my entire flow/subflows. However, I'd like to be able to tell what component/endpoint threw an exception so I can try to restart the flow at that point (I have yet to figure out how to do that as well.)

Is there any easy way to tell what component/endpoint threw the exception, and be able to tell if it was in a foreach, and at what point (by looking at the "counter" variable.)

Thanks!

Was it helpful?

Solution

You can set a variable at the start of flow like this:

<set-variable variableName="flowName" value="Your_flow_name"/>

And the get the flow name like #[flowName] in your exception strategy.

EDIT:

To trigger a flow, create a java component implementing Callable interface, from the context get the MuleClient and use send or dispatch method to send payload to flow. Send causes MuleClient to wait for response while dispatch doesn't.

More info here: http://www.mulesoft.org/documentation/display/current/Using+the+Mule+Client

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top