How to create business rule exception if the search value is not present in search result

In my project i have to throw some business rule exception after searching for a value in website, if it is not present in search results.

How to create business rule exception if the search value is not present in search result?

Hi @Sathish_Kumar_S ,

Use throw activity in inside of your if condition and if the search value is not available in the search result throw the business rule exception with the below expression. thanks.

new BusinessRuleException("Search Value: "+YourSearchValue+“Not present in the search”)

Hi @Sathish_Kumar_S

As @kirankumar.mahanthi1 mentioned you can implemented the code as below.

Hope this will be helpful. Thank you.