We need to create a dynamic Rules Engines to validate the user’s data according to condition.
Suppose we have a form where we need to collect user data and the form have different fields such as Name, email id, phone number etc.
Now consider we have a field bank account number, and this field must be validated according to the conditions provided by the user (ex. bank country, currency, payment method, etc).
So, we need to create the rules in the CAMUNDA DMN according to these conditions for phone number, so that we can use it to validate it.
There can be multiple rules for a single field phone number.
For ex. for country - Australia and Currency - AUD, there might a condition that phone number must be of 25 characters.
And other rules it to be that the fields must be mandatorily filled by the user.
Likewise, there can be multiple rules for phone number for different country and currencies combination.
Also, all those combinations can be fetched from DB and can be utilized dynamically during evaluation of conditions.
So, we need a dynamic DMN architecture to store such kind of rules for all the fields(datapoints) and to evaluate according to the DMN rules inputs.