MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / make_dynamic_attr

Function make_dynamic_attr

extensions/expression-language/Expression.cpp:92–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92Expression make_dynamic_attr(const std::string &attribute_id) {
93 return make_dynamic([attribute_id](const Parameters &params, const std::vector<Expression>& /*sub_exprs*/) -> Value {
94
95 std::string result;
96 const auto cur_flow_file = params.flow_file.lock();
97 if (cur_flow_file && cur_flow_file->getAttribute(attribute_id, result)) {
98 return Value(result);
99 } else {
100 auto registry = params.registry_.lock();
101 if (registry && registry->getConfigurationProperty(attribute_id , result)) {
102 return Value(result);
103 }
104 }
105 return Value();
106 });
107}
108
109Value resolve_user_id(const std::vector<Value> &args) {
110 std::string name;

Callers

nothing calls this directly

Calls 5

make_dynamicFunction · 0.85
lockMethod · 0.80
ValueClass · 0.50
getAttributeMethod · 0.45

Tested by

no test coverage detected