szaszm commented on a change in pull request #1252:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1252#discussion_r816000884



##########
File path: libminifi/include/core/ProcessGroup.h
##########
@@ -207,11 +199,18 @@ class ProcessGroup : public CoreComponent {
     return nullptr;
   }
   // findProcessor based on UUID
-  std::shared_ptr<Processor> findProcessorById(const utils::Identifier& uuid, 
Traverse traverse = Traverse::IncludeChildren) const;
+  Processor* findProcessorById(const utils::Identifier& uuid, Traverse 
traverse = Traverse::IncludeChildren) const;
   // findProcessor based on name
-  std::shared_ptr<Processor> findProcessorByName(const std::string 
&processorName, Traverse traverse = Traverse::IncludeChildren) const;
+  Processor* findProcessorByName(const std::string &processorName, Traverse 
traverse = Traverse::IncludeChildren) const;
+
+  void getProcessorController(const std::string& name, 
std::vector<state::StateController*>& controllerVec,
+    const 
std::function<std::unique_ptr<state::ProcessorController>(Processor&)>& 
controllerFactory);
+
+  void getAllProcessors(std::vector<Processor*>& processor_vec) const;
+
+  void getAllProcessorControllers(std::vector<state::StateController*>& 
controllerVec,
+    const 
std::function<std::unique_ptr<state::ProcessorController>(Processor&)>& 
controllerFactory);

Review comment:
       I don't think `ProcessGroup` should be concerned with the existence of 
`ProcessorController`s, because it's related to running the flow, not the flow 
graph itself. I suggest moving back the functionality to `FlowController`, but 
keeping the functions separated. This doesn't apply to `getAllProcessors`, only 
to `getProcessorController` and `getAllProcessorControllers`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to