Well outside of what I have already said the problem is a bit hard to explain, but I will do my best. I have been given 300 different exceptions and the logic associated to trigger each one. I have been asked to write a code that will pull from a sql database and run these exceptions against the sql database loan level data. The problem becomes more difficult because I have been told there are over 8,000 + additional exceptions that will be coming, in no logical order. In addition, there are attributes in the data that can control the flow of the exceptions. Ex: Right now the attribute "client" allows specific exceptions to be run, and others to not be run. This implies there are global exceptions, and client specific exceptions. I need to design a process that will incorporate both of these, and also allow users to change which exceptions run on which client at a given point in time. However even this control flow can (and likely will) change. Ex: Tomorrow the combination of Client and policy review level might control which exceptions are run, etc.. Furthermore an exception can AND DOES have minor changes by these attributes. Example the Exception of "LTV too high" could be the same on every field across clients, except the LTV portion... Please see the example right below. Client 'Brandon' LTV >=80; Client 'Karl' Ltv>=90; etc.. I was planning on handling this by making two exceptions and only running the appropriate one per client... There are a lot of ways of doing this however and i'm not convinced that is the 'most correct' methodology. The problem is compounded because I am not yet sure how to handle the situation of non-complete exception logic. Again see the example below for a non-complete exception example. Loan Purpose='Purchase' ltv>=90 Product Type = 'Fixed'; By definition the above criteria is missing Arm loans, and all loan purposes who are not purchase. HOWEVER there could be another exception given later like below... Loan Purpose='Purchase' ltv>=90 Product Type = Arm; Which covers the arm problem, so I am not yet sure how to encorporate all exceptions and then check for missing criteria. So really the majority of the job is an "exception architecture" instead of the actual coding of the exceptions... I could always just code independent if statements for EVERY exception, and then drop the exceptions that I don't want at the attribute levels that they're not needed at (client and policy review for example). However since I will be running thousands of exceptions every time a loan is completed this is not efficient enough, hence why I asked the question to dynamically create the If - then statements... Also the independent if then statements will be extremely hard to de-bug, etc.. if there are over 9,000 of them. I hope that is in depth enough, please let me know if you have any clarifying questions!
... View more