cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I would like to write a script to increment value of a Global Parameter by 1 and when it reaches a number say 10 then Stop the process further.

How do I frame my script ?

View Entire Topic
0 Likes

Global Variable: $G_TIME_LOOP , integer, initial value = 1

Script Before dataflow:
print('Loop number = ' || $G_TIME_LOOP);

Script After:

IF
($G_TIME_LOOP = 10)
begin
print('Loop finish number = ' || $G_TIME_LOOP);
raise_exception_ext('JOB FINISH', 0);
end
else
begin

$G_TIME_LOOP = $G_TIME_LOOP+1;
end;

0 Likes

Hi nikhaenko,

It would be really helpful if you could help me with this scenario. I am trying to achieve the same by following your syntax however I am not getting the results as expected. The process is running but not getting into the loop. It ends without even executing the dataflow once.

Thanks

Shubham

balazsbence95
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi shubham54498,

I cannot see any function provided that is capable of re-executing the task in a postload script.
The functions are listed here.

What you may try is using the exec() function to execute a command that triggers a task execution via runTask SOAP web service function. But somebody else here in this Community might have a better and sophisticated best practice for that.

Regards,
Bence