 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Running Workbench applications in GWT SuperDevMode
                                
                                
                                
                                    
                                        by Michael Anstis
                                    
                                
                                
                                        So, now Chrome (35+) and FireFox don't support GWT "classic" DevMode, I've
managed to run drools-wb in SuperDevMode.
The "classic" DevMode will not be supported in GWT 2.6:
http://www.gwtproject.org/release-notes.html#Release_Notes_2_6_1
Here's my findings on how to configure your webapp, IDE and run (or debug)
the damn thing.
These instructions are for IDEA (NetBeans will probably follow a similar
route).
(1) Create a regular GWT Launcher:
(2) Create a new GWT Launcher for SuperDevmode:
(3) Add the following to your webapp's gwt.xml (module) file:
  <!-- SuperDevMode -->
  <add-linker name="xsiframe"/>
  <set-configuration-property name="devModeRedirectEnabled" value="true"/>
  <set-property name="compiler.useSourceMaps" value="true"/>
  <set-configuration-property name='xsiframe.failIfScriptTag'
value='false'/>
(4) Launch your regular webapp (the "classic" GWT Launcher):
... <tick>, <tock>, <tick>, <tock> while it compiles and launches...
(5) Launch the SuperDevMode code server (the "SuperDevMode" GWT Launcher):
... <tick>, <tock>, <tick>, <tock> while it compiles and launches...
(6) Drag the "Dev Mode On" and "Dev Mode Off" buttons to your bookmark bar
(as advised) - but we don't normally read these sort of things, right! ;)
(7) Go back to the webapp's browser tab
(8) Click on the "Dev Mode On" bookmark you created in step (6)
(9) Click on "compile"
(10) Delete the "codesvr" part of the URL and press enter (dismiss the
popups that appear; which ones depends on what browser your GWT module
targets; e.g. I had to dismiss a popup about using Chrome but the GWT model
targets FireFox).
(11) Done!
(12) What's that? You want to debug your application?!?
This isn't too bad. Just launch both your "classic" GWT Launcher in debug
mode and the "SuperDevMode" GWT Launcher in normal mode.
Server-side code needs break-points in IDEA, and client-side break-points
need to be added using Chrome's Developer Tools (you'll need to make sure
"sourceMaps" are enabled, but this appears to be the default in Chrome 35).
Accessing Chrome's debugger:
Debugging:
Simple!
It takes a bit of getting used to debugging client-side stuff in Chrome,
and server-side stuff in IDEA, but it's not terrible (although don't expect
to be able to introspect everything in Chrome like you used to in IDEA).
I hope this helps (probably more so as others find "DevMode" stops working
for them.... and when we move to GWT 2.6.1 --- for IE10 support --- so it
is coming sooner than later).
Cheers,
Mike
                                
                         
                        
                                
                                11 years, 5 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        London (May 26th) Drools & jBPM community contributor meeting
                                
                                
                                
                                    
                                        by Mark Proctor
                                    
                                
                                
                                        London, Chiswick, May 26th to May 30th
During next week a large percentage of the Drools team, some of the jBPM team and some community members will be meeting in London (Chiswick). There won’t be any presentations, we’ll just be in a room hacking, designing, exchanging ideas and planing. This is open to community members who wish to contribute towards Drools or jBPM, and want help with those contributions. This also includes people working on open source or academic projects that utilise Drools or jBPM. Email me if you want to attend, our locations may very (but within chiswick) each day. 
We will not be able to make the day time available to people looking for general Drools or jBPM guidance (unless you want to buy us all lunch). But we will be organising evenings things (like bowling) and could make wed or thu evening open to people wanting general chats and advice. Email me if you’re interested, and after discussing with the team, I’ll let you know.
Those currently attending:
Mark Proctor (mon-fri) Group architect
Edson Tirelli (mon-fri) Drools backend, and project lead
Mario Fusco (mon-fri) Drools backend
Davide Sottara (wed-fri) Drools backend
Alex Porcelli (mon-fri) Drools UI
Michael Anstis (thu-fri) Drools UI
Kris Verlaenen (wed-thu) jBPM backend, and project lead
Mauricio Salatino (mon-fri) jBPM tasks and general UI
                                
                         
                        
                                
                                11 years, 5 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Usage of rules-users
                                
                                
                                
                                    
                                        by Wolfgang Laun
                                    
                                
                                
                                        Hi Team,
the amount of (what is) noise (to me) on the users list has steadily
increased over time. Several distinct topics appear (to me) to be
bunched together needlessly, and I'm beginning to use interest in this
list. IIRC, there was some talk several months ago, that things like
planner, JBPM and Guvnor should have their own lists, but nothing has
come of that.
Best
Wolfgang
                                
                         
                        
                                
                                11 years, 5 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Expression Timer NPE Drools 6.0.1.Final
                                
                                
                                
                                    
                                        by rogerL
                                    
                                
                                
                                        Hello,
I'm encountering an NPE when attempting to use and expression timer in my
rule.
env:
Drools 6.0.1.Final
OS Maverick
IDE Intellij Idea
Java 7
Given the ebb and flow nature of the facts in the system, we want to be able
to control the cycles dynamically. Hence the desire to use the expression
timer.
The expression that I tried is based on the 6.0.1 documentation.
That is, something of the form *Timer(expr: $d, $p)*
In an effort to get beyond the NPE, I tried playing around with the
parameters by using combinations of both longs and appropriately formatted
strings (e.g. 10s, 1m, etc), and using only the delay.
I saw mention that a semicolon should follow the expression. That equally
failed.
The interval and cron timer variations, however, both work.
The .drl and exception are:
declare SystemControlData
    isEnabled : boolean = false
    delay   : long = 30
    period  : long = 60000
    maxCallQueueDepth : int = 1
end
rule "If the system is enabled start campaign check at specified interval"
    agenda-group "system_criteria"
//    auto-focus true
    salience 20
//    timer( expr: $d, $p ) throws NPE
//    timer( expr: $d; ) throws NPE
    timer(cron:0/5 * * * * ?)
when
    SystemControlData(isEnabled==true, $d: delay, $p:period,
maxCallQueueDepth>0)
then
    drools.setFocus( "campaign_criteria" );
end
Exception in thread "SimpleAsyncTaskExecutor-1"
java.lang.NullPointerException
	at
org.drools.core.base.mvel.MVELCompilationUnit.createFactory(MVELCompilationUnit.java:262)
	at
org.drools.core.base.mvel.MVELCompilationUnit.getFactory(MVELCompilationUnit.java:276)
	at
org.drools.core.base.mvel.MVELObjectExpression.getValue(MVELObjectExpression.java:76)
	at org.drools.core.time.TimeUtils.evalTimeExpression(TimeUtils.java:140)
	at
org.drools.core.time.impl.ExpressionIntervalTimer.createTrigger(ExpressionIntervalTimer.java:151)
	at
org.drools.core.phreak.PhreakTimerNode.createTrigger(PhreakTimerNode.java:260)
	at
org.drools.core.phreak.PhreakTimerNode.scheduleLeftTuple(PhreakTimerNode.java:230)
	at
org.drools.core.phreak.PhreakTimerNode.doLeftInserts(PhreakTimerNode.java:93)
	at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:69)
	at
org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357)
	at
org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
	at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
	at
org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:200)
	at
org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67)
	at
org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
	at
org.drools.core.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1160)
	at
org.drools.core.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:1002)
	at
org.drools.core.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:978)
	at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:273)
--
View this message in context: http://drools.46999.n3.nabble.com/Expression-Timer-NPE-Drools-6-0-1-Final...
Sent from the Drools: Developer (committer) mailing list mailing list archive at Nabble.com.
                                
                         
                        
                                
                                11 years, 5 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Re: [rules-dev] [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug
                                
                                
                                
                                    
                                        by Wolfgang Laun
                                    
                                
                                
                                        Repeated executions show varying results: sometimes it's OK, sometimes it isn't.
I don't think it's a race condition in your code (although proper
syncing on the map would be the "clean" way to go).
I think that salience doesn't work properly )(6.0.0, OP used 6.0.1.),
if a fact is matched unconditionally by a high salience rule and the
same fact is matched using constraints in rules with lesser priority.
(Wasn't this recognized before as a bug in 6.0.x?)
-W
On 12/05/2014, jlprat <jlprat(a)gmail.com> wrote:
> Hi,
> I updated my test code to use your way of creating the Knowledge Base
> (using
> KieBase) and I have the exact same results. Does anyone have an idea why
> this is still failing?
>
> Furthermore, I think the way I was initializing my rules is also supported
> by Drools 6, because it's almost copied line by line from the Official
> Drools API page:
> https://docs.jboss.org/drools/release/6.0.1.Final/kie-api-javadoc/
>
> /
> A Typical example to load a rule resource.
>
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add( ResourceFactory.newUrlResource( url ),
>                       ResourceType.DRL );
> if ( kbuilder.hasErrors() ) {
>     System.err.println( builder.getErrors().toString() );
> }
>
> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
> kbase.addKnowledgePackages( builder.getKnowledgePackages() );
>
> StatefulKnowledgeSession ksession =
> knowledgeBase.newStatefulKnowledgeSession();
> ksession.insert( new Fibonacci( 10 ) );
> ksession.fireAllRules();
>
> ksession.dispose();/
>
> Best,
> Josep
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-i...
> 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
>
                                
                         
                        
                                
                                11 years, 5 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Build drools-eclipse with maven 3.1
                                
                                
                                
                                    
                                        by solo95
                                    
                                
                                
                                        Hi,
I've tried to build drools-eclipse 6.1.0-SNAPSHOT and the tycho seems to
fail - I saw it was the 0.16.0 and I've changed it to 0.19.0 since changes
in maven makes it neccesary to use tycho 0.18.0 or later in order to work.
Is it possible to change the drools-eclipse/pom.xml line to a later version
of tycho?
(I did not find any report issiue at github site so I've posted it here...)
<version.org.eclipse.tycho>0.19.0</version.org.eclipse.tycho>
Cheers,
 Mario
--
View this message in context: http://drools.46999.n3.nabble.com/Build-drools-eclipse-with-maven-3-1-tp4...
Sent from the Drools: Developer (committer) mailing list mailing list archive at Nabble.com.
                                
                         
                        
                                
                                11 years, 6 months