O'Reilly logo

Drools JBoss Rules 5.0 Developer's Guide by Michal Bali, Bogdan Brinzarea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting the data

As a good practice, we'll define an interface for interacting with the other system. We'll introduce a LegacyBankService interface for this purpose. It will make it easier to change the way we communicate with the legacy system. Another nice side effect is that the tests will be easier to write.

package droolsbook.transform.service; import java.util.List; import java.util.Map; public interface LegacyBankService { /** * @return all customers */ List<Map<String, Object>> findAllCustomers(); /** * @return addresses for specified customer id */ List<Map<String, Object>> findAddressByCustomerId( Long customerId); /** * @return accounts for specified customer id */ List<Map<String, Object>> findAccountByCustomerId( Long customerId); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required