One Star

Dynamically disable a component at runtime

Good morning,
we have a requirement to dynamically activate/deactivate a component at runtime by configuration. As far as I know, this is possible in the Open Studio designer from a context menu but not in runtime.
Our scenario is following: we have a web service proxy deployed in Talend ESB. It contains a tXSDValidator component. We want to be able to enable/disable XSD validation by a configuration parameter (e.g. context parameter), instead of re-building the solution.
I guess that the same might be also useful in other scenarios, such as some kind of debugging and logging output. For example, tLogRow is very useful in development phase, but for production purposes, we may prefer turning this off and prefer performance measures.
Is there any way to use the Dynamic Settings tab here?
Thanks Michal
Seventeen Stars

Re: Dynamically disable a component at runtime

as far as I know it's not possible to activate/desactivate a component or job on runtime.(but perhaps I'm wrong)
A tricky way will be to create a context flag (execute_validation= true/false) & put your xsd validation in a tRunJob.
Use a run if trigger to execute this tRunJob or not due to the context value.
This context value can be initiate in a config.ini or in the script file by adding context_param execution_validation=false
One Star

Re: Dynamically disable a component at runtime

Thanks a lot, Laurent!
Your solution seems to be doable in general but from my perspective not really elegant for my specific case. Because Run If is a trigger transition, not a Main data transition, I would have to use hash-input-output and create quite a sophisticated structure of sub-jobs for a simple web service proxy.
After an additional research, I found out two options to enable/disable web service schema validation (so these are rather specific solution to my case):
1/ there is a CXF flag which can turn validation on and off outside Talend flow. There are more details in this topic:

2/ in the Enterprise version, you can use Service Registry, and there is a schema validation policy available. Not sure whether something similar can be applied in the free TOS.
Sincerely, Michal