[ 
https://issues.apache.org/jira/browse/MINIFICPP-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16641970#comment-16641970
 ] 

ASF GitHub Bot commented on MINIFICPP-637:
------------------------------------------

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

    https://github.com/apache/nifi-minifi-cpp/pull/416#discussion_r223393524
  
    --- Diff: libminifi/src/capi/api.cpp ---
    @@ -287,6 +288,41 @@ flow *create_getfile(nifi_instance *instance, flow 
*parent_flow, GetFileConfig *
       return new_flow;
     }
     
    +/**
    + * Adds processor to existing flow
    + * @param proc_name: name of the new processor
    + * @param config: config of the processor, key=value pairs separated by ';'
    + * @return:
    + *   -0: success
    + *   -1: processor cannot be instanciated
    + *   -2: invalid config string
    + *   -3: invalid property name in config string
    + */
    +uint8_t add_processor(flow *parent_flow, const char *proc_name, const char 
*config) {
    --- End diff --
    
    The configuration setting here in a public API is confusing. It requires 
that config contain delimited configuration types. In many cases this 
information is not known apriori. We need a way to augment properties at any 
point. This could mean that we run, stop, and reset the properties for any 
given processor. This would require that we reset it. I'm more of a fan of 
returning a processor when we create it and setting the properties manually ( 
could certainly have helper functions that automate this ) -- ultimately 
leading to a very strict flow of events that works across multiple languages ( 
thinking python, go, etc ) 


> extend C API to support adding processors with configuration to existing flows
> ------------------------------------------------------------------------------
>
>                 Key: MINIFICPP-637
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-637
>             Project: NiFi MiNiFi C++
>          Issue Type: Sub-task
>            Reporter: Arpad Boda
>            Assignee: Arpad Boda
>            Priority: Minor
>             Fix For: 0.6.0
>
>
> Create add_processor function that is able to extend a flow with new 
> processors. This new function also needs to support setting properties of the 
> new processor. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to