[
https://issues.apache.org/jira/browse/MINIFICPP-617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646390#comment-16646390
]
ASF GitHub Bot commented on MINIFICPP-617:
------------------------------------------
Github user arpadboda commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/404#discussion_r222249496
--- 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 --
Why don't we define a dedicated exception type for this?
> Introduce previously created python example
> -------------------------------------------
>
> Key: MINIFICPP-617
> URL: https://issues.apache.org/jira/browse/MINIFICPP-617
> Project: NiFi MiNiFi C++
> Issue Type: New Feature
> Reporter: Mr TheSegfault
> Assignee: Mr TheSegfault
> Priority: Major
>
> I've had this sitting around a while. I've re-based and tested to ensure it
> still works. has some bugs but is a simple proof of concept.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)