Multifield values not found

May 20, 2013 at 10:47 PM
Edited May 20, 2013 at 10:50 PM
I am new to clips and am finding it difficult using it in C#. My program is based on the winEx example. It is exactly the same, except for the expert system data. When a multifield object is created, the count value always remain 0 (the ES recommendations cannot be found).

Here is a small part of the .clp file where the recommendations are (like I said, it is very similar to winEx):
...........................
(defmodule RELIGIONS (import MAIN ?ALL)
             (export deffunction get-religion-list))

 (deftemplate RELIGIONS::religion
  (slot name (default ?NONE))
  (multislot theist (default any))
  (multislot afterlife (default any))
  (multislot gender-equality (default any))
  (multislot geographical (default any))
  (multislot romance (default any))
  (multislot community (default any))
  (multislot food-restrictions (default any))
  (multislot origin (default any)) 
  (multislot spiritual-beings (default any)))

(deffacts RELIGIONS::the-religion-list 
    (religion (name "christian") 
            (theist monotheist)
            (afterlife christian-afterlife)
            (gender-equality medium)
            (geographical christian-majority)
            (romance monogamous)
            (community strong)
            (food-restrictions christian-approved)
            (origin creationist)
            (spiritual-beings true))
(religion (name "islam")
            (theist monotheist)
            (afterlife islam-afterlife)
            (gender-equality bad)
            (geographical islam-majority)
            (romance polygyny)
            (community strong)
            (food-restrictions islamist-approved)
            (origin creationist)
            (spiritual-beings true)
                                                         .............................
Here is the piece of C# code where the list is supposed to be retrieved:
    ...................................
    private void UpdateReligions()
    {
        string evalStr = "(RELIGIONS::get-religion-list)";

        MultifieldValue mv = (MultifieldValue)environment.Eval(evalStr);

        List<ReligionRecommendation> ReligionRecList = new List<ReligionRecommendation>();
                                           ..........................