[
https://issues.apache.org/jira/browse/MINIFICPP-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16711545#comment-16711545
]
ASF GitHub Bot commented on MINIFICPP-682:
------------------------------------------
Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/448#discussion_r239481840
--- Diff: nanofi/include/api/nanofi.h ---
@@ -165,6 +355,31 @@ uint8_t remove_attribute(flow_file_record*, char *key);
int transmit_flowfile(flow_file_record *, nifi_instance *);
+/**
+ * Adds a custom processor for later instantiation
+ * @param name name of the processor
+ * @param logic the callback to be invoked when the processor is triggered
+ * @return 0 on success, -1 otherwise (name already in use for eg.)
+ **/
+int add_custom_processor(const char * name, processor_logic* logic);
--- End diff --
Typically the session can define a mapping of properties and can call a
"scheduling" piece before every iteration. In some cases, this could be at the
outset of execution of a custom processor. Effectively before their actions are
invoked, the processor should be configured. We can make that stipulation a
priori unless properties are dynamic, in which case we've sort of tabled that
for the interim. MINIFICPP-694 is a good follow on to that.
> C API: provide functions to create custom processors
> ----------------------------------------------------
>
> Key: MINIFICPP-682
> URL: https://issues.apache.org/jira/browse/MINIFICPP-682
> Project: NiFi MiNiFi C++
> Issue Type: Improvement
> Reporter: Arpad Boda
> Assignee: Arpad Boda
> Priority: Major
> Labels: CAPI, nanofi
> Fix For: 0.6.0
>
>
> Extend C API to:
> -Provide functions that can be used used to implement custom processor.
> -Custom processor should be able to read/update both the content and the
> attributes of flowfile, route to "failure" and "success" relationships.
> -API should support adding these custom processors to flows and invoke them
> as standalones, too.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)