Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/404#discussion_r224444148
  
    --- Diff: libminifi/src/capi/Plan.cpp ---
    @@ -35,6 +36,41 @@ 
ExecutionPlan::ExecutionPlan(std::shared_ptr<core::ContentRepository> content_re
       stream_factory = 
org::apache::nifi::minifi::io::StreamFactory::getInstance(std::make_shared<minifi::Configure>());
     }
     
    +std::shared_ptr<core::Processor> ExecutionPlan::addCallback(void *obj, 
void (*fp)(processor_session *)) {
    +  if (finalized) {
    +    return nullptr;
    +  }
    +
    +  utils::Identifier uuid;
    +  id_generator_->generate(uuid);
    +
    +  auto ptr = 
core::ClassLoader::getDefaultClassLoader().instantiate("CallbackProcessor", 
uuid);
    +  if (nullptr == ptr) {
    +    throw std::exception();
    --- End diff --
    
    I agree we should probably do this. At the time this was created there was 
no discussion of that type of work -- happy to make a follow on ticket -- and I 
have -- https://issues.apache.org/jira/browse/MINIFICPP-639


---

Reply via email to