bejancsaba commented on pull request #5649:
URL: https://github.com/apache/nifi/pull/5649#issuecomment-1009059912


   > I left this comment on the close PR, but will copy it here just in case:
   > 
   > > Regarding operand being an Enum vs String, I think the original intent 
of that field was to be a place for a target component id for operations that 
can target individual components, e.g., Processors. So something like a 
stop/start/restart-component operation that is targeting a single component in 
the flow rather than the entire flow could pass a component id as the operand. 
For this reason, String seems more suitable to me.
   
   Thanks for the insight. You are right for those operations of we want to 
address the individual component we would need something more dynamic. To 
address that need we could use the args to target individual components and for 
all the other operations we could utilise the knowledge provided by the design 
and pre-define the acceptable operands to make the operation more targeted 
e.g.: CLEAR (repository / connection), UPDATE (configuration, c2, agent). As I 
wrote earlier I believe it would help to write safer / more maintainable code 
on the long run. What do you think? @kevdoran 


-- 
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