[
https://issues.apache.org/jira/browse/MINIFICPP-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16710204#comment-16710204
]
ASF GitHub Bot commented on MINIFICPP-682:
------------------------------------------
Github user arpadboda commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/448#discussion_r239105384
--- Diff: nanofi/include/api/nanofi.h ---
@@ -68,60 +94,173 @@ typedef int c2_start_callback(char *);
void enable_async_c2(nifi_instance *, C2_Server *, c2_stop_callback *,
c2_start_callback *, c2_update_callback *);
+/**
+ * Creates a new, empty flow
+ * @param instance the instance new flow will belong to
+ * @return a pointer to the created flow
+ **/
+flow *create_new_flow(nifi_instance * instance);
-uint8_t run_processor(const processor *processor);
-
-flow *create_new_flow(nifi_instance *);
-flow *create_flow(nifi_instance *, const char *);
+/**
+ * Creates new flow and adds the first processor in case a valid name is
provided
+ * @deprecated as there is no proper indication of processor adding
errors,
--- End diff --
The problematic case is flow being instantiated properly, but the processor
doesn't (the name is wrong for eg.).
In this case a valid flow pointer is returned, but the flow doesn't contain
any processor.
To make it worse:
-There is no function in the API to get (at least the number) of processors
in the flow
-As a valid ptr was returned, the caller could expect everything to be
fine, but that's not the case.
> 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)