process-designer deserialization error
by AlfredoLatini
Hi,
i have a problem with oryx process-designer and drools guvnor. I have
created a process with process-designer and i saved it. Then i have opened
this file with eclipse and i uploaded this file in guvnor repository.
I have opened the process in drools guvnor and the following exception
occurred:
The server encountered an internal error () that prevented it from
fulfilling this request.</u></p><p>exception
<pre>javax.servlet.ServletException:
http://localhost:8080/designer/bpmn2_0deserialization
org.drools.guvnor.server.GuvnorAPIServlet.service(GuvnorAPIServlet.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
How can i fix this problem?
My jboss installation runs on port 8580 because 8080 is busy (oracleXE).
Thanks in advance
Alfredo.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/process-designer-dese...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 5 months
Not able to achieve NOT & FROM keyword in a brl through Guvnor
by Harshit Bapna
Hello All,
>From the Expert documentation, I am trying to create the rule(below) in
Guvnor
Guvnor Version : 5.1.1
I am not able to build a rule which has 'from' keyword. Is it supported in
Guvnor ?
Also I am not able to achieve the combination of NOT & FROM in a business
rule.
Is it possible ?
------------------------------------------------------------------------------------
package org.drools;
rule "Avoid NPE on wrong syntax"
when
not( Cheese( ( type == "stilton" && price == 10 ) || ( type == "brie"
&& price == 15 ) ) from $cheeseList )
then
System.out.println("OK");
end
------------------------------------------------------------------------------------
15 years, 5 months
XML to DRL
by T-Otte
Hello,
I know that this error has come up a few times in the past, but i wasn't
able to solve my problem.
I am trying to convert documents from the drools xml format to .drl using
drools 5.1.
The error i am getting is:
(null: 5, 76): schema_reference.4: Failed to read schema document
'drools.org/drools-5.0.xsd', because 1) could not find the document; 2) the
document could not be read; 3) the root element of the document is not
<xsd:schema>.
(null: 5, 76): cvc-elt.1: Cannot find the declaration of element 'package'.
(null: 6, 35): schema_reference.4: Failed to read schema document
'drools.org/drools-5.0.xsd', because 1) could not find the document; 2) the
document could not be read; 3) the root element of the document is not
<xsd:schema>.
...
Multiple of the example xml documents have been tried, but the error is
always the same. I tried to eliminate uneccessary whitespaces since that was
suggested in one of the previous topics about this issue, but so far to no
avail.
Right now i am using the very simple test_ParseGlobal:
<?xml version="1.0" encoding="UTF-8"?>
<package name="com.sample"
xmlns="http://drools.org/drools-5.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0 drools.org/drools-5.0.xsd">
<import name="java.util.HashMap"/>
<import name="org.drools.*"/>
<global identifier="x" type="com.sample.X"/>
<global identifier="yada" type="com.sample.Yada"/>
</package>
My code to do the transformation is:
PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
XmlPackageReader reader = new XmlPackageReader(conf.getSemanticModules());
DrlDumper dumper = new DrlDumper();
FileReader filereader = new FileReader("test_ParseGlobal.xml");
PackageDescr descr = reader.read(filereader);
String test = dumper.dump(descr);
System.out.println(test);
FileWriter writer = new FileWriter(new File("test_ParseGlobal.drl"));
writer.write(dumper.dump(descr));
writer.flush();
writer.close();
Thank you for your help!
Best regards
Tobias
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/XML-to-DRL-tp2236936p...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 5 months
LHS Condition not able to achieve through Guvnor GUI.
by Harshit Bapna
Hello All,
I want to create below LHS condition in a Guvnor BRL rule.
(or
not (exists TransactionInfo())
TransactionInfo(action == null || action == "")
)
I am not able to achieve this though Guvnor.
After setting up an OR prefix, then the NOT option isn’t offered in the drop
down so this condition cannot be authored.
Is it possible ? any suggestions.
I want to avoid the two other approaches :
1. breaking this rule into two rules.
2. Writing a drl.
FYI, I did the testing with the DRL and now I am creating a BRL from the
DRL.
--Harshit
15 years, 5 months
CE "not" not working
by Piyush Goel
Hi,
We have a few rules like the ones given below.
rule "4"
salience 0
dialect "mvel"
when
av1 : AttributeValue( str == "Boys" )
exists InventoryAttribute( attribute == "DIVISION" && value == av1 )
av2 : AttributeValue( str == "Blazer" )
exists InventoryAttribute( attribute == "SUBCATEGORY" && value == av2 )
av3 : AttributeValue( str == "Boys Upper" )
not InventoryAttribute( attribute == "CATEGORY" && value == av3 )
then
VoucherSeries fact0 = new VoucherSeries();
fact0.setSeriesCode( "BUPPER1" );
fact0.setPriority(100);
fact0.setRuleName(drools.getRule().getName());
insert(fact0);
end
The CE "not" is never evaluating to true in the above rule. The "not" CE is
working only for very simple conditions like 'not AttributeValue( str ==
"Blazer")' .
Any idea what are we doing wrong ?
Regards,
piyush
15 years, 5 months
decision table problem Reg:
by 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 admin(a)sifycorp.com
15 years, 5 months
Drools 5.1 JMX Monitoring.
by Benson Fung
Hi ,
As I understand, Drools 5.1 made API enhancement to support JMX standard and
enables knowledge base and knowledge session monitoring and inspection using
any JMX console.
It also can display the average firing time. How to implement this? Is
there any sample for this? Please advise.
Thanks
15 years, 5 months
how do I add not exists contraint in dslr
by maverik j
Hi,
I have been trying to add not exists constraint in dslr but its failing to
parse the dslr. Here is what I am trying to do in DSLR
[when][][*Tt*]here is at least one {entity}= not(exists {entity}:
{entity}())
If I simply use the exists constraint here then it works well. But then
after adding not to it, its not getting parsed correctly.
error I am geeting is:
[10,27]: [ERR 102] Line 10:27 mismatched input ',' expecting ')' in rule
"Rule1" in pattern Person
not sure whats going wrong here, if it is expected to work this way?
thanks,
-m
15 years, 5 months
Incorrect output for double values on German Window
by nagarajt
I have a drl file with contents
Sample.drl
------------------
package DecisionTable;
import bre.Number;
rule "DecisionTable #1: (Number.number <'4.3')"
salience 0
when
number:Number(
number< 4.3)
then
number.setText(number.getNumber().toString()+" < 4.3");
end
rule "DecisionTable #2: (Number.number >'10.0')"
salience 0
when
number:Number(
number> 10.0)
then
number.setText(number.getNumber().toString()+" > 10.0");
end
rule "DecisionTable #3: (Number.number 'between 4.3 and 10.0')"
salience 0
when
number:Number(
number>=4.3 ,
number<=10.0)
then
number.setText(number.getNumber().toString()+" is between 4.3 and 10.0");
end
Number.java
-------------------
package bre;
public class Number {
public Double number;
public Double getNumber() {
return number;
}
public void setNumber(Double number) {
this.number = number;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String text;
}
If I use Windows XP ( Regional Language settings in Control Panel to
English(United States)) rules are firing correctly
Input Output
4.6 4.6 between 4.3 and 10.0
3.3 3.3 < 4.3
7.5 7.5 between 4.3 and 10.0
11.2 11.2 > 10.0
But If use German Windows XP (Regional Language settings in Control Panel to
German(Germany) rules are not firing correctly
Input Output
4.6 4.6 < 4.3
3.3 3.3 < 4.3
7.5 7.5 < 4.3
11.2 11.2 < 4.3
I am using Drools 5.0.1 version. Any specific configuration settings
required for German Windows XP to get correct output?
Please reply back. it is urgent.
Thanks in advance
Nagaraj
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Incorrect-output-for-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 5 months