<?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>topic Re: [Talend 6.2.0] doTry on setHeader does not work in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-6-2-0-doTry-on-setHeader-does-not-work/m-p/2376436#M138615</link>
    <description>Thank you zarcap, cProcessor works fine. I guess usage of cPRocessor is much more effective than using talend components as cSetHeader.</description>
    <pubDate>Fri, 02 Sep 2016 10:22:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-02T10:22:20Z</dc:date>
    <item>
      <title>[Talend 6.2.0] doTry on setHeader does not work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-6-2-0-doTry-on-setHeader-does-not-work/m-p/2376434#M138613</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am using Talend Open Studio for ESB v6.2.0 and Karaf 4.0.5. &lt;BR /&gt;Camel route (.kar) is as follows and is deployed in container/deploy&lt;BR /&gt;talend-camel floow ---&amp;gt; cDoTry --&amp;gt; cJavaDSLComponent (setHeader("X-Field").simple("${header.X-AnotherField}"))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cCatch (Exception.class)&amp;nbsp; --&amp;gt; cJavaDSLComponent (setHeader("X-Field").contant("some value"))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFinally --&amp;gt; flow continues&lt;BR /&gt;If the header.X-AnotherField exists, everything works fine. If the header does not exist, flow fails silently (no error or exception thrown) at doTry and does not continue. &lt;BR /&gt;Similar behaviour happens with fetching values to header via jsonpath. Replacing cJavaDSLComponent for cSetHeader component is same.&lt;BR /&gt;Is this intended behaviour, am I using the components wrong?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-6-2-0-doTry-on-setHeader-does-not-work/m-p/2376434#M138613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: [Talend 6.2.0] doTry on setHeader does not work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-6-2-0-doTry-on-setHeader-does-not-work/m-p/2376435#M138614</link>
      <description>Martin, just use a "CProcessor" component with the following few lines: ( copy and paste these lines in the CProcessor "basic settings"-&amp;gt;"Code" area ) 
&lt;BR /&gt;String vXAnotherField = (String)exchange.getIn().getHeader("X-AnotherField"); 
&lt;BR /&gt;if(vXAnotherField == null)&amp;nbsp; 
&lt;BR /&gt;exchange.getIn().setHeader("X-Field","some value");&amp;nbsp; 
&lt;BR /&gt;else 
&lt;BR /&gt;exchange.getIn().setHeader("X-Field",vXAnotherField);&amp;nbsp; 
&lt;BR /&gt;as shown bellow: 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/300862/blob_20160829-2120.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBG3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140453iDCB91DDABC8945B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBG3.png" alt="0683p000009MBG3.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt;you don't need to crate any try/catch block. 
&lt;BR /&gt;Hope this helps, Esteban.&amp;nbsp;</description>
      <pubDate>Tue, 30 Aug 2016 05:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-6-2-0-doTry-on-setHeader-does-not-work/m-p/2376435#M138614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-30T05:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: [Talend 6.2.0] doTry on setHeader does not work</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-6-2-0-doTry-on-setHeader-does-not-work/m-p/2376436#M138615</link>
      <description>Thank you zarcap, cProcessor works fine. I guess usage of cPRocessor is much more effective than using talend components as cSetHeader.</description>
      <pubDate>Fri, 02 Sep 2016 10:22:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-6-2-0-doTry-on-setHeader-does-not-work/m-p/2376436#M138615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-02T10:22:20Z</dc:date>
    </item>
  </channel>
</rss>

