From cd0b289146cc4a2d893a58adebd3dca013a866a0 Mon Sep 17 00:00:00 2001 From: Paul Grey Date: Wed, 23 Mar 2022 11:13:31 -0400 Subject: [PATCH] NIFI-9824 - Address WARN log message in ProcessorAuditor on action RunOnce This closes #5890 Signed-off-by: David Handermann --- nifi-api/src/main/java/org/apache/nifi/action/Operation.java | 3 ++- .../src/main/java/org/apache/nifi/audit/ProcessorAuditor.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nifi-api/src/main/java/org/apache/nifi/action/Operation.java b/nifi-api/src/main/java/org/apache/nifi/action/Operation.java index 99b9495573..1a199c5249 100644 --- a/nifi-api/src/main/java/org/apache/nifi/action/Operation.java +++ b/nifi-api/src/main/java/org/apache/nifi/action/Operation.java @@ -39,7 +39,8 @@ public enum Operation { StopVersionControl("Stop Version Control"), CommitLocalChanges("Commit Local Changes"), RevertLocalChanges("Revert Local Changes"), - ChangeVersion("Change Version"); + ChangeVersion("Change Version"), + RunOnce("RunOnce"); private final String label; diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java index 4345b64c4c..50b132f0cd 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/audit/ProcessorAuditor.java @@ -263,6 +263,8 @@ public class ProcessorAuditor extends NiFiAuditor { processorAction.setOperation(Operation.Stop); } else if (ScheduledState.DISABLED.equals(scheduledState)) { processorAction.setOperation(Operation.Enable); + } else if (ScheduledState.STOPPED.equals(scheduledState)) { + processorAction.setOperation(Operation.RunOnce); } } actions.add(processorAction);