kaHaleMaKai commented on a change in pull request #3543: NIFI-6388 Add dynamic
relationships to the ExecuteScript processor.
URL: https://github.com/apache/nifi/pull/3543#discussion_r298289709
##########
File path:
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/ExecuteScript.java
##########
@@ -85,13 +97,30 @@
@SeeAlso({InvokeScriptedProcessor.class})
public class ExecuteScript extends AbstractSessionFactoryProcessor {
- // Constants maintained for backwards compatibility
public static final Relationship REL_SUCCESS =
ScriptingComponentUtils.REL_SUCCESS;
public static final Relationship REL_FAILURE =
ScriptingComponentUtils.REL_FAILURE;
+ public static final String DYNAMIC_RELATIONSHIP_PATTERN_AS_STRING =
"^rel\\.[a-zA-Z_][a-zA-Z0-9]*$";
Review comment:
No need for further restrictions. I had accepted variables names for most
languages in mind (python, groovy etc) – and one could than get the
relationship directly via `rel.my_relationship`.
But I'll relax the naming to the standard relationship names and prefix them
with `REL_`. They'll be available in the corresponding hash map, indexed by
string keys.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services