Forum Discussion
JimL
15 years agoContributor
Hi,
I've been continuing trying to figure out how to go about doing what I described in the earlier post above, but am really stuck on the following:
I think that I should be able to follow the pattern that I eventually used in the earlier thread that I linked in the 1st post, but include Groovy code in the startup to read lines from the file with the different usernames, and then use the info from a line from the file to populate a property.
The problem that I'm having is trying to understand how the code in the startup script is suppose to do that for all/each of the text lines in the file?
Does the Groovy script have to somehow, on its own, keep track of which line in the file is the "next" line, and then read all the lines up to the "next" line, and then populate the property? Also, if that's the case, how can it keep track of the "next" line, i.e., does it have to write (for example) a line number to some temporary file that can then get picked up the next time the startup script is invoked?
Sorry if I seem confused (because I am
). Maybe I'm "missing" something conceptually?
Thanks,
Jimj
I've been continuing trying to figure out how to go about doing what I described in the earlier post above, but am really stuck on the following:
I think that I should be able to follow the pattern that I eventually used in the earlier thread that I linked in the 1st post, but include Groovy code in the startup to read lines from the file with the different usernames, and then use the info from a line from the file to populate a property.
The problem that I'm having is trying to understand how the code in the startup script is suppose to do that for all/each of the text lines in the file?
Does the Groovy script have to somehow, on its own, keep track of which line in the file is the "next" line, and then read all the lines up to the "next" line, and then populate the property? Also, if that's the case, how can it keep track of the "next" line, i.e., does it have to write (for example) a line number to some temporary file that can then get picked up the next time the startup script is invoked?
Sorry if I seem confused (because I am

Thanks,
Jimj