Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Problem with simple evaluation and rerunning transformation.

$
0
0
Hi all,

I'm relatively new to PDI and have a question regarding the use of "Simple Evaluation." I have created a job that calls an API and initiates a data export. The vendor requires us to 1) define the export and 2) initiate a "sync" process, which will stage the data on their end for retrieval. My job can successfully create an export and begin the sync process, but at that point I run into an issue.

The vendor has an api endpoint like http://.../api/sync/{id} wherein you pass an id and they return a json response with a "status" value. There is no way to know in advance how long it will take to complete the staging process, so I must simply check that json response until I get either a "success" or possibly some error message.

This basically necessitates a "while" loop, which I know is not generally supported in PDI. I have, however, created something at the job level that should, in theory, work... but it gives unexpected results.

I have a "sync check" transformation that sends output rows to "Simple evaluation," which in turn checks the status value and if it is does NOT contain "success" it then proceeds to a "Wait for" step, which waits for a minute and then re-triggers the "sync check" transformation...

The problem I have is that it appears this "sync check" transformation (GET request) is not actually re-initiated, but rather the result from the previous execution is passed on as a result. I know this because I have checked a sync manually and saw that the status value is indeed "success," while the "sync check" transformation is returning "pending."

Any help is appreciated. Please see screenshot.
Attached Images

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>