Business Rules on Bluemix, constructors and interceptors
usiddiqui 270002MWB6 Visits (10711)
If you are an existing IBM Operational Decision Manager (ODM) user, using the Busi
Yes, but not quite ...
If you work with a Java XOM, objects are instantiated using JAXB during rule execution on Bluemix. This means that default constructors will be used to instantiate the objects, and the code in the non-default constructors will not be invoked, potentially affecting the correctness of your application.
If you do have non-default constructors, refactor the code so that the processing in the non-default constructors is performed in another method, which can be invoked after the default constructor is called (in the initial actions of the ruleflow, for example). Also make sure that the default constructor is visible in the BOM.
You should also be aware that interceptors are not supported by the Business Rules service on Bluemix, so design your application to not depend on interceptors when working with the Business Rules service.
Let us know what you think!