Skip to main content
Solved

how to set reader to start only after precedent procedures completed?


chelseawu
Contributor
Forum|alt.badge.img+14

Hello, I am working on a project which will fetch information and save to local machine, then I use xsd-driven-xml reader to read in the files to parse data down streams. 

I noticed that reader activate before HTTPCaller task and caused the httpcaller failed to create file in the designated location. How to specify the reader to activate only if my HTTPCaller successful? 

I have already have the tester set up and will be able to tell either failed or success, but xsd-driven-xml reader did not have condition parameter setting or anything for me to make sure it activate after tester passed. 

I can separate this into two workspace, or create custermized transformer to encapsulate some condition tester and xml reader together, but thought there might be better way and would like to ask for help here. 

Any information is appreciated. 

Best answer by liamfez

You could use a FeatureReader, instead of a standard Reader, and connect it downstream of the HTTPCaller. That way the results of the HTTPCaller can be used to activate the FeatureReader. You could also add in some tests or filtering between the two if required.

View original
Did this help you find an answer to your question?

3 replies

chelseawu
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • July 3, 2024

actually customized reader transformer might not work after I thought through it… 

May still need two separate workspace...


liamfez
Influencer
Forum|alt.badge.img+40
  • Influencer
  • Best Answer
  • July 3, 2024

You could use a FeatureReader, instead of a standard Reader, and connect it downstream of the HTTPCaller. That way the results of the HTTPCaller can be used to activate the FeatureReader. You could also add in some tests or filtering between the two if required.


chelseawu
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • July 3, 2024

Ha, you’re right!!!  This one works so much better than I use xsd-driven-xml reader directly.. 

Thank you so much! 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings