Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1356#discussion_r93949217
--- Diff:
nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java
---
@@ -259,6 +264,14 @@ public void onScheduled(final ProcessContext context)
throws IOException {
context.getStateManager().setState(tempMap, Scope.LOCAL);
}
+
+ defaultActions = getDefaultActions(context.getProperties());
--- End diff --
Unless I'm missing something, moving this initialize step to the
onScheduled wouldn't affect anything regarding attribute evaluation since the
evaluation of the EL isn't done until here[1]. This is just moving the
iteration over all the properties values[2] from the ontrigger to onScheduled.
[1]
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java#L608
[2]
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java#L660
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---