Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Need a sample java like while loop in build forge step

 I  need to have a while loop  which will execute the step  4 times.During each iteration I need to increase a counter which can be a env variable.need details example.while condition check will be done on this environment variable.

1 vote



One answer

Permanent link
 Hello,

The way it works is like this. 

You create and or set a Build Forge variable to, in your case 4. So say COUNTER=4. Whether you .bset this in the product or set it as a variable within the environment it wont matter. 

Condition:
true(${BF_ITERAT$ION}<={COUNTER})   <--- What that does is say iterate until COUNTER is = to 4. So  4 times. 

What are we iteration?
Command
echo "Whatever I want"   <--- Means this command runs 4 times, or until the value of counter is reached. 


Does this help clear it up for you?

Please also be aware you can use Thread to thread steps and or thread conditional steps to run all 4 at the same time to increase performance etc. 

Please let me know if this helps and if so, please like the answer. If not, let me know and I can try further. Thanks!

1 vote

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,020

Question asked: Sep 08 '14, 10:14 p.m.

Question was seen: 5,113 times

Last updated: Sep 11 '14, 9:43 a.m.

Confirmation Cancel Confirm