Running Feedback during drools run

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Running Feedback during drools run

glambert27
I have a project that requires the use of stateful sessions. Upwards of 70K
facts are inserted into the session. As a result the running time for the
rules to run is upwards of 10-15mins. I need a way to have the user to get
feedback of running rule process. Statusbar or something of the likes?
I've attached my rule file sanitized to protect the innocent. sanitized_rules.drl

Reply | Threaded
Open this post in threaded view
|

Re: [rules-users] Running Feedback during drools run

laune
You can use event listeners to keep track of the pending activations,
which is (sort of) a measure of the remaining work to be done until
the engine has fired all rules. Also, if you know the number of facts
to be inserted, displaying the number of facts that remain to be
inserted is another measure of the work to be done until fireAllRules
is (usually) called.

-W

On 31/12/2013, glambert27 <[hidden email]> wrote:

> I have a project that requires the use of stateful sessions. Upwards of 70K
> facts are inserted into the session. As a result the running time for the
> rules to run is upwards of 10-15mins. I need a way to have the user to get
> feedback of running rule process. Statusbar or something of the likes?
> I've attached my rule file sanitized to protect the innocent.
> sanitized_rules.drl
> <http://drools.46999.n3.nabble.com/file/n4027470/sanitized_rules.drl>
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Running-Feedback-during-drools-run-tp4027470.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|

Re: [rules-users] Running Feedback during drools run

glambert27
Hi Laune,
 The number of facts will varying between 70-90K so i'm not sure displaying the number of facts to be inserted would be a good option. As for the event listeners where can I find good docs on implementing? My biggest concern is that rules once activated take quite some before the next rule is activated. Thus the status bar can potentially show 20% one sec then stay there for some time then jump to 70%. Not a good indication of work being taking place but if that's all I have I'll work with it.
Reply | Threaded
Open this post in threaded view
|

Re: [rules-users] Running Feedback during drools run

laune
On 31/12/2013, glambert27 <[hidden email]> wrote:
> Hi Laune,
>  The number of facts will varying between 70-90K so i'm not sure displaying
> the number of facts to be inserted would be a good option.

No, unless you know, beforehand, how many there will be.

> As for the event
> listeners where can I find good docs on implementing?

It's not difficult. There's a couple of session methods:
addEventListener(..) and you just implement the various After*Event
and Before*Event methods on the object you want to register as an
event.

> My biggest concern is
> that rules once activated take quite some before the next rule is
> activated.

Not clear what you mean here. If you insert one fact at a time and
fireAllRules(), you won't have anything to display to the user. On the
other hand, if you collect, say 1000 facts, insert them all and then
fire all rules, you can show progress during insertion, and you can
show progress while rules fire.

> Thus the status bar can potentially show 20% one sec then stay there for
> some time then jump to 70%.

This would not happen during the scenario I've outlined before unless
rule executions change a lot - but then it's hopeless anyway.

-W


> Not a good indication of work being taking
> place
> but if that's all I have I'll work with it.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Running-Feedback-during-drools-run-tp4027470p4027479.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|

Re: [rules-users] Running Feedback during drools run

Stephen Masters
CONTENTS DELETED
The author has deleted this message.