| ILOG Rules for .NET User Guides > Rule Studio > Executing Rules > Reloading a Ruleset at Runtime |
Reloading a Ruleset at Runtime |
PREVIOUS NEXT |
The method to load a new ruleset at runtime is RuleSet.LoadBinaryRuleSet.
FileStream stream = new FileStream( brcFilePath, FileMode.Open, FileAccess.Read, FileShare.Read); engine.RuleSet.LoadBinaryRuleSet(stream); stream.Close(); engine.Execute();
In a production environment your application needs to be aware of changes to the generated ruleset file.
For this, you can add a file system watcher to your application. In the RuleSet Hot Update sample, a post-build event puts the generated ruleset in a specific directory, and a FileSystemWatcher object checks file creations in this directory.
Creating an Engine and Executing a Ruleset | Retrieving Data and Events From the Engine | Setting an Exception Handler on the Engine Execution | Ruleset Hot Update Sample
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |