We are using a loop based on extracted value. If the value exists it will go to "Else".
Problem: Once it finds the value, for all subsequent iterations, it consider it exists. Is it possible to flush the extracted variable after the iteration is over?
I thought you were testing if the variable extractor exists and you were using that condition inside your loop. But if i understand correctly you are checking the content of your variable extractor and not the fact that it exists or not correct?
Something like context.variableManager.setValue("MyExtractor","foo"); where MyExtractor is the name of your variable extractor.