2
votes

I am working on this project where my role is to develop a service that consumes standard Health insurance xml. Service has to do validations on different xml fields which involves comparing xml data with data in database tables. For now, we are assuming valiadations remain same for all insurance companies. But i doubt it will remain the same and may have different validations requirements per company. In that case, is it a good idea to use Drools rule engine and develop drl file for each company and use rule engine for xml validations

1
I hope I understand your question. Let me try. I would say that your solution lies in a proper design. Since you don't ask advice for design but for which tool is best as rule engine these days, I'd probably go for drools because is widely used and developed and it is easier to find both skilled developers and good documentation.Christian Achilli
I need to validate incoming data.. Data may change per company. Is Rule engine good fit to validate data. Do we need to have drl file for each company..pavanlapr
yes, it is. Basically a rule engine tell you what to do, and not how to do. the "what to do" concept is similar to validation. As you said, you can make a drl per company or extend some common drl for the company that has some exception to the main stream. To validate just insert an object, like a boolean, ni the working memory, and check if the object is true or false. This is one way, you can also think of some that works better in your situation.Christian Achilli
You need to clarify a few things before deciding to use Drools. How many validation rules do you have? Do you need to manage this rules from a central repository? What are your performance requirements? How complex is your domain? Who will write the validation rules?ali köksal
Sorry I missed your question. For now validations rules are few like 6 validations for this service. Rules are expected to grow as we will use same xsd for more services. I am planning to have one rule file for service. I will be writing this rules and no BAs will be working on this.pavanlapr

1 Answers

0
votes

One probable way of trying to solve this problem would be to first parse each of the comapny specific files into a common format (intermediate representation), a xml file which can be your own standard of expressing the data of the files you parsed before.

And then write the validation engine file for that particular intermediate format.

If you do this, then you can get away with a single file where all your validation rules are defined as opposed to having separate files for all the different companies.