Custom file format
by ollem
I'm in a situation where my domain models are stored with automatically
generated package and class names. I'm looking for a way to somehow map a
fake import to the real import att compile time.
I guess a dialect is not the way since it only deals with the rules part.
I'v been thinking about using ResourceTypeBuilder.
Any ideas ?
Thanks // Olle
--
View this message in context: http://drools.46999.n3.nabble.com/Custom-file-format-tp3489846p3489846.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Re: [rules-users] multiple rules modifying the same fact
by FrankVhh
Hi,
Generally, there are 2 common approaches. Pick your choice depending on your
case.
1) Do not modify the working memory. Rules will not be retriggered and an
infinite loop is avoided. This is only feasible if your rules do not have to
react on changes made by other rules. I.e. the state that your objects are
in when calling the engine, can be considered final.
2) Insert (or modify) control objects to make sure that rules do not fire
over and over again. I.e. in your RHS, you "mark" that the rule has already
fired. F.e. insert(new RuleOneJustFired() ); In your LHS, you check for the
presence of these markers in your working memory.
A third option would be that you fix the sequence of your rules by using
something like ruleflow-groups.
Regards,
Frank
dwipin wrote:
>
> Hi,
> I have 4 rules modifying the same fact. Right now these rules fall
> under the same Agenda-Group; the execution order is controlled using
> Salience. How do I prevent the execution from getting into an infinite
> loop?
>
> Thanks and Regards,
> Dwipin Chandran.
>
--
View this message in context: http://drools.46999.n3.nabble.com/multiple-rules-modifying-the-same-fact-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Error opening dslr in Eclipse on Mac
by Steven Williams
Hi,
I am running Eclipse Helios on Mac OS X 10.6.7 with the Drools 5.1.1 plugin
and cannot open DSLR files with the error below. This error also occurs if I
create a new Drools project, create a new rule resource and select the Use a
DSL checkbox. DRL files open fine.
Could not open the editor: 1
java.lang.ArrayIndexOutOfBoundsException: 1
at
org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:230)
at org.eclipse.swt.custom.StyledText.handleResize(StyledText.java:6169)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5662)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1379)
at org.eclipse.swt.widgets.Control.resized(Control.java:2944)
at org.eclipse.swt.widgets.Composite.resized(Composite.java:929)
at org.eclipse.swt.widgets.Control.setFrameSize(Control.java:3428)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4975)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSView.setFrameSize(NSView.java:259)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3171)
at org.eclipse.swt.widgets.Control.setSize(Control.java:3668)
at
org.eclipse.jface.text.source.SourceViewer$RulerLayout.getVerticalScrollArrowHeights(SourceViewer.java:200)
at
org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:157)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1183)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:703)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:661)
at
org.eclipse.jface.text.source.CompositeRuler.layoutTextViewer(CompositeRuler.java:611)
at
org.eclipse.jface.text.source.CompositeRuler.addDecorator(CompositeRuler.java:565)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.addVerticalRulerColumn(ProjectionViewer.java:1289)
at
org.eclipse.jface.text.source.projection.ProjectionSupport.doEnableProjection(ProjectionSupport.java:310)
at
org.eclipse.jface.text.source.projection.ProjectionSupport$ProjectionListener.projectionEnabled(ProjectionSupport.java:143)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:489)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:537)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1441)
at org.drools.eclipse.editors.AbstractRuleEditor.createPartControl(Unknown
Source)
at
org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:241)
at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:325)
at
org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:211)
at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:308)
at org.drools.eclipse.dsl.editor.DSLRuleEditor2.addPages(Unknown Source)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
at
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at
org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at org.drools.eclipse.wizard.rule.NewRulePackagePage.finish(Unknown Source)
at org.drools.eclipse.wizard.rule.NewRulePackageWizard.performFinish(Unknown
Source)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1383)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1195)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3629)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at
org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:254)
at
org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:274)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at
org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1383)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1195)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3629)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
thanks
Steve
12 years, 6 months
Human Task - Connect to guvnor without using jbpm console
by S.M.H.Jamali
Hello all ,
I want to get list of human tasks for a certain user by jbpm api. How can i do that ?
How can i communicate with Guvnor through my web application and jbpm api without using JBPM Console ?
Thanks in advance
S.M.H.Jamali
12 years, 6 months
Drools Flex Designer
by ANJALI
Hi guys ,
Iam new to this drools flex designer.
i have seen this link http://code.google.com/p/drools-flex-editor/
but iam nt getting how to start with it.
>From wiki leaks tab i've learnt that i should open main.html but that is not
opening for me
*error:*
Unable to load data - [FaultEvent fault=[RPC Fault faultString="Error #2148"
faultCode="InvokeFailed" faultDetail="null"]
messageId="0598084C-3504-1D40-217D-6DE288D2A6CF" type="fault" bubbles=false
cancelable=true eventPhase=2]
Can any one tell how to use this exactly
Thanks,
Anjali
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Flex-Designer-tp3479612p3479612....
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Event processing/Drools Fusion: problem using "this after" and "@expires"
by diana-mendes
Hello,
I'm implementing a simple event processing application, and I'm getting
unexpected results. I use the time operator "this after" and I declare one
of my events with an "@expires" property.
I want to detect an event with a certain attribute (let's call it "main
event"), and when this event arrives I want to initiate a timer so that I
collect all the events that arrive within the next 10 seconds, regardless of
their attributes. A second timer should never be initiated until the first
one ends.
In order to implement this scenario I used an auxiliary event, named
"Context", that is inserted in the working memory when the "main event" is
detected, and expires after 10 seconds.
So I have two rules: the first one detects the "main event" (when there's no
Context in the working memory) and inserts a Context event. The second rule
fires when there's a Context event, and lists all the other events that
arrive within the next 10 seconds.
The rules are bellow:
rule "Detect Main Event"
activation-group "A"
lock-on-active true
salience 1
when
$event : Notif( specificProblem == "New ONT" || specificProblem == "ONT Is
Inactive" ) && not Context()
then
System.out.println("Context Created by
"+$event.getSpecificProblem()+" "+$event.id);
insert( new Context($event) );
end
rule "Collect Events in a 10 second window"
activation-group "A"
lock-on-active true
salience 2
when
$context : Context()
$list10s : List() from collect ( Notif( this after [0s,10s] $context ))
then
Notif notifContext = $context.getNotif();
System.out.println("context: "+notifContext.getSpecificProblem()+"
"+notifContext.id);
Helper.printList($list10s);
end
The output I get is the following:
/0s: New ONT 1/
Context Created by New ONT 1
/2s: ONT is inactive 1/
context: New ONT 1
-List:
--ONT Is Inactive1
---
/4s: ONT is inactive 2/
context: New ONT 1
-List:
--ONT Is Inactive1
--ONT Is Inactive2
---
/7s: New ONT 2/
context: New ONT 1
-List:
--ONT Is Inactive1
--ONT Is Inactive2
--New ONT2
---
*/22s: New ONT 3/
context: New ONT 1
Empty list
/27s: New ONT 4/
Context Created by New ONT 4*
The lines in italic are the events I receive, and the respective time
instance, in seconds.
The lines in bold are the unexpected results. When I receive event "New ONT
3", the "Context" should have expired by then and it should create a new
one. What could be causing this? It seems to work properly until I receive
that event.
Any help would be greatly appreciated, as I've tried several modifications
and none seem to work.
Thanks in advance,
Diana
--
View this message in context: http://drools.46999.n3.nabble.com/Event-processing-Drools-Fusion-problem-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
How to parse "comments" in "drl" file using DrlParser?
by Praveen
Hi,
The system we are building requires "rulenames" and "rule
description(comments)" to be displayed in the UI(built using JQuery).
I am using DrlParser to convert the drl(generated using Guvnor) to XML so
that it could be used to display in the UI.
However, the comments written in drl are not visible in the converted XML.
Please let me know how to parse "comments" using DrlParser so that I can use
it to display as "rule description".
Thanks & Regards,
Praveen.
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-parse-comments-in-drl-file-using...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Regarding verstions of Drools-Guvnor...
by Manohar Kokkula
Hi guys ,
I am new to this Drools.
I have one small doubt,
Is it mandatory to have all equal versions While executing Drools-Guvnor
Applications ?
For example:
Binaries and Dependencies of Drools- 5.1.1
Drools_Eclipse Plugins & Features-5.1.1
Drools Guvnor (.war)-5.1.1
Currently I used following version:
Binaries and Dependencies of Drools- 5.0.1
Drools_Eclipse Plugins & Features-5.0.1
Drools Guvnor (.war)-5.2.0
Is this fine? or Shall I install all of these of equal versions.
Please help me.
Thanks and Regards
Manohar Kokkula
Mailto: manohar.kokkula(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
12 years, 6 months