Outputing a data flow from a loop in a java component

One Star

Outputing a data flow from a loop in a java component

I have a problem with some java code. I need to do a search in a java component to a special database which returns me an array of variables.
What I need to do is loop through that array and using java methods output information for each variables like a tFileDelimited would do for each line of text.
Is that possible or do I have to find a work around?
One Star

Re: Outputing a data flow from a loop in a java component

Hey,
I have a similar situation.
Through an API I retrieve an Array of Objects. What I need to do is iterate through this array, extract some information and AT EACH iteration send that data to the rest of my design.
Hope someone can help.
Thank you in advance.
Seventeen Stars

Re: Outputing a data flow from a loop in a java component

hi,
here some ideas to "play" with an array and a loop Smiley Happy
Not sure it's what you're looking for but if it can help you
ps : cast object type (my context variable) to an Array (String[]) type !
It will be easier coding directly in tJava componenet perhaps ....
regards
laurent
One Star

Re: Outputing a data flow from a loop in a java component

Hey,
Thanks for the answer,
I replaced the tJava componenent with a TJavaFlex componenet to send off all my Object data and it seems to work fine.
Is this the only way that this can be done? Storing an Array Objects into a context doesn't seem like an ideal solution.
Thanks