So I discovered that the actual problem is caused by the the web service connector/flow mechanism.
When the adapter returns no rows from the DB the flow returns an empty document, representing the row, as this has to be in the flows output for it to return any information.
This is the empty row being shown in the table!
I use an async command LINK to action a method which inserts new rows but when attempting the same using the row shown, the log just reports that the row is not found
row not found: __row
I noted that the row has an index/id of “_row” whereas when I add a new row using the add row button the index shows as “_row_new***” (where *** is a random number).
This is the provider at before render response
******************ROW COUNT 1
******************ID null
******************INDEX -1
I think that the easiest solution would be to somehow remove the empty initial row from the provider in the before render response so I set the result of the web service & the provider both to null as below.
if (getProvider().getRowIndex() < 0) {
getWebService().getResult().setResults(null);
getProvider().setArray(null);
}
This gives me a table without the blank row, now I add a row using the add row button and update as normal but get a null pointer when testing the provider for row values.
getProvider().getValue("field1");
I understood the provider would be aligned on the row selected as it is normally so maybe setting it to null is wrong but I can’t see how else to set it to empty & not show the empty row
Any thoughts?
Thanks
#webMethods#webMethods-BPMS#MWS-CAF-Task-Engine