Branching on DynamicSQL Service return

Hello All,

I am having problems branching off the results of a JDBC DynamicSQL adapter service. I am running JDBC adapter version 6.0.3 on webMethods platform v6.1. against an Oracle database (v8.1.7). I am using the DynamicSQL service to execute a select statement (which allows me to dynamically create the where clause). If results are returned, I need to modify the data, if no results are returned, then I need to proceed differently.

The problem seems to be with the “results” array structure. If no records are returned, an empty structure is created. I cannot figure out how to branch on an “empty” structure.

Does anyone have any examples or ideas on how to branch on the results without looping through the results or executing another select statement to do a row count?

thanks in advance,


There is a WmPublic Service (pub.list:sizeOfList) Output will give size=0 if Results docList is empty.

So map Results to input fromList and do Branch on ‘size’


THANKS RMG!!! That did the trick.

I never understood why the adapter returns “-1” for query result field (while it returns number of affected rows for update statements)

why can’t they do the size of results list and have that as an output for select statements.

I guess we should do a wish list on this request. what do you say RMG/Michael?

  • Saurabh.


yes I am with you…

Done. Wish List URL

Post your support on this thread at advantage.



Done also.

Thanks RMG and Michael for your support for the wish list. Hope it gets implemented in the next version.

  • Saurabh.