@Override
protected void loadPropertiesFromCamelDefinition(ProcessorDefinition processor) {
super.loadPropertiesFromCamelDefinition(processor);
if (processor instanceof OnCompletionDefinition) {
OnCompletionDefinition node = (OnCompletionDefinition) processor;
this.setInheritErrorHandler(Objects.<Boolean>getField(node, "inheritErrorHandler"));
this.setOnCompleteOnly(node.getOnCompleteOnly());
this.setOnFailureOnly(node.getOnFailureOnly());
this.setExecutorServiceRef(node.getExecutorServiceRef());
this.setUseOriginalMessagePolicy(node.getUseOriginalMessagePolicy());
} else {
throw new IllegalArgumentException("ProcessorDefinition not an instanceof OnCompletionDefinition. Was " + processor.getClass().getName());
}
}