0 Replies Latest reply on May 3, 2018 3:57 AM by Bhavneet Singh

    Facing problem with in

    Bhavneet Singh Newbie

      We tried in following rule.

       

      dialect "mvel"

      import com.****.model.DateObject;

      import com.*******.model.RuleVariables;

      import function com.***********.model.test.print;

      import com.*********.sophia.model.test;

      import com.********.model.AttributeValue;

      import java.util.List;

      import java.util.*;

      import java.util.Map;

      import com.********.model.CardOrderingRule_EXP;

      import java.lang.System;

      import java.util.HashMap;

       

      rule "Rule_11"

      lock-on-active

      agenda-group "Experiment1+CARD_Sequence_1"

       

      when

        $dateObject : DateObject($startTime : startTime, $endTime : endTime, $a : waitBlockResponse)

       

       

        Boolean($value : booleanValue) from (false)

        $r : RuleVariables(( !((attributes.get("APSPERSONA")) != null && (((String)(((AttributeValue)(attributes.get("APSPERSONA"))).getValue())) in('DESIGNER', 'PHOTOGRAPHER')))))

        RuleVariables($subscriptions : subscriptions)

         $listTest : List()

          from collect

          (

             Map(this["ENTITLE"] != null)

            from $subscriptions.values

          )

         

      then

        print("11")

        System.out.println($value)

       

       

       

       

       

        System.out.println("ListSize : " +$listTest.size());

       

       

        System.out.println(($a[2]))

        kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup('Experiment1+CARD_Sequence_17').setFocus()

      end

       

       

      Following is the error we are getting.

       

       

      Message [id=1, level=ERROR, path=com*********template/11.drl, line=24, column=0

         text=Unable to Analyse Expression ( !((attributes.get("APSPERSONA")) != null && (((String)(((AttributeValue)(attributes.get("APSPERSONA"))).getValue())) in("DESIGNER", "PHOTOGRAPHER")))):

      [Error: unable to resolve method using strict-mode: com.*******.model.RuleVariables.in(java.lang.String, java.lang.String)]

      [Near : {... NA"))).getValue())) in("DESIGNER", "PHOTOGRAPHER") ....}]

       

      Why can't it go to mvel 'in'?

      Can please some one help