[rules-users] Rules updating error

Ioannis Christodoulou io.christod at gmail.com
Fri Mar 21 02:51:09 EDT 2014


Actually any change that builds another package will cause the kiescanner
to report errors on analysing the 'myFunctionCall(myGlobalList);'
expression.
e.g. change
System.out.println("List contains:"+list);  ===> System.out.println("Global
List Variable contains:"+list);

Ευχαριστώ πολύ,
   Ιωάννης Χριστοδούλου


On Thu, Mar 20, 2014 at 11:46 PM, Michael Anstis
<michael.anstis at gmail.com>wrote:

> Are those the initial definitions?
>
> What changes to cause KieScanner to report errors?
>
> Sent on the move
> On 20 Mar 2014 21:34, "Ioannis Christodoulou" <io.christod at gmail.com>
> wrote:
>
>> I can't really make a unit test, but I can provide example drl:
>> Assuming that the rule project contains a guided decision table and a drl
>> file:
>> Guided Decision Table producing drl:
>> rule "guided rule"
>> when
>> then
>>   myFunctionCall(myGlobalList);
>> end
>>
>> The drl file:
>> import java.util.List;
>> global java.util.List myGlobalList;
>>
>> function void myFunctionCall(List aList) {
>>   System.out.println("List contains:"+list);
>> }
>>
>> the rules are initiated by calling:
>> KieSession ksession = ....
>> List globalList = new ArrayList();
>> ksession.setGlobal("myGlobalList", globalList);
>>
>> On Thu, Mar 20, 2014 at 9:23 PM, Michael Anstis <michael.anstis at gmail.com
>> > wrote:
>>
>>> Ok.
>>>
>>> You are correct (1) is a known issue that I am working on at the moment.
>>>
>>> Can you give illustrative DRL for the original rule and updated rule
>>> that causes problems for (2). It would help understand what could be the
>>> cause (or submit a pull request containing a unit test).
>>>
>>> Sent on the move
>>> On 20 Mar 2014 19:20, "Ioannis Christodoulou" <io.christod at gmail.com>
>>> wrote:
>>>
>>>> Well, only the second actually, since my understanding (from a previous
>>>> question I sent) is that the first is a known thing (issue?).
>>>> KieScanner loads the rules project without any issues the first time
>>>> (upon application startup) but shows a validation error if the rules
>>>> project is updated (minor update, definitely not causing a validation
>>>> error),
>>>> reporting that it cannot Analyze the expressions involving the global
>>>> variable and the function.
>>>>
>>>> Ευχαριστώ πολύ,
>>>>    Ιωάννης Χριστοδούλου
>>>>
>>>>
>>>> On Thu, Mar 20, 2014 at 9:02 PM, Michael Anstis <
>>>> michael.anstis at gmail.com> wrote:
>>>>
>>>>> From what I can gather from your email there are two problems. Please
>>>>> confirm and then we can comment further:
>>>>>
>>>>> (1) Validation of a guided decision table, that uses a global, reports
>>>>> a validation error.
>>>>>
>>>>> (2) Changes to the decision table's use of a global is not being
>>>>> detected bt KieScanner.
>>>>>
>>>>> Sent on the move
>>>>> On 20 Mar 2014 11:28, "Ioannis Christodoulou" <io.christod at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> In my java ee application, I use drools 6.1.0.Beta1, deployed on
>>>>>> jboss eap 6.2 (I have also deployed Kie Workbench 6.0.1.Final).
>>>>>>
>>>>>> In order to get the latest updates on my rules (made on kie wb) I
>>>>>> tried to set kiescanner to "LATEST". This seems to not be working always
>>>>>> (I'm not 100% sure about the reason, it seems to happen when I have not
>>>>>> re-deployed the jar with the model classes I use in my rules, or I have not
>>>>>> clicked on build&deploy of the rules project), so I have reverted to using
>>>>>> "1.0" as the version and not changing the version when I update the rules
>>>>>> project.
>>>>>>
>>>>>> There is an issue with the application not validating, because I have
>>>>>> a guided decision table which uses a global variable and a function, but
>>>>>> that seems to not be an error after all (everything seems to build as it
>>>>>> should).
>>>>>>
>>>>>> However, while my application is running (and watching for updates
>>>>>> through scanner), if I make an update and deploy the rules project again,
>>>>>> the application retrieves the update and fails with a validation error
>>>>>> about not being able to analyse the expressions regarding the global
>>>>>> function and the global variable.
>>>>>>
>>>>>> Any suggestions?
>>>>>>
>>>>>> Thank you very much.
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> rules-users mailing list
>>>>>> rules-users at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> rules-users mailing list
>>>>> rules-users at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140321/ae1651f5/attachment.html 


More information about the rules-users mailing list