Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have to import data from Excel to an SQL database. The Excel data contains various parameters and their values, like P1, P1, P4, P5, etc. I have to apply business rules. Like if (P1 > 100 and P1 < 200) then insert the record in database. Similarly, in some cases, string values are also validated. Can I have any open source rule engine that contains UI to change, add, and delete the rules? I am using C# to read the Excel data and and inserting the records.

One more thing, which of the following is the best approach?

  • Read Excel data first and store every record as an object in a collection, iterate through the collection, apply business rules on every object and insert record in the database. Or

  • Read one record from Excel, apply business rules and insert the record in the database. Repeat the process for the whole Excel spreadsheet.

share|improve this question
    
Are you looking for a solution so users can manage the rules? –  JeffO Oct 7 '12 at 15:04
    
Yes Preferably! but most important is rules should be stored in some repository even if i don't have UI for ends user to change them. –  user641812 Oct 10 '12 at 5:42
    
Check the WF .NET Rule Engine or check out RuleProof from Solvono. –  Ash Apr 13 '13 at 18:35

1 Answer 1

You may look for different simple rule engines in .NET. However, in the case if you're using .NET 3.0 or later, you can use the Rules Engine of Windows Workflow Foundation without using actually Workflow.

We have done this in our project, and you are free to use SQL or XML as the back-end, and it works pretty good. You can use the IDE that comes with the Workflow examples and use that in your own application.

You may also consider the following options:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.