<?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 [resolved] Problem with Simple in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-Simple/m-p/2329975#M99112</link>
    <description>Hello, 
  &lt;BR /&gt;I'have somes trouble with Simple code. 
  &lt;BR /&gt;We're using AMQ to transit XML message to process: 
  &lt;BR /&gt; 
  &lt;PRE&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;BR /&gt;&amp;lt;response&amp;gt;&lt;BR /&gt;	&amp;lt;sender&amp;gt;CP2&amp;lt;/sender&amp;gt;&lt;BR /&gt;	&amp;lt;method&amp;gt;createThreshold&amp;lt;/method&amp;gt;&lt;BR /&gt;	&amp;lt;userId&amp;gt;monmail@mondomaine.fr&amp;lt;/userId&amp;gt;&lt;BR /&gt;	&amp;lt;threshold&amp;gt;&lt;BR /&gt;		&amp;lt;oldId&amp;gt;SA01&amp;lt;/oldId&amp;gt;&lt;BR /&gt;		&amp;lt;startDate&amp;gt;1996-01-01&amp;lt;/startDate&amp;gt;&lt;BR /&gt;		&amp;lt;endDate&amp;gt;1996-12-31&amp;lt;/endDate&amp;gt;&lt;BR /&gt;		&amp;lt;amount&amp;gt;78,206.35&amp;lt;/amount&amp;gt;&lt;BR /&gt;	&amp;lt;/threshold&amp;gt;&lt;BR /&gt;&amp;lt;/response&amp;gt;&lt;/PRE&gt; 
  &lt;BR /&gt;I would like create a simple expression to process "method" field when the value is 'createThreshold'. So i've written the following expression 
  &lt;BR /&gt; 
  &lt;PRE&gt;"${body.response.method} == 'createThreshold'"&lt;/PRE&gt; 
  &lt;BR /&gt;At the route execution, i've that stacktrace in log: 
  &lt;BR /&gt; 
  &lt;PRE&gt;Démarrage du job QueueRouter a 11:22 20/06/2014.&lt;BR /&gt;SLF4J: Class path contains multiple SLF4J bindings.&lt;BR /&gt;SLF4J: Fou&lt;/PRE&gt;
 &lt;BR /&gt;&lt;BR /&gt;To see the whole post, download it &lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mcko" target="_blank"&gt;here&lt;/A&gt;</description>
    <pubDate>Sat, 16 Nov 2024 11:36:37 GMT</pubDate>
    <dc:creator>hvanderheyden</dc:creator>
    <dc:date>2024-11-16T11:36:37Z</dc:date>
    <item>
      <title>[resolved] Problem with Simple</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-Simple/m-p/2329975#M99112</link>
      <description>Hello, 
  &lt;BR /&gt;I'have somes trouble with Simple code. 
  &lt;BR /&gt;We're using AMQ to transit XML message to process: 
  &lt;BR /&gt; 
  &lt;PRE&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;BR /&gt;&amp;lt;response&amp;gt;&lt;BR /&gt;	&amp;lt;sender&amp;gt;CP2&amp;lt;/sender&amp;gt;&lt;BR /&gt;	&amp;lt;method&amp;gt;createThreshold&amp;lt;/method&amp;gt;&lt;BR /&gt;	&amp;lt;userId&amp;gt;monmail@mondomaine.fr&amp;lt;/userId&amp;gt;&lt;BR /&gt;	&amp;lt;threshold&amp;gt;&lt;BR /&gt;		&amp;lt;oldId&amp;gt;SA01&amp;lt;/oldId&amp;gt;&lt;BR /&gt;		&amp;lt;startDate&amp;gt;1996-01-01&amp;lt;/startDate&amp;gt;&lt;BR /&gt;		&amp;lt;endDate&amp;gt;1996-12-31&amp;lt;/endDate&amp;gt;&lt;BR /&gt;		&amp;lt;amount&amp;gt;78,206.35&amp;lt;/amount&amp;gt;&lt;BR /&gt;	&amp;lt;/threshold&amp;gt;&lt;BR /&gt;&amp;lt;/response&amp;gt;&lt;/PRE&gt; 
  &lt;BR /&gt;I would like create a simple expression to process "method" field when the value is 'createThreshold'. So i've written the following expression 
  &lt;BR /&gt; 
  &lt;PRE&gt;"${body.response.method} == 'createThreshold'"&lt;/PRE&gt; 
  &lt;BR /&gt;At the route execution, i've that stacktrace in log: 
  &lt;BR /&gt; 
  &lt;PRE&gt;Démarrage du job QueueRouter a 11:22 20/06/2014.&lt;BR /&gt;SLF4J: Class path contains multiple SLF4J bindings.&lt;BR /&gt;SLF4J: Fou&lt;/PRE&gt;
 &lt;BR /&gt;&lt;BR /&gt;To see the whole post, download it &lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mcko" target="_blank"&gt;here&lt;/A&gt;</description>
      <pubDate>Sat, 16 Nov 2024 11:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-Simple/m-p/2329975#M99112</guid>
      <dc:creator>hvanderheyden</dc:creator>
      <dc:date>2024-11-16T11:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Problem with Simple</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-Simple/m-p/2329976#M99113</link>
      <description>Hi Hervé, 
&lt;BR /&gt;Simple doesn't understand XML - that syntax works when the body is a Java Bean instead of just a String of XML. The most direct way to do this with your XML is to use XPath rather than Simple. I'll give you a couple of options. 
&lt;BR /&gt;Option 1: Just use XPath 
&lt;BR /&gt;For your predicates on your router paths, you can select the XPath language. Select it and use an XPath expression something like this: 
&lt;BR /&gt;"/response/method" 
&lt;BR /&gt;and 
&lt;BR /&gt;"/response/method" 
&lt;BR /&gt; 
&lt;BR /&gt;Option 2: Pull value with XPath, evaluate with Simple 
&lt;BR /&gt;Step 1: Add a cSetHeader component after your JMS listener and add a property to be set 
&lt;BR /&gt; - Choose the XPath Language 
&lt;BR /&gt; - Name the new header property (for instance, Response_Method) 
&lt;BR /&gt; - Set the expression to: "/response/method/text()" 
&lt;BR /&gt;Step 2: Evaluate with Simple 
&lt;BR /&gt; - In your Router predicate choose the Simple language 
&lt;BR /&gt; - Set it like this: "${header.Response_Method} == 'createThreshold'" 
&lt;BR /&gt; 
&lt;BR /&gt;Deciding which option is better really depends on your end use case, but either should get the job done 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Best Regards, 
&lt;BR /&gt;Ben</description>
      <pubDate>Fri, 20 Jun 2014 15:54:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-Simple/m-p/2329976#M99113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T15:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Problem with Simple</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-Simple/m-p/2329977#M99114</link>
      <description>Hi Ben, 
&lt;BR /&gt;Thanks for your answser. I will using xpath expression. 
&lt;BR /&gt;I was looking for the best method to evalute the method tag content, that can contains values like "*Threshold". I knew how doing that with simple... now i'know with xpath 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;"response/method"&lt;/PRE&gt; 
&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 23 Jun 2014 09:11:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Problem-with-Simple/m-p/2329977#M99114</guid>
      <dc:creator>hvanderheyden</dc:creator>
      <dc:date>2014-06-23T09:11:36Z</dc:date>
    </item>
  </channel>
</rss>

