Drools flow - disposign a StatefulKnowledgeSession
by Chrystall, Greg
How should this be done? My startProcess call returns before the workflow has finished because I have long running WorkItems.
Do I need to call dispose on the session when the workflow has completed?
If so can I call dispose from a ProcessEventListener?
Thanks,
Greg
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
14 years
Re: [rules-users] rules-users Digest, Vol 48, Issue 72
by John Peterson
>Message: 2
>Date: Fri, 19 Nov 2010 09:07:33 +1100
>From: Xinhua Zhu <xhzhu(a)it.uts.edu.au>
>Subject: [rules-users] Integrate Fusion into Guvnor
>To: rules-users(a)lists.jboss.org
>Message-ID:
> <AANLkTimQfjTTDMj=MFnEr9nqCKtTpdVYFOH-nOT1SFEK(a)mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi
>
>When Fusion can be integrated into Guvnor?
>
>BR
>Xinhua
>
14 years
Is it here or not?
by Wolfgang Laun
Consider these rules:
rule "no Ax Or Ax 1"
when
EventA(id == "1") and Boolean( $v: booleanValue == true )
or
(not EventA(id == "1")) and Boolean( $v: booleanValue == false )
then
System.out.println( "#1: A(1) is " + $v );
end
rule "no Ax Or Ax 2"
when
(EventA(id == "1") or not( EventA(id == "1") ))
List( $size: size ) from collect( EventA(id == "1") )
then
boolean v = $size > 0;
System.out.println( "#2: A(1) is " + v );
end
Rules #1 and #2 fire as expected while inserting lots of
EventA(id=="1"), once for each new one.
Rule #1 fires as expected after retracting the last inserted fact.
Rule #2 does not, BUT if I split the rule manually in two, they both fire:
...when
EventA(id == "1")
List(...
and
...when
not( EventA(id == "1") )
List(...
Using 5.1.1.
-W
14 years
gwt-console not on localhost
by melc
Hello all,
Can someone please tell me whether it is possible to add processes to guvnor
and view the processes on gwt-console when jboss is not bound to localhost,
but to a specific address instead??
I only see processes on gwt-console when everything is deployed on jboss
running on localhost... when running jboss on specific ip the processes are
not shown....
Should I configure something first??
I would appreciate any help, thank you.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/gwt-console-not-on-lo...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years
Precompile Rules & Flows
by Yaniv Itzhaki
Hi,
I wanted to know if it is possible to precompile rules/flows and load
them on demand?
Currently i am using the following code:
*KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
for (String file : files) {
//(missing code) get files from directory and add them to
KnowledgeBuilder (source files - rules and flows)
kbuilder.add(ResourceFactory.newFileResource(file), type);
}
*
* private KnowledgeBase kb =
KnowledgeBaseFactory.newKnowledgeBase();
kb.addKnowledgePackages(kbuilder.getKnowledgePackages());*
*
*
Is there an option to add already precompiled files into KnowledgeBase
and not compile them only during the initialization phase?
Thanks
14 years
Drools Flow - UI Flow
by OptimusPrime
Hello,
I am seeking for ideas:
for my current project, we have the requirement to externalize the business
and the sequence of steps of a web flow.
Example:
Online banking: money transfer from account A to account B.
Step1: gather transfer data from user. -> GOTO Step2.
Step2: route: IF amount >= 250$ GOTO Step3 ELSE GOTO Step4.
Step3: electronic signature -> GOTO Step4.
Step4: commit to backend.
Added value:
- We can plug any view technology we want on the UI steps.
- Interaction with the backend is not in the view.
- Business guys are able to reorder the steps, change the routing logic,...
I developed a small proof of concept with Spring Webflow 2 for all the UI
steps (Step 1, 3) and Drools Flow as 'flow controller'. It works quite well
in the same JVM.
But we also want Drools Flow to be on a remote server (+possibly
clustering).. There I am stuck because I need our custom WorkItemHandler to
start the UI.
So, dear community,
1. do you think a flow engine is appropriate for what we are trying to do ?
2. how to manage the 'remote' requirement ?
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-UI-Flow-t...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years
Drools AgendaEventListener
by Agarwal, Beena
Can anyone explain when the ActivationCreatedEvent, BeforeActivationFiredEvent,AfterActivationFiredEvent are actually triggered? I added a AgendaEventListener on a StatefulKnowledgeSession and never see the events being fired when I'm in the debugger.
I'm basically trying to collect some session stats.
Here's a snippet -
KnowledgeBaseConfiguration kbaseConf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kbaseConf.setOption(MBeansOption.ENABLED);
commonKB = KnowledgeBaseFactory.newKnowledgeBase("kb-"+gameCode, kbaseConf);
commonKB.addKnowledgePackages(kbuilder.getKnowledgePackages());
StatefulKnowledgeSession session = commonKB.newStatefulKnowledgeSession();
//session.addEventListener(bean.getAgendaStats());
session.addEventListener(new DefaultAgendaEventListener() {
public void activationCancelled(ActivationCancelledEvent event) {
System.out.println("activation cancelled");
}
public void activationCreated(ActivationCreatedEvent event) {
System.out.println("activation created");
}
public void afterActivationFired(AfterActivationFiredEvent event) {
System.out.println("after activation fired");
}
public void beforeActivationFired(BeforeActivationFiredEvent event) {
System.out.println("before activation fired");
}
});
.. add facts..
Session.fireAllRules();
I never see the printlns or the breakpoints in the DefaultAgendaListener - are these supposed to be triggered when the rules are fired?
14 years