[
https://issues.apache.org/jira/browse/NIP-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935638#comment-17935638
]
Joe Witt commented on NIP-5:
----------------------------
Payne proposed the annotation should accept a string which will be used to
document why RunOnce is not supported. We could optionally render this in the
UI somehow or the automated docs perhaps. But notably it has the developer
explain why so someone else does not come along later and simply remove the
annotation.
> Add Behavior Annotation to Disallow the use of 'Run Once'
> ---------------------------------------------------------
>
> Key: NIP-5
> URL: https://issues.apache.org/jira/browse/NIP-5
> Project: NiFi Improvement Proposal
> Issue Type: Task
> Reporter: Joe Witt
> Priority: Major
>
> *Motivation and description*
> Some components aren't actually designed such that they can do useful work
> when triggered with 'run once'. Components like MergeContent, and Kafka
> components, and others for the user will do nothing in such a mode which
> leads to confusion. We should remove or make not selectable in the UI 'Run
> Once' for such components which means extension developers need to be able to
> annotate such behavior.
> *Scope*
> In nifi-api, the expected changes are:
> * new class in action/annotation/behavior called DisallowRunOnce modelled on
> TriggerSerially as a simple marker annotation
> *Compatibility*
> Components without this annotation will continue to behave as they do today
> which is the user would see the ability to run-once.
> *Verification*
> Once this marker annotation exists subsequent framework updates can honor it
> and prevent the user from invoking 'run once' on such components that use it.
> *Alternatives*
> A different style annotation such as 'SupportsRunOnce' which lets a boolean
> indicate true or false. But this seems verbose. We either want run once by
> default or not and the annotation we select can simply convey the opposite.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)