<?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 Calling Process Dynamic in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171925#M45858</link>
    <description>&lt;P&gt;I am new to the Nifi and I am searching out something like calling one process group from another process group when its success.&lt;/P&gt;&lt;P&gt;Ex: suppose I am having one process group/Process like ExecuteScript (Schedule to run daily once) which will execute some script once its success it will dynamically start another process group. else its send mail with some message.&lt;/P&gt;&lt;P&gt;It will be helpful if I get any example or reference how I can achieve this.&lt;/P&gt;&lt;P&gt;Thanks in advance.....&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2016 20:47:33 GMT</pubDate>
    <dc:creator>guru_4me</dc:creator>
    <dc:date>2016-11-10T20:47:33Z</dc:date>
    <item>
      <title>Calling Process Dynamic</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171925#M45858</link>
      <description>&lt;P&gt;I am new to the Nifi and I am searching out something like calling one process group from another process group when its success.&lt;/P&gt;&lt;P&gt;Ex: suppose I am having one process group/Process like ExecuteScript (Schedule to run daily once) which will execute some script once its success it will dynamically start another process group. else its send mail with some message.&lt;/P&gt;&lt;P&gt;It will be helpful if I get any example or reference how I can achieve this.&lt;/P&gt;&lt;P&gt;Thanks in advance.....&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 20:47:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171925#M45858</guid>
      <dc:creator>guru_4me</dc:creator>
      <dc:date>2016-11-10T20:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Process Dynamic</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171926#M45859</link>
      <description>&lt;P&gt;Your requirement is basically how NiFi works. When making a connection between two processors, you are asked (for processors where this is relevant) to make a SUCCESS or FAILURE connection.  Thus, from one processor make a success connection to the downstream processor to be triggered on success and then make a separate failure connection to the one to respond to failures (in your case, PutEmail processor).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="9304-screen-shot-2016-11-10-at-82427-am.png" style="width: 1514px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20030i81A7252E2508F90B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="9304-screen-shot-2016-11-10-at-82427-am.png" alt="9304-screen-shot-2016-11-10-at-82427-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This works the same for connections between processors as it does for connection between process groups.&lt;/P&gt;&lt;P&gt;Specifically for ExecuteScript, in the script you define success and failure as follows:&lt;/P&gt;&lt;PRE&gt;session.transfer(flowFile, REL_SUCCESS)
// or
session.transfer(flowFile, REL_FAILURE)
&lt;/PRE&gt;&lt;P&gt;For links to getting started with NiFi, see: &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="http://hortonworks.com/apache/nifi" rel="nofollow noopener noreferrer" target="_blank"&gt;http://hortonworks.com/apache/nifi&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs" rel="nofollow noopener noreferrer" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://hortonworks.com/hadoop-tutorial/learning-ropes-apache-nifi" rel="nofollow noopener noreferrer" target="_blank"&gt;http://hortonworks.com/hadoop-tutorial/learning-ropes-apache-nifi&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/getting-started.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/getting-started.html&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;For ExecuteScript specifically, see: &lt;A href="http://funnifi.blogspot.com/2016/02/executescript-processor-hello-world.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://funnifi.blogspot.com/2016/02/executescript-processor-hello-world.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:36:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171926#M45859</guid>
      <dc:creator>gkeys</dc:creator>
      <dc:date>2019-08-18T10:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Process Dynamic</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171927#M45860</link>
      <description>&lt;P&gt;Thanks for the replay, and i will try to do this.&lt;/P&gt;&lt;P&gt;But my requirement is different - Let take I have one Execute script which is crontag to run daily once and under this script i will search for 1 file which will load every month, so suppose today my crontab will run the execute script and it not find the file, so as file is not there the other process - "Load file in HDFS" will not call/start/run , and in next day when cron tag again run the execute script it will find the file then the other process should start/run but my previous step or do we have any other alternative to start my "Load file in HDFS" automatically when files are presented.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 00:21:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171927#M45860</guid>
      <dc:creator>guru_4me</dc:creator>
      <dc:date>2016-11-11T00:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Process Dynamic</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171928#M45861</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12966/guru4me.html" nodeid="12966"&gt;@Gurpreet Singh&lt;/A&gt; If I am understanding the requirement correctly, you should define REL_SUCCESS in the script if you find the file, and this is connected to the processor you want to kick off.  Define REL_FAILURE if the file is not found, and kickoff the processor you want for that fail condition.&lt;/P&gt;&lt;P&gt;For python example, see:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/35568/python-script-in-nifi.html" target="_blank"&gt;https://community.hortonworks.com/articles/35568/python-script-in-nifi.html&lt;/A&gt;
&lt;A href="https://gist.github.com/mattyb149/89205fcbc6d0e15ba024" target="_blank"&gt;https://gist.github.com/mattyb149/89205fcbc6d0e15ba024&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note the line:  session.transfer(flowFile, REL_SUCCESS)&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 02:34:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171928#M45861</guid>
      <dc:creator>gkeys</dc:creator>
      <dc:date>2016-11-11T02:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Process Dynamic</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171929#M45862</link>
      <description>&lt;P&gt;Thanks Greg, Yes it correct , but in ExecuteScript I am using Python so can I use REL_SUCCESS, can you share some  example of using REL_SUCCESS in python&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2016 01:15:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171929#M45862</guid>
      <dc:creator>guru_4me</dc:creator>
      <dc:date>2016-11-12T01:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Process Dynamic</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171930#M45863</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12966/guru4me.html" nodeid="12966"&gt;@Gurpreet Singh&lt;/A&gt;  I updated the previous answer with links to ExecuteScript using python scripts, and the important line:  session.transfer(flowFile, REL_SUCCESS) &lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2016 01:50:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171930#M45863</guid>
      <dc:creator>gkeys</dc:creator>
      <dc:date>2016-11-12T01:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Process Dynamic</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171931#M45864</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/12966/guru4me.html"&gt;Gurpreet Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/11288/gkeys.html"&gt;Greg Keys&lt;/A&gt; has provided the link you requested (ref REL_SUCCESS):  &lt;A href="http://funnifi.blogspot.com/2016/02/executescript-processor-hello-world.html"&gt;http://funnifi.blogspot.com/2016/02/executescript-processor-hello-world.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 05:12:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Calling-Process-Dynamic/m-p/171931#M45864</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-12-17T05:12:10Z</dc:date>
    </item>
  </channel>
</rss>

