martinzink commented on code in PR #1334:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1334#discussion_r896555840


##########
extensions/script/ExecuteScript.h:
##########
@@ -137,13 +137,35 @@ class ExecuteScript : public core::Processor {
         engine_factory_(Success, Failure, logger_) {
   }
 
-  static core::Property ScriptEngine;
-  static core::Property ScriptFile;
-  static core::Property ScriptBody;
-  static core::Property ModuleDirectory;
+  EXTENSIONAPI static constexpr const char* Description = "Executes a script 
given the flow file and a process session. "
+      "The script is responsible for handling the incoming flow file (transfer 
to SUCCESS or remove, e.g.) as well as "
+      "any flow files created by the script. If the handling is incomplete or 
incorrect, the session will be rolled back.Scripts must define an onTrigger 
function which accepts NiFi Context "
+      "and Property objects. For efficiency, scripts are executed once when 
the processor is run, then the onTrigger method is called for each incoming 
flowfile. This enables scripts to keep state "
+      "if they wish, although there will be a script context per concurrent 
task of the processor. In order to, e.g., compute an arithmetic sum based on 
incoming flow file information, set the "
+      "concurrent tasks to 1.";
+
+  EXTENSIONAPI static core::Property ScriptEngine;
+  EXTENSIONAPI static core::Property ScriptFile;
+  EXTENSIONAPI static core::Property ScriptBody;

Review Comment:
   I noticed you fixed the constness for the properties you touched. Kudos for 
that. :+1: 
   I think this could be made const aswell.



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