Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Sammi
How to set the access right? I don't see any other option except "Upload
File"



--
View this message in context: 
http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025091.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Wolfgang Laun
The file is not accessible for me.

On 23/07/2013, Sammi  wrote:
> test.zip 
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025089.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Sammi
test.zip   



--
View this message in context: 
http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025089.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Wolfgang Laun
No file?

On 23/07/2013, Sammi  wrote:
> I am able to reproduce it (test_common.drl line 28), could you please
> confirm
> an upgrade will fix the issue?
>
> Many thanks!
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025087.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Sammi
I am able to reproduce it (test_common.drl line 28), could you please confirm
an upgrade will fix the issue?

Many thanks!



--
View this message in context: 
http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025087.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 'last modified' and 'created by' attributes for a asset showing wrong userid in Guvnor 5.4.0.final

2013-07-22 Thread vadlam
we noticed the behavior that the userid of the user who logs in first into
Guvnor after it is started up is the one that shows up for all subsequent
updates to assets irrespective of who modifies the asset.


In the RepositoryAssetService class in guvnor-webapp-core module, the
getCurrentUserName() always shows the same userid ( whoever logs in first )


log.info( "USER:" + getCurrentUserName() + " CHECKING IN asset: [" +
asset.getName() + "] UUID: [" + asset.getUuid() + "] " ); 



-
Ram
--
View this message in context: 
http://drools.46999.n3.nabble.com/last-modified-and-created-by-attributes-for-a-asset-showing-wrong-userid-in-Guvnor-5-4-0-final-tp4025060p4025086.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.ClassCastException: [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package

2013-07-22 Thread Mark Proctor
That's assuming you have done as geoffrey instructed and use the correct 
classes. Lots of examples here in this unit test, as to which classes to use:
http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.drools/drools-compiler/5.5.0.Final/org/drools/agent/KnowledgeAgentTest.java/

So first make sure you are using the correct classes and apis, as per above. 
Then do as per below, checking your client and server class paths and 
rebuilding packages on the server.

Mark
On 22 Jul 2013, at 12:24, Mark Proctor  wrote:

> Your's is a different issue. 
> 
> You either have an incorrect class path, with mixed versions. Or your client 
> and your server are using different versions. Or you didn't tell Guvnor to 
> recompile all it's packages, when you changed jar versions.
> 
> Also your try/catch would result in no actual consequence happening - which 
> would be pointless.
> 
> Mark
> On 22 Jul 2013, at 11:17, Ganesh  wrote:
> 
>> Hi David,
>> 
>> 
>> Thanks for response,
>> Exacts exception is "java.lang.ClassCastException:
>> [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package "
>> 
>> 
>> And I am not handing exception in any java code ..
>> I am just handling it in rule part.
>> 
>> ex.
>> 
>> dialect "java"
>> no-loop
>> ruleflow-group "Apply Buy Discount"
>> 
>> when
>>  /*removed*/
>> then
>> 
>> try{
>> 
>> 
>> System.out.println("==");
>> System.out.println("Apply Buy Discount");
>> System.out.println($discountPercent);
>> System.out.println($advAdditional);
>>  System.out.println("==");
>> $lql.setEndUserUnitPrice(applyDiscount($lql.getEndUserUnitPrice(),$discountPercent+$advAdditional));
>>  
>> $lql.setTotalCost(applyDiscount($lql.getTotalCost(),$discountPercent));
>>  //  update($lql);
>> 
>> }
>> catch(Exception e)
>> {
>> 
>> System.out.println(e.toString());
>> 
>> }
>> 
>> Let me know if any issue.
>> 
>> 
>> Regards
>> Ganesh Neelekani
>> India
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://drools.46999.n3.nabble.com/java-lang-ClassCastException-Lorg-drools-rule-Package-cannot-be-cast-to-org-drools-rule-Package-tp4017821p4025073.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
> 


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.ClassCastException: [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package

2013-07-22 Thread Mark Proctor
Your's is a different issue. 

You either have an incorrect class path, with mixed versions. Or your client 
and your server are using different versions. Or you didn't tell Guvnor to 
recompile all it's packages, when you changed jar versions.

Also your try/catch would result in no actual consequence happening - which 
would be pointless.

Mark
On 22 Jul 2013, at 11:17, Ganesh  wrote:

> Hi David,
> 
> 
> Thanks for response,
> Exacts exception is "java.lang.ClassCastException:
> [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package "
> 
> 
> And I am not handing exception in any java code ..
> I am just handling it in rule part.
> 
> ex.
> 
> dialect "java"
> no-loop
> ruleflow-group "Apply Buy Discount"
> 
> when
>   /*removed*/
> then
> 
> try{
> 
> 
> System.out.println("==");
> System.out.println("Apply Buy Discount");
> System.out.println($discountPercent);
> System.out.println($advAdditional);
>   System.out.println("==");
> $lql.setEndUserUnitPrice(applyDiscount($lql.getEndUserUnitPrice(),$discountPercent+$advAdditional));
>   
> $lql.setTotalCost(applyDiscount($lql.getTotalCost(),$discountPercent));
>   //  update($lql);
> 
> }
> catch(Exception e)
> {
> 
> System.out.println(e.toString());
> 
> }
> 
> Let me know if any issue.
> 
> 
> Regards
> Ganesh Neelekani
> India
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/java-lang-ClassCastException-Lorg-drools-rule-Package-cannot-be-cast-to-org-drools-rule-Package-tp4017821p4025073.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.ClassCastException: [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package

2013-07-22 Thread Ganesh
Hi David,


Thanks for response,
Exacts exception is "java.lang.ClassCastException:
[Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package "


And I am not handing exception in any java code ..
I am just handling it in rule part.

ex.

dialect "java"
no-loop
ruleflow-group "Apply Buy Discount"

when
/*removed*/
then

try{


System.out.println("==");
System.out.println("Apply Buy Discount");
System.out.println($discountPercent);
System.out.println($advAdditional);
System.out.println("==");
$lql.setEndUserUnitPrice(applyDiscount($lql.getEndUserUnitPrice(),$discountPercent+$advAdditional));

$lql.setTotalCost(applyDiscount($lql.getTotalCost(),$discountPercent));
//  update($lql);

}
catch(Exception e)
{

System.out.println(e.toString());

}

Let me know if any issue.


Regards
Ganesh Neelekani
India





--
View this message in context: 
http://drools.46999.n3.nabble.com/java-lang-ClassCastException-Lorg-drools-rule-Package-cannot-be-cast-to-org-drools-rule-Package-tp4017821p4025073.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Davide Sottara
Replacing eval( true) with Boolean( this == Boolean.TRUE ) results in a
different network configuration:
the former requires an EvalNode, the latter a JoinNode.
A few issues with EvalNode dynamic additions/removals have been found
and fixed over time,
including one that was found last week. Please do check with later versions.
Davide

p.s. there may be more robust ways to control which rules are enabled or
not at a given moment.



On 07/22/2013 11:37 AM, Wolfgang Laun wrote:
> Try some later version. 5.2.0 was the version after a major rework,
> and your problem might disappear using 5.[345].0 etc.
>
> If this doesn't help, consider posting the rule, after systematically
> obfuscating app-specific names *without removing anything*.
>
> -W
>
> On 22/07/2013, Sammi  wrote:
>> Version is 5.2.0.Final I am using.
>>
>> I am not able to reproduce the issue when I wrote a small test to simulate
>> the problem. But really by changing the line from "eval(...)" to
>> "Boolean(this == Boolean.TRUE)" then the issue was gone.
>>
>> The problematic programs are too complicated to be shown here, and it's not
>> appropriate as there are business logic in it.
>>
>> What might be the issue causing this? if anyone could shed some light It
>> would be greatly appreciated...
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025069.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.ClassCastException: [Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package

2013-07-22 Thread Davide Sottara
Could you post the exact exception, as well as the code you are using to
set up the knowledgeagent?
Adding try/catch is quite likely to break your system, since your
knowledge base won't be loaded
correctly anyway.
Davide

On 07/22/2013 07:24 AM, Ganesh wrote:
> Hi All,
>
>
>
> I fed up by this issue .. I used proper Interface and KnowledgeAgent
> But same issue again and again..
>
> At last I added try,catch block in my every rule which solved the issue.
>
>
>
> Regards
> Ganesh Neelekani
> India
>
>
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/java-lang-ClassCastException-Lorg-drools-rule-Package-cannot-be-cast-to-org-drools-rule-Package-tp4017821p4025066.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Wolfgang Laun
Try some later version. 5.2.0 was the version after a major rework,
and your problem might disappear using 5.[345].0 etc.

If this doesn't help, consider posting the rule, after systematically
obfuscating app-specific names *without removing anything*.

-W

On 22/07/2013, Sammi  wrote:
> Version is 5.2.0.Final I am using.
>
> I am not able to reproduce the issue when I wrote a small test to simulate
> the problem. But really by changing the line from "eval(...)" to
> "Boolean(this == Boolean.TRUE)" then the issue was gone.
>
> The problematic programs are too complicated to be shown here, and it's not
> appropriate as there are business logic in it.
>
> What might be the issue causing this? if anyone could shed some light It
> would be greatly appreciated...
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025069.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Notification doesn't work with eval(true) in one of the rules

2013-07-22 Thread Sammi
Version is 5.2.0.Final I am using.

I am not able to reproduce the issue when I wrote a small test to simulate
the problem. But really by changing the line from "eval(...)" to
"Boolean(this == Boolean.TRUE)" then the issue was gone. 

The problematic programs are too complicated to be shown here, and it's not
appropriate as there are business logic in it.

What might be the issue causing this? if anyone could shed some light It
would be greatly appreciated...



--
View this message in context: 
http://drools.46999.n3.nabble.com/Change-Notification-doesn-t-work-with-eval-true-in-one-of-the-rules-tp4025067p4025069.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users