<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to handle failure of NiFi ExecuteProcess processor while it doesn't have a failure relationship in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-failure-of-NiFi-ExecuteProcess-processor-while/m-p/233956#M67434</link>
    <description>&lt;P&gt;The first solution works! Thanks &lt;A rel="user" href="https://community.cloudera.com/users/641/mburgess.html" nodeid="641" target="_blank"&gt;@Matt Burgess&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here's the RouteOnAttribute configurations. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="38543-screenshot-from-2017-09-06-17-29-33.png" style="width: 777px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14690iCD0113B5A31023B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="38543-screenshot-from-2017-09-06-17-29-33.png" alt="38543-screenshot-from-2017-09-06-17-29-33.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 00:08:24 GMT</pubDate>
    <dc:creator>MahmoudYusuf</dc:creator>
    <dc:date>2019-08-18T00:08:24Z</dc:date>
    <item>
      <title>How to handle failure of NiFi ExecuteProcess processor while it doesn't have a failure relationship</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-failure-of-NiFi-ExecuteProcess-processor-while/m-p/233954#M67432</link>
      <description>&lt;P&gt;I am trying to execute a job by the use of ExecuteProcess processor to run the shell command that executes this job.&lt;/P&gt;&lt;P&gt;But if the shell command failed, the error messages only appear in the log (at the top right of the processor) but the processor doesn't have a failure relationship. I want to handle the case of failure to do some action or send emails.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 21:20:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-failure-of-NiFi-ExecuteProcess-processor-while/m-p/233954#M67432</guid>
      <dc:creator>MahmoudYusuf</dc:creator>
      <dc:date>2017-08-29T21:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle failure of NiFi ExecuteProcess processor while it doesn't have a failure relationship</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-failure-of-NiFi-ExecuteProcess-processor-while/m-p/233955#M67433</link>
      <description>&lt;P&gt;You may be better served with &lt;A target="_blank" href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.3.0/org.apache.nifi.processors.standard.ExecuteStreamCommand/index.html"&gt;ExecuteStreamCommand&lt;/A&gt; rather than ExecuteProcess for this case. You could schedule a GenerateFlowFile at the same rate your ExecuteProcess was scheduled for, and set Ignore STDIN to true in ExecuteStreamCommand. Then the outgoing flow files will have the execution.status attribute set, which you can use with &lt;A target="_blank" href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.3.0/org.apache.nifi.processors.standard.RouteOnAttribute/index.html"&gt;RouteOnAttribute&lt;/A&gt; to handle failures (non-zero exit codes, e.g.)&lt;/P&gt;&lt;P&gt;If you must use ExecuteProcess, perhaps you could run your shell command followed by a double-bar and a command that prints something you can check for later, such as:&lt;/P&gt;&lt;PRE&gt;myCommand || echo "!ERROR!"&lt;/PRE&gt;&lt;P&gt;I haven't tried this so I don't know if that would work, but if it does it would allow you to use &lt;A target="_blank" href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.3.0/org.apache.nifi.processors.standard.RouteOnContent/index.html"&gt;RouteOnContent&lt;/A&gt; to check for that error string to indicate failure. The same technique works without the || if you know what to look for in your failed command output.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 21:27:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-failure-of-NiFi-ExecuteProcess-processor-while/m-p/233955#M67433</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2017-08-29T21:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle failure of NiFi ExecuteProcess processor while it doesn't have a failure relationship</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-failure-of-NiFi-ExecuteProcess-processor-while/m-p/233956#M67434</link>
      <description>&lt;P&gt;The first solution works! Thanks &lt;A rel="user" href="https://community.cloudera.com/users/641/mburgess.html" nodeid="641" target="_blank"&gt;@Matt Burgess&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here's the RouteOnAttribute configurations. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="38543-screenshot-from-2017-09-06-17-29-33.png" style="width: 777px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14690iCD0113B5A31023B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="38543-screenshot-from-2017-09-06-17-29-33.png" alt="38543-screenshot-from-2017-09-06-17-29-33.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 00:08:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-failure-of-NiFi-ExecuteProcess-processor-while/m-p/233956#M67434</guid>
      <dc:creator>MahmoudYusuf</dc:creator>
      <dc:date>2019-08-18T00:08:24Z</dc:date>
    </item>
  </channel>
</rss>

