Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey ,
Have got a problem with while loop, probably problem is caused by variable comparison , here's my flow :
The tloop_1 settings
and tJavaRow where I've put value to variable
If I choose Loop Type as For it works ok .
Where I've made a mistake ?
Thank you
Lucjan,
((String)globalMap.get("status"))=="success"
....will never work. You want to compare the content of object, but you are comparing the objects. Consider an object as a bucket. If you put the word "success" in one bucket and "success" in the other bucket, are they are the same bucket? No. But they do hold the same word. To test for the content of the object you need to use a method called .equals. You would do this like below...
((String)globalMap.get("status")).equals("success")
This webpage explains what I said above a little better than I did.....
https://www.geeksforgeeks.org/difference-equals-method-java/
((String)globalMap.get("status"))=="success"
....will never work. You want to compare the content of object, but you are comparing the objects. Consider an object as a bucket. If you put the word "success" in one bucket and "success" in the other bucket, are they are the same bucket? No. But they do hold the same word. To test for the content of the object you need to use a method called .equals. You would do this like below...
((String)globalMap.get("status")).equals("success")
This webpage explains what I said above a little better than I did.....
https://www.geeksforgeeks.org/difference-equals-method-java/
Not a problem 🙂