Repository: nifi-minifi-cpp Updated Branches: refs/heads/master d5558d3c8 -> 0f5e2fa81
MINIFICPP-534 Added EL support to ExecuteProcess This closes #357. Signed-off-by: Marc Parisi <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/0f5e2fa8 Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/0f5e2fa8 Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/0f5e2fa8 Branch: refs/heads/master Commit: 0f5e2fa814bcdca2bcb4319a274db1f2b723c727 Parents: d5558d3 Author: Andrew I. Christianson <[email protected]> Authored: Thu Jun 14 05:07:56 2018 -0400 Committer: Marc Parisi <[email protected]> Committed: Wed Jun 27 15:33:32 2018 -0400 ---------------------------------------------------------------------- PROCESSORS.md | 6 +++--- libminifi/src/processors/ExecuteProcess.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/0f5e2fa8/PROCESSORS.md ---------------------------------------------------------------------- diff --git a/PROCESSORS.md b/PROCESSORS.md index 1dd4cb0..0b79963 100644 --- a/PROCESSORS.md +++ b/PROCESSORS.md @@ -171,9 +171,9 @@ default values, and whether a property supports the NiFi Expression Language. | Name | Default Value | Allowable Values | Description | | - | - | - | - | -| **Command** | | | Specifies the command to be executed; if just the name of an executable is provided, it must be in the user's environment PATH. | -| Command Arguments | | | The arguments to supply to the executable delimited by white space. White space can be escaped by enclosing it in double-quotes. | -| Working Directory | | | The directory to use as the current working directory when executing the command | +| **Command** | | | Specifies the command to be executed; if just the name of an executable is provided, it must be in the user's environment PATH.<br>**Supports Expression Language: true** | +| Command Arguments | | | The arguments to supply to the executable delimited by white space. White space can be escaped by enclosing it in double-quotes.<br>**Supports Expression Language: true** | +| Working Directory | | | The directory to use as the current working directory when executing the command<br>**Supports Expression Language: true** | | **Batch Duration** | 0 || If the process is expected to be long-running and produce textual output, a batch duration can be specified. | | **Redirect Error Stream** | false | | If true will redirect any error stream output of the process to the output stream. | http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/0f5e2fa8/libminifi/src/processors/ExecuteProcess.cpp ---------------------------------------------------------------------- diff --git a/libminifi/src/processors/ExecuteProcess.cpp b/libminifi/src/processors/ExecuteProcess.cpp index f88f5c7..db4399e 100644 --- a/libminifi/src/processors/ExecuteProcess.cpp +++ b/libminifi/src/processors/ExecuteProcess.cpp @@ -73,13 +73,14 @@ void ExecuteProcess::initialize() { void ExecuteProcess::onTrigger(core::ProcessContext *context, core::ProcessSession *session) { std::string value; - if (context->getProperty(Command.getName(), value)) { + std::shared_ptr<core::FlowFile> flow_file; + if (context->getProperty(Command.getName(), value, flow_file)) { this->_command = value; } - if (context->getProperty(CommandArguments.getName(), value)) { + if (context->getProperty(CommandArguments.getName(), value, flow_file)) { this->_commandArgument = value; } - if (context->getProperty(WorkingDir.getName(), value)) { + if (context->getProperty(WorkingDir.getName(), value, flow_file)) { this->_workingDir = value; } if (context->getProperty(BatchDuration.getName(), value)) {
