Hi Wolf With respect to my prob u r saying it might the prob with drools version. i am using 5.1.1
by Mallikarjun Kohalli (mkohalli)
-----Original Message-----
From: Mallikarjun Kohalli (mkohalli)
Sent: Wednesday, March 05, 2014 2:54 PM
To: rules-users(a)lists.jboss.org
Subject: RE: rules-users Digest, Vol 88, Issue 12
Hi I am using drools 5.1.1
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Wednesday, March 05, 2014 2:20 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 88, Issue 12
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Drools template declaration in kmodule.xml (Michael Anstis)
2. Re: Guvnor - Custom operator problem (Not finding it)
(Michael Anstis)
3. Re: Drools 6.0.1 Workbench - How to import existing drl
files? (Michael Anstis)
4. Re: Some basic questions/assumptions on Drools
Work-bench/Guvnor (Michael Anstis)
5. Re: 6.0.1.F How to use @role and @expires with DSL
(Michael Anstis)
6. Re: Facing Problem with this exception (Wolfgang Laun)
----------------------------------------------------------------------
Message: 1
Date: Wed, 5 Mar 2014 08:06:26 +0000
From: Michael Anstis <michael.anstis(a)gmail.com>
Subject: Re: [rules-users] Drools template declaration in kmodule.xml
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<CAAG9P0suYi7MdP69nsNa4Y9S6c76nniZZ4u5QC72MO6zPTRLnA(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hello,
I believe the KIE API doesn't supports your use-case.
You would normally use drools-templates pro grammatically: parse the template and interpolate your data. The resulting DRL would then be added to a KBase.
Templates within the Workbench work exactly the same (and uses drools-templates); however we persist the template and accompanying data as XML that KieBuilder (fortunately) knows how to convert to DRL.
With kind regards,
Mike
On 4 March 2014 22:24, david.berkman <david.berkman(a)grenadefish.net> wrote:
> Is there any way to declare a drools template (*.drt) and its data
> files (in tab delimited or csv or whatever) in a kmodule.xml for
> publication via Maven? I realize I can use the Workbench to create a
> 'similar' web template and deploy that as a consumable .jar file, but
> I get the impression that this web template is not quite the same as a
> drools template, and if I publish like that and disassemble the
> resulting jar, that the kmodule.xml present there (if there is one),
> would not reverse engineer and be applicable to my .drt + .csv files
> I'm currently loading programmatically.
> And although programmatic loading works, it's not available to
> monitoring by a KieScanner, and of dynamically loading any changes
> thereby. I can create my own monitoring and reloading system, but I'd
> rather not be reinventing the wheel.
>
> All help appreciated,
>
> Thanks,
> David
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-template-declaration-in-kmodu
> le-xml-tp4028504.html Sent from the Drools: User forum mailing list
> archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
10 years, 9 months
Re: [rules-users] rules-users Digest, Vol 88, Issue 12
by Mallikarjun Kohalli (mkohalli)
Hi I am using drools 5.1.1
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Wednesday, March 05, 2014 2:20 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 88, Issue 12
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Drools template declaration in kmodule.xml (Michael Anstis)
2. Re: Guvnor - Custom operator problem (Not finding it)
(Michael Anstis)
3. Re: Drools 6.0.1 Workbench - How to import existing drl
files? (Michael Anstis)
4. Re: Some basic questions/assumptions on Drools
Work-bench/Guvnor (Michael Anstis)
5. Re: 6.0.1.F How to use @role and @expires with DSL
(Michael Anstis)
6. Re: Facing Problem with this exception (Wolfgang Laun)
----------------------------------------------------------------------
Message: 1
Date: Wed, 5 Mar 2014 08:06:26 +0000
From: Michael Anstis <michael.anstis(a)gmail.com>
Subject: Re: [rules-users] Drools template declaration in kmodule.xml
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<CAAG9P0suYi7MdP69nsNa4Y9S6c76nniZZ4u5QC72MO6zPTRLnA(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hello,
I believe the KIE API doesn't supports your use-case.
You would normally use drools-templates pro grammatically: parse the template and interpolate your data. The resulting DRL would then be added to a KBase.
Templates within the Workbench work exactly the same (and uses drools-templates); however we persist the template and accompanying data as XML that KieBuilder (fortunately) knows how to convert to DRL.
With kind regards,
Mike
On 4 March 2014 22:24, david.berkman <david.berkman(a)grenadefish.net> wrote:
> Is there any way to declare a drools template (*.drt) and its data
> files (in tab delimited or csv or whatever) in a kmodule.xml for
> publication via Maven? I realize I can use the Workbench to create a
> 'similar' web template and deploy that as a consumable .jar file, but
> I get the impression that this web template is not quite the same as a
> drools template, and if I publish like that and disassemble the
> resulting jar, that the kmodule.xml present there (if there is one),
> would not reverse engineer and be applicable to my .drt + .csv files
> I'm currently loading programmatically.
> And although programmatic loading works, it's not available to
> monitoring by a KieScanner, and of dynamically loading any changes
> thereby. I can create my own monitoring and reloading system, but I'd
> rather not be reinventing the wheel.
>
> All help appreciated,
>
> Thanks,
> David
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-template-declaration-in-kmodu
> le-xml-tp4028504.html Sent from the Drools: User forum mailing list
> archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
10 years, 9 months
Drools template declaration in kmodule.xml
by david.berkman
Is there any way to declare a drools template (*.drt) and its data files (in
tab delimited or csv or whatever) in a kmodule.xml for publication via
Maven? I realize I can use the Workbench to create a 'similar' web template
and deploy that as a consumable .jar file, but I get the impression that
this web template is not quite the same as a drools template, and if I
publish like that and disassemble the resulting jar, that the kmodule.xml
present there (if there is one), would not reverse engineer and be
applicable to my .drt + .csv files I'm currently loading programmatically.
And although programmatic loading works, it's not available to monitoring by
a KieScanner, and of dynamically loading any changes thereby. I can create
my own monitoring and reloading system, but I'd rather not be reinventing
the wheel.
All help appreciated,
Thanks,
David
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-template-declaration-in-kmodule-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
Workbench on tomcat
by john poole
I'm sure I'm being dense, but I can't reconcile the readme instructions with
the file I see in the workbench app:
1. Copy kie-tomcat-integration jar into TOMCAT_HOME/lib
*Where is this file?
2. Copy jacc lib into TOMCAT_HOME/lib (javax.security.jacc-api in jboss
maven repository)
*What is the file name for "jacc lib" and where is it?
3. Add valve configuration into TOMCAT_HOME/conf/server.xml inside Host
element as last valve definition
<Valve className="org.kie.integration.tomcat.JACCValve" />
4. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and users, make
sure there will be 'analyst' or 'admin' roles defined as it's required to be
authorized to use kie-wb
5. Edit web.xml and uncomment all entries that are marked with
TOMCAT-JEE-SECURITY
*There are no entries marked with TOMCAT-JEE-SECURITY in that file.
6. Rename org.uberfire.security.auth.AuthenticationSource to
org.uberfire.security.auth.AuthenticationSource-ORIGIN and
rename org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY
to org.uberfire.security.auth.AuthenticationSource
inside WEB-INF/classes/META-INF/services
*There isn't an "uberfire" folder under the "org" folder there.
--
View this message in context: http://drools.46999.n3.nabble.com/Workbench-on-tomcat-tp4028507.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
Best Solution found but latest solution does not work
by moltenice
Hello all,
I am currently trying to use Optaplanner to create a timetable of
interviewers, where x students are to be given interviews in a given time
slot.
The planning variable is Lecturer class, meaning different lecturers can be
assigned to different timeslots.
Through debugging, I can tell that the planner does optimize (I'm currently
using brute force just to be complete for small problems). But the final
best solution ALWAYS has the results of the last search the optimizer did,
and so the 'best' solution information seems to be lost as soon as the
planner does another search.
Clearly I'm doing something wrong. Can anybody let me know what the problem
is?
Thanks a bunch in advance!
Karan
Timetabler.zip
<http://drools.46999.n3.nabble.com/file/n4028442/Timetabler.zip>
--
View this message in context: http://drools.46999.n3.nabble.com/Best-Solution-found-but-latest-solution...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
ArrayIndexOutOfBoundsException under high events load in drools CEP
by ters
Hi, drools users/developers. As mentioned in subject, I often faced
ArrayIndexOutOfBoundsException under high events load in drools during
marshaling.
Conditions: drools CEP (5.4.0.Final), Stream mode, fireUntilHalt mode,
during very active marshaling process (in several threads) I often have such
trace:
java.lang.ArrayIndexOutOfBoundsException: 2773
at
org.drools.marshalling.impl.ProtobufOutputMarshaller.orderFacts(ProtobufOutputMarshaller.java:592)
at
org.drools.marshalling.impl.ProtobufOutputMarshaller.writeFactHandles(ProtobufOutputMarshaller.java:533)
at
org.drools.marshalling.impl.ProtobufOutputMarshaller.serializeSession(ProtobufOutputMarshaller.java:139)
at
org.drools.marshalling.impl.ProtobufOutputMarshaller.writeSession(ProtobufOutputMarshaller.java:100)
at
org.drools.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:169)
at
org.drools.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:151)
at
com.blablabla.cep.CEPEventProcessor.marshalWorkingMemory(CEPEventProcessor.java:332)
This exception occurs really often.
I googled fresh tracked bug
https://bugzilla.redhat.com/show_bug.cgi?id=1044577. As I understand, this
bug is fixed in drool 5.3.x branch, but we using drools-core 5.4.0.Final.
So could you please help me what to do with this exeption?
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/ArrayIndexOutOfBoundsException-under-hi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
Drools 6.0.1 CEP stucks during marshaling in fireUntilHalt mode
by ters
Hi drools experts.
We use drools fusion complex event processor (CEP). After migration from
5.4.0 to 6.0.1 I encountered a problem - CEP stucks during marshaling in
fireUntilHalt mode. Below self-contained reproducer.
--------------------------------
/*Event class:*
/public class Test1 {
private Date timestamp;
private String id;
}/
/*Rule drl:*
/package bpmn;
import com.test.event.*;
dialect "mvel"
declare BusinessProcessName
name : String;
end
declare com.test.event.Test1
@role( event )
end
rule "Insert Business Process Name"
salience 10
when
not BusinessProcessName(name == "SomeName")
then
System.out.println("Insert Business Process Name");
insert(new BusinessProcessName("SomeName"));
end
rule "Start event1"
when
$event1 : Test1()
then
System.out.println("Start event1 fired.");
end/
/*Test with whole initialization*
/public class TestDrools6CEPDeadLock implements RuleRuntimeEventListener {
private KieSession ksession;
private Marshaller marshaller;
@Test
public void test1() throws Exception {
initSession();
runFireUntilHaltThread();
System.out.println("-= 1 =-");
ksession.insert(new Test1());
System.out.println("-= 2 =-");
ksession.insert(new Test1());
}
private void runFireUntilHaltThread() {
new Thread(new Runnable() {
public void run() {
ksession.fireUntilHalt();
}
}).start();
}
private void initSession() {
KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("TestDrools6CEPDeadLock.drl"),
ResourceType.DRL);
if (kbuilder.hasErrors()) throw new RuntimeException("Unable to
compile drl\".");
KieBaseConfiguration config =
KieServices.Factory.get().newKieBaseConfiguration();
config.setOption(EventProcessingOption.STREAM);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(config);
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
ksession = kbase.newKieSession();
ksession.addEventListener((RuleRuntimeEventListener) this);
marshaller = MarshallerFactory.newMarshaller(kbase);
}
@Override
public void objectInserted(ObjectInsertedEvent event) {
System.out.println("------------------objectInserted---------------");
marshallSession();
}
@Override
public void objectUpdated(ObjectUpdatedEvent event) {
System.out.println("------------------objectUpdated---------------");
marshallSession();
}
@Override
public void objectDeleted(ObjectDeletedEvent event) {
System.out.println("------------------objectDeleted---------------");
marshallSession();
}
private void marshallSession() {
try {
marshaller.marshall(new ByteArrayOutputStream(), ksession);
System.out.println("------------------marshalled---------------");
} catch (IOException e) {
e.printStackTrace();
}
}
}/
*Output *of test I see only:
>-= 1 =-
>------------------objectInserted---------------
>Insert Business Process Name
Further engine hangs up, looks like dead lock on
ProtobufOutputMarshaller.evaluateRuleActivations() (line 256) >
RuleExecutor.reEvaluateNetwork().
Notes:
1) It worked fine on 5.4.0.Final version
2) Current problem not occurs if I run fireAllRules in second thread instad
of filreUntilHalt
private void runFireAllRulesInThread() {
new Thread(new Runnable() {
public void run() {
while(true){
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
LOG.error(e);
}
synchronized (ksLock){
ksession.fireAllRules();
}
}
}
}).start();
}
I need this thread to ensure firing timing rules such like:
$event1 : Test1();
not Test2(this after[0s, 10s ] $event1 );
I hope this can help to resolve either my or drools bug.
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-CEP-stucks-during-marshali...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months