<?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: [resolved] REST web service question (run if and main data flow) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-REST-web-service-question-run-if-and-main-data-flow/m-p/2284506#M58182</link>
    <description>Thanks so much, Shong.&amp;nbsp; I will definitely try this. 
&lt;BR /&gt;I was also playing with tReplicate yesterday and had some success with that. 
&lt;BR /&gt;Thanks again!</description>
    <pubDate>Fri, 19 Feb 2016 12:25:16 GMT</pubDate>
    <dc:creator>jmceachern</dc:creator>
    <dc:date>2016-02-19T12:25:16Z</dc:date>
    <item>
      <title>[resolved] REST web service question (run if and main data flow)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-REST-web-service-question-run-if-and-main-data-flow/m-p/2284504#M58180</link>
      <description>I am creating a job that will create a RESTful web service:&lt;BR /&gt;tRESTRequest ----- business logic ----- tRESTResponse&lt;BR /&gt;This will be a POST operation with a Document.&lt;BR /&gt;As part of the business logic, I need to consume two other REST services - one of which will validate the information in the Document and the other which will post the information in the Document only IF the validate step passes.&lt;BR /&gt;So, my flow (with validation) will look something like:&lt;BR /&gt;tRESTRequest ---- tXMLMAP ----- tRESTClient (validate web service) ---- txmlMap (response) ---- tRESTResponse&lt;BR /&gt;Based on the information in the response from my validate web service, I may need to then consume a post web service.&amp;nbsp; My issue is that the original document is not the main data flow now.&amp;nbsp; The data flow is the response message from the validate web service.&lt;BR /&gt;How can I make a decision as to whether to proceed with consuming the post web service after the validate web service and have the document that came in through the original tRESTRequest?&lt;BR /&gt;I've used Run IF before but my understanding is that using this would disrupt the main flow?</description>
      <pubDate>Sat, 16 Nov 2024 10:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-REST-web-service-question-run-if-and-main-data-flow/m-p/2284504#M58180</guid>
      <dc:creator>jmceachern</dc:creator>
      <dc:date>2024-11-16T10:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] REST web service question (run if and main data flow)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-REST-web-service-question-run-if-and-main-data-flow/m-p/2284505#M58181</link>
      <description>Hi 
&lt;BR /&gt;You can cache the input request in memory for used later, and use runIf to trigger different business logic depends on the your validation result. for example:
&lt;BR /&gt;tRESTRequest ---- main--tHashOutput--oncomponentok--tHashInput--main--tXMLMAP ----- tRESTClient (validate web service) ---- txmlMap (response) -main..tJavaRow --runIf1--tHashInput--main--tXMLMap---- tRESTResponse
&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;--runIf2---tFixedFlowInput--main--tXMLMap--tRestResponse
&lt;BR /&gt;tHashInput: read the original document from memory 
&lt;BR /&gt;on tJavaRow: parse the validation result, and put the result to a global variable for used as the condition of runIf link. eg:
&lt;BR /&gt;if(input_row.columnName.equals("OK")){
&lt;BR /&gt;globalMap.put("isValid",true);
&lt;BR /&gt;}else{
&lt;BR /&gt;globalMap.put("isValid", false);
&lt;BR /&gt;}
&lt;BR /&gt;set the condition of runIf1 as:
&lt;BR /&gt;(Boolean)globalMap.get("isValid")
&lt;BR /&gt;set the condition of runIf2 as:
&lt;BR /&gt;!(Boolean)globalMap.get("isValid")</description>
      <pubDate>Fri, 19 Feb 2016 07:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-REST-web-service-question-run-if-and-main-data-flow/m-p/2284505#M58181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-19T07:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] REST web service question (run if and main data flow)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-REST-web-service-question-run-if-and-main-data-flow/m-p/2284506#M58182</link>
      <description>Thanks so much, Shong.&amp;nbsp; I will definitely try this. 
&lt;BR /&gt;I was also playing with tReplicate yesterday and had some success with that. 
&lt;BR /&gt;Thanks again!</description>
      <pubDate>Fri, 19 Feb 2016 12:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-REST-web-service-question-run-if-and-main-data-flow/m-p/2284506#M58182</guid>
      <dc:creator>jmceachern</dc:creator>
      <dc:date>2016-02-19T12:25:16Z</dc:date>
    </item>
  </channel>
</rss>

