Page 1 of 1

Parameter value file is apparently not being read

Posted: Tue Sep 08, 2015 11:42 am
by iq_etl
I'm storing a total page count from a Web service in a parameter value file, then attempting to access that value in a sequence loop in order to loop through that total number of pages. However, as long as I'm writing the parameter value file and calling it from the loop in the same sequence, the parameter appears to be using its default value.

My sequence looks like this:

<a href="http://i.imgur.com/W0l0UvE.jpg">[img]ht ... l0UvEl.jpg[/img]</a>

In the current configuration, the get_total_page_count returns 104 pages and writes it successfully to the total_pages parameter value. But the loop runs from "1 to 1" as if total pages is 1 -- and that is the parameter's default value, even though it is clearly receiving the value file value.

However, if I remove the "get_total_page_count" job from the sequence, the loop picks up the correct value and loops repeatedly.

What is up with that?

I've attempted inserting a wait for file activity before the loop to make sure the parameter value file is getting written, and it is. I then noticed that the "get_total_page_count" job was finishing in the same second that "start_page_loop" started and wondered if the file wasn't getting written and closed in time. So I inserted a loop in between them that took 3 seconds. Still no luck.

Any help would be appreciated.

Kelly

Posted: Tue Sep 08, 2015 2:15 pm
by iq_etl
I may have found my solution.

As I understand it, parameter values are set when a job is compiled and can't be changed while the job is running. However, I thought I had read that using a parameter value file was a way around that limitation.

I created a new sequence to run the get_total_page_count job separately and then start the looping web call sequence and it appears to be working. I'm going to test a bit more and make sure.

Posted: Tue Sep 08, 2015 4:23 pm
by ray.wurlod
Your understanding is not quite correct. Parameter values are set when a job is started (not when it is compiled, apart from compiled-in values).

Posted: Wed Sep 09, 2015 8:14 am
by iq_etl
Ray,

I see. So is it the case that values read from file can not be changed during the same sequence?

Posted: Wed Sep 09, 2015 9:11 am
by chulett
Parameter values? No they cannot. That doesn't mean, however, that you can't assign them to other variables and then change those.

Posted: Wed Sep 09, 2015 1:08 pm
by rkashyap
As I understand it, parameter values are set when a job is compiled ...
OP may be referring to this issue.

Posted: Thu Sep 10, 2015 3:24 pm
by iq_etl
That is the issue I was referring to.