arpadboda commented on a change in pull request #489: MINIFICPP-740: Add 
ability to run NiFi processors from Java and Python
URL: https://github.com/apache/nifi-minifi-cpp/pull/489#discussion_r259891204
 
 

 ##########
 File path: extensions/expression-language/Expression.cpp
 ##########
 @@ -58,20 +58,27 @@ Expression make_static(std::string val) {
   return Expression(Value(val));
 }
 
-Expression make_dynamic(const std::function<Value(const Parameters &params,
-                                                  const 
std::vector<Expression> &sub_exprs)> &val_fn) {
+Expression make_dynamic(const std::function<Value(const Parameters &params, 
const std::vector<Expression> &sub_exprs)> &val_fn) {
   return Expression(Value(), val_fn);
 }
 
 Expression make_dynamic_attr(const std::string &attribute_id) {
   return make_dynamic([attribute_id](const Parameters &params, const 
std::vector<Expression> &sub_exprs) -> Value {
+
     std::string result;
     const auto cur_flow_file = params.flow_file.lock();
     if (cur_flow_file && cur_flow_file->getAttribute(attribute_id, result)) {
       return Value(result);
     } else {
-      return Value();
+      auto registry = params.registry_.lock();
+      if ( registry && registry->getConfigurationProperty( attribute_id , 
result) ) {
+        return Value(result);
+      }
+      else {
 
 Review comment:
   This branch is needless. (Maybe it was my bad in my PR) 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to