Assaf Adato
Assaf Adato

Reputation: 237

spring integration: stop a flow based on a given a condition

Is it possible to stop the flow execution in SI based on a header/message value ?

Thanks.

Upvotes: 2

Views: 2872

Answers (1)

seanhodges
seanhodges

Reputation: 17524

You can use a Control Bus to start and stop an inbound-adapter.

If you want to stop an existing flow mid-execution, I'm not aware of any standard ESB component that will enable you to do that. You could perhaps use a Channel Interceptor and lock the thread execution manually, but this approach would only be as granular as your message endpoints.

Also, if you find a way to interrupt the execution, be careful of any timeout values you set in your flow configuration. Otherwise you may find the flow will fail when you eventually resume it!

Upvotes: 2

Related Questions