2 Replies Latest reply on May 23, 2011 10:44 AM by stellina_rosa

    apply rules on a file and add an object to the session

    stellina_rosa Newbie

      Hi!

      I need to apply rules to a particular file. Let me explain: my application will launch an external program that creates some results, and these results are stored in a file (ex. result.txt). I would like to use a drools file to apply rules on this result.txt file... is there any way to do this?

      For example, my result.txt file contains:

       

      q1("Miller",38000,"New York")

      q1("Koch",2000000,"Atlanta")

      q1("Nguyen",35000,"New York")

       

      and I want a rule like this: if the string contains New York, then print "hello New York" =====> this example is for explain you what i want:

      a mechanism for manipulating the strings of a text file in a file drools.

      Please help me! THANK YOU!!!