[rules-users] Problem with Drools debuggin in Eclipse Reg:

2011-03-17 Thread Murali Venugopal


  
  
Hi,

I'm encountering a strange problem with debugging an Drools
application in Eclipse Platform. I couldn't find any help in the
internet. Also, i can't find any previous post in this mailing list.
Please try to help me.

My Platform details are below:
OS: Fedora 13 
Eclipse: Galileo
Java: JDK 1.6 Update 21
Drools version: 5.1.1

Snapshot of the Error message: 




Console Output:
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize,
TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports
initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)

Event Details:

Message:
  An internal error occurred during: "Launching DroolsTest (4)".
  
  Exception Stack Trace:
  java.lang.IncompatibleClassChangeError: Expected static method
org.drools.eclipse.launching.DroolsVMDebugger.renderCommandLine([Ljava/lang/String;)Ljava/lang/String;
  at
org.drools.eclipse.launching.DroolsVMDebugger.run(DroolsVMDebugger.java:182)
  at
org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:101)
  at
org.drools.eclipse.launching.DroolsLaunchConfigurationDelegate.launch(DroolsLaunchConfigurationDelegate.java:30)
  at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
  at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
  at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
  at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  

Thanks in advance.

Regards,
 _ _ _ _ |.
| | ||_|| (_|||  \/


  

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


Re: [rules-users] decision table problem Reg:

2011-01-11 Thread Murali Venugopal

hey wolfgang,

thanks a lot for your valuable and prompt help. it worked for me and i'm 
able to run the rule engine with a spread sheet rule.

for this, i'll be grateful to you.

event resolved:

actually "event" is imported and declared in the rule. the problem is, 
in the then part when i referred the event object i forgot to mention it 
with a preceding "$" symbol. and that was the culprit. when i was going 
through the documentation, it said the "$" symbol is not mandatory and 
it's optional.


now i've found that, using the "$" symbol is optional. buf if you use it 
on a variable declaration, it's mandatory that you've to specify on 
further reference of that variable. today's findings... :-)


spreadsheet dependency:

actually it worked for me without implementing any dependency in the 
spreadsheet. probably i should educate myself in spreadsheet stuffs.



thanks once again.

 _ _ _ _ |.
| | ||_|| (_|||  \/




On 01/11/2011 05:21 PM, Wolfgang Laun wrote:


2011/1/11 Murali Venugopal <mailto:murali.venugo...@sifycorp.com>>


Hi Wolffgang,

Thanks for your quick response. I did as you say. now my rule file
when generated from excel sheet and printed in console looks like
this.

package alertRouting;
#generated from Decision Table
import com.sify.beacon.events.RouteEvent;
import com.sify.beacon.events.trapevent.Varbind;
#From row number: 10

rule "210.210.122.100 GroupA"

when
$event : RouteEvent(nodeIp == "210.210.122.100")
$varbind : Varbind(oid == "1.3.6.1.2.1.2.2.1.1" && value
== "5")
from $event.varbindings
then
event.setGroup("GroupA");
System.out.println("set to Group A");

end

it seems that the "from" clause is in the next line as a separate
condition. so, drools have considered it as a separate condition.


DRL is free form, so line breaks don't matter.


the error message is

 error java.lang.RuntimeException: Rule Compilation error : [Rule
name='210.210.122.100 GroupA']
alertRouting/Rule_210_210_122_100_GroupA_0.java (7:397) :
event cannot be resolved


"event" is the culprit. Now where is this "event"? Has it been 
declared? Where? Perhaps a typo?...



also, i don't understand about implementing the dependency to the
cell in left. i tried logical, mathematical dependency conditions.
sorry for my ignorance.


This requires spreadsheet functions, e.g.
   =IF( D12="","","X" )
would be in E12. The cell reference is relative, so copying it dowm 
automatically changes D12 to D13, etc.


-W


please help me resolve this issue.

  _ _ _ _ |.
| | ||_|| (_|||  \/


On 01/11/2011 01:56 PM, Wolfgang Laun wrote:

There is a limit to what can be implemented using decision
tables. Some constructs are possible with hacks.

In your case, you cannot have constraints with parameters and
"from" in the same column. You need 2 adjacent columns.

CONDITION
$varbind : Varbind
oid == $1 && value == $2
the pattern and constraints
".1.3.6.1.2.1.2.2.1.1.0","5"

CONDITION

from $event.varbindings
the from clause
x
------

Note the blank cell below CONDITION. The 'x' triggers the
insertion of the from clause. (It should be possible to implement
the dependency on the cell to the left by a simple spreadsheet
formula.)

-W




2011/1/11 Murali Venugopal mailto:murali.venugo...@sifycorp.com>>
>
> hi,
>
> i'm facing a problem with decision tables. i've got a .drl
working file. but when i happen to take that into a .xls file (
decision table ) it throws some errors.
>
> my actual rule in .drl file has got something like this.
>
> when
>
> $event : RouteEvent( nodeIp == "192.168.1.12 )
> $varbind : Varbind ( oid == ".1.3.6.1.2.1.2.2.1.1.0" &&
value == "5" ) from $event.varbindings
>
> then
>
> System.out.println("some text")
>
> here in my decision table, my first cell would have the first
condition
>
> $event : RouteEvent
> nodeIp == "$param"
> that is, i've to omit my "(" and ")" braces.
>
> so now, my second condition is
>
> $varbind : Varbind
> ( oid == "$1" && value == "$2" ) from $event.varbindings
>
   

Re: [rules-users] decision table problem Reg:

2011-01-11 Thread Murali Venugopal

Hi Wolffgang,

Thanks for your quick response. I did as you say. now my rule file when 
generated from excel sheet and printed in console looks like this.


package alertRouting;
#generated from Decision Table
import com.sify.beacon.events.RouteEvent;
import com.sify.beacon.events.trapevent.Varbind;
#From row number: 10
rule "210.210.122.100 GroupA"

when
$event : RouteEvent(nodeIp == "210.210.122.100")
$varbind : Varbind(oid == "1.3.6.1.2.1.2.2.1.1" && value == "5")
from $event.varbindings
then
event.setGroup("GroupA");
System.out.println("set to Group A");

end

it seems that the "from" clause is in the next line as a separate 
condition. so, drools have considered it as a separate condition.


the error message is

 error java.lang.RuntimeException: Rule Compilation error : [Rule 
name='210.210.122.100 GroupA']
alertRouting/Rule_210_210_122_100_GroupA_0.java (7:397) : event 
cannot be resolved


also, i don't understand about implementing the dependency to the cell 
in left. i tried logical, mathematical dependency conditions. sorry for 
my ignorance.


please help me resolve this issue.

 _ _ _ _ |.
| | ||_|| (_|||  \/


On 01/11/2011 01:56 PM, Wolfgang Laun wrote:
There is a limit to what can be implemented using decision tables. 
Some constructs are possible with hacks.


In your case, you cannot have constraints with parameters and "from" 
in the same column. You need 2 adjacent columns.


CONDITION
$varbind : Varbind
oid == $1 && value == $2
the pattern and constraints
".1.3.6.1.2.1.2.2.1.1.0","5"

CONDITION

from $event.varbindings
the from clause
x
--

Note the blank cell below CONDITION. The 'x' triggers the insertion of 
the from clause. (It should be possible to implement the dependency on 
the cell to the left by a simple spreadsheet formula.)


-W




2011/1/11 Murali Venugopal <mailto:murali.venugo...@sifycorp.com>>

>
> hi,
>
> i'm facing a problem with decision tables. i've got a .drl working 
file. but when i happen to take that into a .xls file ( decision table 
) it throws some errors.

>
> my actual rule in .drl file has got something like this.
>
> when
>
> $event : RouteEvent( nodeIp == "192.168.1.12 )
> $varbind : Varbind ( oid == ".1.3.6.1.2.1.2.2.1.1.0" && value == 
"5" ) from $event.varbindings

>
> then
>
> System.out.println("some text")
>
> here in my decision table, my first cell would have the first condition
>
> $event : RouteEvent
> nodeIp == "$param"
> that is, i've to omit my "(" and ")" braces.
>
> so now, my second condition is
>
> $varbind : Varbind
> ( oid == "$1" && value == "$2" ) from $event.varbindings
>
> here i don't know how to omit the "(" and ")" braces. or should i 
add and other layer of those braces.

>
> anyway, the decision table is not working, where as my rule file does.
>
> the error message is
>
>  error java.lang.RuntimeException: [10,55]: [ERR 102] Line 10:55 
mismatched input 'FROM' expecting ')' in rule "210.210.122.100 GroupA" 
in pattern Varbind[10,77]: [ERR 102] Line 10:77 mismatched input ')' 
expecting 'then' in rule "210.210.122.100 GroupA"

>
> my doubt is,
> in the first case all my condition expression is contained with in 
braces. where as in second case, it's not. so how do i've to handle 
this. do i've have to omit the braces in the second case or not.

>
> please help me. i've been struggling to solve this error. also, i 
couldn't find references in the documentation.

> thanks in advace.
>
>  _ _ _ _ |.
> | | ||_|| (_|||  \/
>
> Whoever wants to be happy, let him be so: of tomorrow there's no knowing
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org <mailto: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




Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is add

[rules-users] decision table problem Reg:

2011-01-11 Thread Murali Venugopal

hi,

i'm facing a problem with decision tables. i've got a .drl working file. 
but when i happen to take that into a .xls file ( decision table ) it 
throws some errors.


my actual rule in .drl file has got something like this.

when

$event : RouteEvent( nodeIp == "192.168.1.12 )
$varbind : Varbind ( oid == ".1.3.6.1.2.1.2.2.1.1.0" && value == 
"5" ) from $event.varbindings


then

System.out.println("some text")

here in my decision table, my first cell would have the first condition

$event : RouteEvent
nodeIp == "$param"


that is, i've to omit my "(" and ")" braces.

so now, my second condition is

$varbind : Varbind
( oid == "$1" && value == "$2" ) from $event.varbindings



here i don't know how to omit the "(" and ")" braces. or should i add 
and other layer of those braces.


anyway, the decision table is not working, where as my rule file does.

the error message is

 error java.lang.RuntimeException: [10,55]: [ERR 102] Line 10:55 
mismatched input 'FROM' expecting ')' in rule "210.210.122.100 GroupA" 
in pattern Varbind[10,77]: [ERR 102] Line 10:77 mismatched input ')' 
expecting 'then' in rule "210.210.122.100 GroupA"


my doubt is,
in the first case all my condition expression is contained with in 
braces. where as in second case, it's not. so how do i've to handle 
this. do i've have to omit the braces in the second case or not.


please help me. i've been struggling to solve this error. also, i 
couldn't find references in the documentation.

thanks in advace.

 _ _ _ _ |.
| | ||_|| (_|||  \/

Whoever wants to be happy, let him be so: of tomorrow there's no knowing




Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at ad...@sifycorp.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools definitive list of Error Codes

2011-01-07 Thread Murali Venugopal

Oopps sorry for being lazy.

 _ _ _ _ |.
| | ||_|| (_|||  \/




On 01/07/2011 02:45 PM, Michael Anstis wrote:
The wonders of documentation 
<http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e2920>



On 7 January 2011 07:55, Murali Venugopal 
mailto:murali.venugo...@sifycorp.com>> 
wrote:



Hi,

I looking forward to find a Definitive List of Error codes and
their definitions. Please help me to find and understand them.

eg: [ERR 102], [ERR 101]


 _ _ _ _ |.
| | ||_|| (_|||  \/




Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more
with your Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or
entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If
this is a
forwarded message, the content of this E-MAIL may not have been
sent with
the authority of the Company. If you are not the intended
recipient, an
agent of the intended recipient or a  person responsible for
delivering the
information to the named recipient,  you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If
you have
received this communication in error, please delete this mail &
notify us
immediately at ad...@sifycorp.com <mailto:ad...@sifycorp.com>
___
rules-users mailing list
rules-users@lists.jboss.org <mailto: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


[rules-users] Drools definitive list of Error Codes

2011-01-07 Thread Murali Venugopal

Hi,

I looking forward to find a Definitive List of Error codes and their 
definitions. Please help me to find and understand them.

eg: [ERR 102], [ERR 101]


  _ _ _ _ |.
| | ||_|| (_|||  \/




Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at ad...@sifycorp.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] need to manipulate ArrayList in rules Reg:

2010-12-28 Thread Murali Venugopal

Hi,
Thanks for the input. I've opted the second one and it's working.
Thanks for your timely support Esteban.
.

 _ _ _ _ |.
| | ||_|| (_|||  \/

Whoever wants to be happy, let him be so: of tomorrow there's no knowing


On 12/27/2010 05:46 PM, Esteban Aliverti wrote:

You have 2 simple approaches:

   1. Insert all your Students as facts and create regular rules like
  /Student(name == 'something')/
   2. Use the /from/ keyword:
  /$c: ClassA ()
  Student(name == "something") from $c.students/

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com <http://www.plugtree.com>
- Blog @ http://ilesteban.wordpress.com


On Mon, Dec 27, 2010 at 5:23 AM, Murali Venugopal 
mailto:murali.venugo...@sifycorp.com>> 
wrote:



Hi,

I'm inserting an Object calld ClassA into the working memory.
Which has got it's students in an ArrayList

Like this...

public class ClassA {

private String RoomNo;
private ArrayList  students;

...

}

public class Student {

private String name;
private String rollNo;

...

}

Now, i've to write a rule to find a particular student with his
role number and fetch his name to make some decisions.

I don't know to write a rule to access an Object's data member of
type ArrayList and find a match. Please help.

Thanks in advance.

 _ _ _ _ |.
| | ||_|| (_|||  \/

Whoever wants to be happy, let him be so: of tomorrow there's no
knowing



Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more
with your Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or
entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If
this is a
forwarded message, the content of this E-MAIL may not have been
sent with
the authority of the Company. If you are not the intended
recipient, an
agent of the intended recipient or a  person responsible for
delivering the
information to the named recipient,  you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If
you have
received this communication in error, please delete this mail &
notify us
immediately at ad...@sifycorp.com <mailto:ad...@sifycorp.com>
___
rules-users mailing list
rules-users@lists.jboss.org <mailto: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


[rules-users] need to manipulate ArrayList in rules Reg:

2010-12-27 Thread Murali Venugopal

Hi,

I'm inserting an Object calld ClassA into the working memory. Which has got 
it's students in an ArrayList

Like this...

public class ClassA {

private String RoomNo;
private ArrayList  students;

...

}

public class Student {

private String name;
private String rollNo;

...

}

Now, i've to write a rule to find a particular student with his role number and 
fetch his name to make some decisions.

I don't know to write a rule to access an Object's data member of type 
ArrayList and find a match. Please help.

Thanks in advance.

  _ _ _ _ |.
| | ||_|| (_|||  \/

Whoever wants to be happy, let him be so: of tomorrow there's no knowing



Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at ad...@sifycorp.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Rule language resources Reg;

2010-08-10 Thread Murali Venugopal


  
  

Hi,
  
  Thanks for your prompt reply. Actually, I'm not into middle of
  writing some rules. I'm working to implement Drools in a NMS
  product. Where Root-Cause Analysis is done to identify the exact
  problem in a network.
  
  I'm initially working on a POC trying to identify pros and cons.
  The approximate scenarios include
  
timing window
generating new co-related events
escalation, and so on
  
  
  I'm not looking for a solution here. At least, I've not grown to
  that extent in Drools. I'm expecting someone to guide me. Is the
  resources I have is sufficient or is there some other resources
  available elsewhere?
  
  To be more precise, I want to the following
  
possible keywords in a .drl file
sematics
syntax, and
usage
  
  
  Regards,
  Murali Venugopal




On 08/10/2010 03:04 PM, Dieter D'haeyere wrote:
Maybe you could post an example of a rule you would
  like to define ...
  In that way, we can spot your exact problem better (and maybe see
  what kind of documentation is still lacking)
  Regards,
  Dieter D'haeyere.
      
  
  
  2010/8/10 Murali Venugopal <murali.venugo...@sifycorp.com>

   
Hi,
  
  I'm a newbie to Drools and Rules. I see this Mailing list
  provides lot of valuable information regarding Drools.
  Actually I'm looking for some good resources which helps
  in writing Rules. I.e Rule Syntax and Semantics. It's
  since 3 months I have started showing interest in Drools.
  But still I can't proceed more than the examples given in
  the books, which is not sufficient to work on real time
  projects.
  
  I'm referring books like
  1. Drools JBoss Rules 5.0
  2. JBoss Drools Business Rules
  also,
  1. Drools documentation and Manuals.
  
  But still there's no definitive guides for writing rules.
  The Drools Documentation has listed all the possible
  keywords. But, their Syntax and Semantics are missing.
  I went through this entire Mailing List hoping someone
  would have asked this question before me. But in vain. 
  
  So, please refer/point me some good resources for Rules.
  Because in Drools, I believe, everything is possible only
  through Rules.
  
  Thanks and Regards,
  
  
  
  ___
  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


[rules-users] Drools Rule language resources Reg;

2010-08-10 Thread Murali Venugopal


  
  

Hi,
  
  I'm a newbie to Drools and Rules. I see this Mailing list provides
  lot of valuable information regarding Drools.
  Actually I'm looking for some good resources which helps in
  writing Rules. I.e Rule Syntax and Semantics. It's since 3 months
  I have started showing interest in Drools. But still I can't
  proceed more than the examples given in the books, which is not
  sufficient to work on real time projects.
  
  I'm referring books like
  1. Drools JBoss Rules 5.0
  2. JBoss Drools Business Rules
  also,
  1. Drools documentation and Manuals.
  
  But still there's no definitive guides for writing rules. The
  Drools Documentation has listed all the possible keywords. But,
  their Syntax and Semantics are missing.
  I went through this entire Mailing List hoping someone would have
  asked this question before me. But in vain. 
  
  So, please refer/point me some good resources for Rules. Because
  in Drools, I believe, everything is possible only through Rules.
  
  Thanks and Regards,
  
  

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