0

I'm quite a newbie to Tibco BubinessWorks and sql database, but somehow I have to use Tibco to host a simple web service to query a local database.

What I want to achieve is quite simple, my process in Tibco Designer will have a activity to query the database to find customername with input customerid.

But in the case that no customer was found with specific input customerid, I would like to generate an error. And I've tried to use a "success with condition" to link my database query activity with generate error activity, but I don't know to set the xpath.

The other question is, in the case that no customername of input id is found, does the database return me an null or an empty string?

If it's a null, for the xpath, is there anything like: if(customername = null)?

Thanks!!!

1 Answer 1

3

In both cases (ie null or empty string) string-length(customername) = 0 as an XPath expression will work fine to catch the scenario where the customer id has not returned a result. Without knowing your database schema, it's difficult to show any more detail than that.

Note that you can always check the number of rows returned also, for a count of 0.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.