Hello,
i'm using Drools.Net and i'm trying to do the following:
In fact, i access a database and execute a query which returns a dataSet of
objects. After this, i put the result of my DataSet in a DataTable, then i do
the following:
(foreach DataRow dRow in dTable)
workingMemory.AssertObject(dRow);
in the drl file i wrote something that looks like that
<rule name="my Rule">
<parameter identifier="dRow">
<dotnet:class>System.Data.DataRow</dotnet:class>
</parameter>
<dotnet:condition>dRow["columnName"].Equals("toto")</dotnet:condition>
<dotnet:consequence>
something();
</dotnet:consequence>
</rule>
if i write something like this i've got an error telling me to use a
DataColumn. in this case i tried to do the following:
(foreach DataRow dRow in dTable)
workingMemory.AssertObject(dRow["columnName"]);
in the drl file i wrote something that looks like that
<rule name="my Rule">
<parameter identifier="dRow">
<dotnet:class>System.Data.DataColumn</dotnet:class>
</parameter>
<dotnet:condition>dRow["columnName"].Equals("toto")</dotnet:condition>
<dotnet:consequence>
something();
</dotnet:consequence>
</rule>
BUT
is there a way to put in working memory the row and then to manipulates the
columns in the drl file ?? For the time being if i do like this i have to
put,for each row, in the workingMemory all the column that i need to test
thanks for ur help,
Regards,
Eliane