<?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 How to access the updateattributes inside groovy script in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-access-the-updateattributes-inside-groovy-script/m-p/301158#M220531</link>
    <description>&lt;P&gt;&lt;BR /&gt;I have a custom variable in Updatedate processor( state = success), now i want to access those variable in my groovy script which is in invokescriptor processor.&lt;/P&gt;&lt;P&gt;def status= flowFile.getAttribute('status')&lt;/P&gt;&lt;P&gt;i tried below mentioned both syntax as well&lt;/P&gt;&lt;P&gt;Attemp1:&lt;BR /&gt;if( status.equals("success")){&lt;BR /&gt;//&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Attemp 2:&lt;BR /&gt;if(status == "success"){&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;the above 2 attempts flowFile.getAttribute('status') returnning null value.&lt;/P&gt;&lt;P&gt;Please correct my mistake!&lt;/P&gt;</description>
    <pubDate>Sun, 09 Aug 2020 18:03:47 GMT</pubDate>
    <dc:creator>yeskay</dc:creator>
    <dc:date>2020-08-09T18:03:47Z</dc:date>
    <item>
      <title>How to access the updateattributes inside groovy script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-access-the-updateattributes-inside-groovy-script/m-p/301158#M220531</link>
      <description>&lt;P&gt;&lt;BR /&gt;I have a custom variable in Updatedate processor( state = success), now i want to access those variable in my groovy script which is in invokescriptor processor.&lt;/P&gt;&lt;P&gt;def status= flowFile.getAttribute('status')&lt;/P&gt;&lt;P&gt;i tried below mentioned both syntax as well&lt;/P&gt;&lt;P&gt;Attemp1:&lt;BR /&gt;if( status.equals("success")){&lt;BR /&gt;//&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Attemp 2:&lt;BR /&gt;if(status == "success"){&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;the above 2 attempts flowFile.getAttribute('status') returnning null value.&lt;/P&gt;&lt;P&gt;Please correct my mistake!&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 18:03:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-access-the-updateattributes-inside-groovy-script/m-p/301158#M220531</guid>
      <dc:creator>yeskay</dc:creator>
      <dc:date>2020-08-09T18:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to access the updateattributes inside groovy script</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-access-the-updateattributes-inside-groovy-script/m-p/301691#M220802</link>
      <description>&lt;P&gt;You need to provide more information here...Is Updatedate processor an Updateattribute processor? What does&amp;nbsp;&lt;SPAN&gt;invokescriptor processor do? Are you storing an attribute called state or are you using the processor's state?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Assuming its just a variable in flowfile, your attempt 2 should work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps. If the comment helps you to find a solution or move forward, please accept it as a solution for other community members.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 09:46:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-access-the-updateattributes-inside-groovy-script/m-p/301691#M220802</guid>
      <dc:creator>SagarKanani</dc:creator>
      <dc:date>2020-08-20T09:46:59Z</dc:date>
    </item>
  </channel>
</rss>

