fix printing indefinite log errors
After first failure in customValidate, stop printing logs until any property is changed
This closes
@@ -234,6 +234,9 @@ public class InvokeScriptedProcessor extends AbstractSessionFactoryProcessor {
*/
@Override
public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) {
+
+ validationResults.set(null);
+
final ComponentLog logger = getLogger();
final Processor instance = processor.get();
@@ -451,6 +454,12 @@ public class InvokeScriptedProcessor extends AbstractSessionFactoryProcessor {
return commonValidationResults;
}
+ // do not try to build processor/compile/etc until onPropertyModified clear the validation error/s
+ // and don't print anything into log.
+ if (validationResults.get() != null){
+ return validationResults.get();
+ }
+
scriptingComponentHelper.setScriptEngineName(context.getProperty(scriptingComponentHelper.SCRIPT_ENGINE).getValue());
scriptingComponentHelper.setScriptPath(context.getProperty(ScriptingComponentUtils.SCRIPT_FILE).evaluateAttributeExpressions().getValue());
scriptingComponentHelper.setScriptBody(context.getProperty(ScriptingComponentUtils.SCRIPT_BODY).getValue());
