0 Replies Latest reply on May 19, 2006 11:29 PM by Le Vien

    Need help with workingmemory

    Le Vien Newbie

      Hi all here,
      I'm a newcomer with drools.net, so that I have some problems needing your help:
      1. I use FileStream to load rule-set files like that:
      RuleBase ruleBase = RuleBaseLoader.LoadFromStream(new FileStream("./Drlfiles/AllRules.csharp.drl.xml",FileMode.Open));
      WorkingMemory workingMemory = ruleBase.GetNewWorkingMemory();

      My question is: how to load another file at the same time with this file (I mean we can use another ruleBase object and workingMemory object, or other means, whatever)

      2. How to refresh the working memory or refresh the value of object properties?
      In my situation, I assert an object in to workingMemory and when I want to assert another one (of the same class) into workingMemory (use the same function for this adding), I always receive the new value for properties of that object.
      Here is my code:
      {
      DeviceSum _device = new DeviceSum();
      string _deviceName = cboDevice.Text.Trim();
      // get properties from the device in the combo box.
      Getdata(_deviceName,1,_device);

      workingMemory.AssertObject(_device);
      workingMemory.FireAllRules();
      }
      P/S: I'm using Drools.net ver1.0.0.0 for .Net 1.1