Base workflow vs Interceptor

I have multiple workflows that share the same functionality in Pre/Post .
I started using Interceptors and it works well .

I came across Dynamic workflow registration - #3 by pauldemarco? and wondering whats the best practice to achieve this kind of functionality .Does a base workflow solution as discussed in the above post work well or interceptors would be ideal?

Should this be driven through a base workflow or through interceptors .

Also interceptors are experimental at this point , Any update on how they are going to evolve from experimental to accepted feature would be helpful.

Hi @mrt

I think that it really depends on your use case.

For the case mentioned in this post, they are looking to reuse signalMethods and queryMethods so it makes sense to use a “base workflow”. If your pre/post functionality is more related to logging or tracing, I would go with interceptors.

Keep in mind that interceptors are registered per worker (not per workflow), so the interceptor logic is going to be executed for any Workflow Execution running in your worker.

I am not sure about this. Can I ask from where did you get this?

I see an Experimental annotation for WorkflowInboundCallsInterceptor .So I assumed its still an experimental feature .Not sure whats the purpose of this annotation.

Thanks for your explanation.