Solved
ExecuteGroovyScript Script File duplicated Script File and failure strategy property while the deployment
Dear there,
While i make the Nifi deployment to build ExecuteGroovyScript like that
from integration_pipeline.models.processors.script_processors.script_processor_base import ScriptProcessorBase
class ExecuteGroovyScriptProcessor(ScriptProcessorBase):
@property
def name(self) -> str:
return 'org.apache.nifi.processors.groovyx.ExecuteGroovyScript'
def insert_custom_properties(self, script_file: str,
module_directory: str = None, **kwargs):
self.set_configuration_properties({**{"Script File": script_file,
"Module Directory": module_directory,
"Failure strategy":"transfer to failure"},
**kwargs,
**self._processor_configuration["properties"]})
then i used it in my pipeline model to build the pipeline while deployment
create_update_script = ExecuteGroovyScriptProcessor(auto_terminated_relationships=["success"],
processor_location_x=900,
processor_location_y=600)
create_update_script.insert_custom_properties(
script_file=create_update_script_path,
module_directory=module_directory,
graphql_endpoint=graphql_endpoint,
graphql_update_query=update_query,
graphql_create_query=create_query,
graphql_search_query=search_query,
user_profile=user_profile,
# the create query for the DF Group
create_group_query=create_group_query,
# the search query for the DF Group
search_group_query=search_group_query)
it appear in nifi ui that it make a new property called Script File with the path that i passed to it but it should put it in the property that is define by the groovyscript , i don;t know why it duplicated the property name and don't pass the path to the Script File that is defined by the script , here is the result that i get in nifi ui . also the same thing appear in failure strategy


