I am having to populate an N rows X 3 column StringTable where the N rows are obtained from a database table (through a query).
I am running a service to get the ResultSet, then loop through the ResultSet and map the results[i] document’s fields to the StringTable (in a field-by-field manner). When setting the values, I am using the indexing property of the Map “link” to do this.
When looping, I am setting the ROW index to the value of “$iteration minus 1” because the StringTable indexes run from 0 to N-1 while the ResultSet index runs from 1 to N.
I am obtaining the value of “$iteration minus 1” through another service that accepts a String and returns a String (var name = iterationMinusOne) with the numeric value reduced by 1. In the index specification fields of the Map link, i indicate a regular expression for webMethods to evaluate viz. %iterationMinusOne%.
I have also tried this using the output of another service that returns iterationMinusOne as a datatype Object (with a constraint of Ingeter i.e. Integer Object).
The problem is that, In both these cases, the resulting StringTable is inconsistently populated. I don’t see a Nx3 array, and I see a lot of the fields populated as null and overwritten with the last ResultSet field. A simpler service showed that %iterationMinusOne% when iterationMinusOne is a “String” leads to erratic behaviour. My closest guess is that the variable iterationMinusOne needs to be of a particular datatype or must use a specific regular expression to decipher.
Also, are there more regular expression operators within webMethods 6.0 that can do enhanced operations over the % signs??
Please advise if you have a solution to this problem or a direction to proceed. Any help is greatly appreciated …
Sincere Regards,
Shankar Balakrishnan
June 11, 2003.
#webMethods#Integration-Server-and-ESB#webMethods-General#webMethods-Architecture