Re: [rules-users] Guvnor Rest API

2012-04-16 Thread Jervis Liu
On 2012/4/14 13:41, Amin Mohammed-Coleman wrote:
> Hi
>
> I am trying to use the Guvnor Rest API to upload rules and BPMN process 
> definitions to a remote Guvnor installation.  So far I am able to update the 
> binary content of the asset using:
>
> /drools-guvnor/rest/packages/myPackage/assets/myAsset/binary
>
> However when I look at the history for the asset, the current version does 
> not point to the version I have uploaded using the API.  Is there a separate 
> API I have to call in order to set the current version to be the one I've 
> uploaded or is there an example which I can reference?
What is the latest version? What does the check in comment say?

There are plenty of examples in this test: 
https://github.com/droolsjbpm/guvnor/blob/master/guvnor-webapp-drools/src/test/java/org/drools/guvnor/server/jaxrs/BasicPackageResourceIntegrationTest.java.
 
Take a look at testCreateAndUpdateAndGetBinaryAsset.

Cheers,
Jervis
>
> I'm using Guvnor 5.4.0-CR1
>
> Any help would be appreciated.
>
> Thanks
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Planner: weighting moves & adaptive foragers

2012-04-16 Thread Christopher Dolan
Three related questions about Drools Planner:

My planning problem involves distributing N jobs into M job queues. The optimal 
queue ordering depends on a large number of factors, but most important are job 
priority and job age. Priority usually wins, but old jobs can trump to avoid 
starvation.

If N x M is large, the collection of possible moves becomes large. But I know a 
priori that some moves are more likely to help than others. For example, I can 
promote the high-priority and old jobs first, because they will have the 
largest score impact.

1) Can I weight the selector to pick the better moves first? It looks like I'd 
make a custom AbstractSelector subclass that shuffled differently from 
MoveFactorySelector, maybe lazily finding moves via a pick function.

Of course, selecting better moves first is worthless if the forager doesn't use 
shortcuts, like FIRST_BEST_SCORE_IMPROVING. But the existing AcceptingForager 
implementation is very binary: it either takes the first good score or it 
ignores score and waits for a total number of moves. 

2) Has anyone built a generic Forager that looks at the distribution of scores 
and stops early if it finds a fantastic outlier? In particular, early in the 
solver there are lots of very easy improvements to make. Taking the first good 
one may be premature, but going through 1000 moves is a waste of time. I'd like 
a forager that just tries a few moves early and then tries more moves later on 
when it's harder to make gains. On the other hand, is putting a lot of work 
into a perfect forager just redundant with the acceptor?

3) Has anyone employed the undocumented TopListSelector? I'm intrigued that it 
feeds the forager's best moves back into the selector. How does it work? I 
think you need to combine it with a move factory to seed the solutions, but 
then it's redundant with that factory's output. Are selectors allowed to return 
the same move twice??

Chris

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Unable to Load Enum Data into Template

2012-04-16 Thread Michael Anstis
Have you tried 5.4.CR1?

Like I said, there was a bug that has been subsequently fixed.

5.2.0.Final saw the introduction of the new grid used for Template data.

5.3.0.Final saw some major improvements on enumerations in the Guided Rule
Editor. Unfortunately it introduced the regression you report.

5.4.0.CR1 has the fix (possibly 5.4.0.beta1 or 5.4.0.beta2, but I cannot
remember exactly which).

With kind regards,

Mike

On 16 April 2012 18:09, srinivasasanda  wrote:

> Manstis,but it is working in 5.2.0M2.But in 5.3.0 Final,it is not
> working.I've tried both
>
> Thanks
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Unable-to-Load-Enum-Data-into-Template-tp3913672p3914993.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Unable to Load Enum Data into Template

2012-04-16 Thread srinivasasanda
Manstis,but it is working in 5.2.0M2.But in 5.3.0 Final,it is not
working.I've tried both

Thanks

--
View this message in context: 
http://drools.46999.n3.nabble.com/Unable-to-Load-Enum-Data-into-Template-tp3913672p3914993.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Issue deploying 2.1 oryxdesigner on guvnor 5.4 CR1 and jboss 7.1.1 final

2012-04-16 Thread Tihomir Surdilovic
I assume you have both Guvnor and Designer running on port 8380. Saving 
a business process needs 2-way communication between Guvnor and 
Designer, and
by default Guvnor assumes Designer lives on localhost port 8080. Read 
this chapter of the jBPM docs : 
http://docs.jboss.org/jbpm/v5.2/userguide/ch10.html#d0e3136
and follow instructions on how to configure Guvnor to look for Designer 
under different settings than the defaults.


Hope this helps.

Thanks.

On 4/16/12 12:06 PM, sumatheja wrote:
Hi I deployed the designer 2.1 war in standalone/deployments afetr 
changing the url in the jbpm.xml to the appropriate port.


*subdomain="drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor" 
usr="admin" pwd="admin"/>*


 When I create a new jbpm and save it nothing happens.. I get the 
following server log Can anyone let me knoe if it is a bug or If 
I'm missing anything.


*17:00:14,356 INFO  [stdout] (http--127.0.0.1-8380-2) (null: -1, -1): 
Premature end of file.
17:00:17,997 INFO  [org.jbpm.designer.server.EditorHandler] 
(http--127.0.0.1-8380-10) Performing diagram information 
pre-processing steps.
17:00:18,027 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,251 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,369 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,598 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,682 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,765 INFO  
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] 
(http--127.0.0.1-8380-10) Successfully deleted file 
:C:\Users\Sumatheja\mywork\jboss-

as-7.1.1.Final\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
17:00:18,821 INFO  
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] 
(http--127.0.0.1-8380-10) Created 
file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final

\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
17:00:18,827 INFO  
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] 
(http--127.0.0.1-8380-10) Successfully deleted file 
:C:\Users\Sumatheja\mywork\jboss-

as-7.1.1.Final\standalone\deployments\designer.war\stencilsets\bpmn2.0jbpm\view\activity\workitems\Email.svg
17:00:18,833 INFO  
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] 
(http--127.0.0.1-8380-10) Successfully deleted file 
:C:\Users\Sumatheja\mywork\jboss-

as-7.1.1.Final\standalone\deployments\designer.war\stencilsets\bpmn2.0jbpm\view\activity\workitems\Log.svg
17:00:18,860 INFO  
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] 
(http--127.0.0.1-8380-10) Created 
file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final

\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/view/activity/workitems/Log.svg
17:00:18,874 INFO  
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit] 
(http--127.0.0.1-8380-10) Created 
file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final

\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/view/activity/workitems/Email.svg
17:00:19,647 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:19,660 INFO  [stdout] (http--127.0.0.1-8380-5) (null: -1, -1): 
Premature end of file.
17:00:20,478 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:20,744 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:21,134 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:21,436 INFO  
[org.drools.guvnor.server.security.DemoAuthenticator] 
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:21,439 WARNING 
[org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper] 
(http--127.0.0.1-8380-5) WebApplicationException has been caught : 
javax.jcr.PathNotFoundE

xception: processdictionary
17:00:21,443 INFO  [org.jbpm.designer.web.server.DictionaryServlet] 
(http--127.0.0.1-8380-2) check connection response code: 500*



Appreciate any help. thanks in advance

--
cheers
Sumatheja Dasararaju




___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] SOAP rule invocation in droolsjbpm-integration-distribution-5.4.0.CR1

2012-04-16 Thread Oldrich Kotas
Hello,

I am trying to invoke rules in the sample integration deployment from
drools-camel-server-5.4.0.CR1 release. 

No matter what I keep sending to the endpoint, only following returns:

http://schemas.xmlsoap.org/soap/envelope/";>
   
  
 soap:Server
 org.apache.cxf.binding.soap.SoapMessage cannot be cast
to java.lang.String
  
   


I have the server running on
http://localhost:8080/drools-camel-server-5.4.0.CR1/kservice/soap, the WSDL
downloads faultlessly. What is puzzling me, the very same request were
working in version 5.3. The deployment in regard of Camel is completely
intact with only chages whatsoever being specification of the Agent
knowledge-services.xml. 

My sample request:
http://schemas.xmlsoap.org/soap/envelope/";
xmlns:soap="http://soap.jax.drools.org/";>
   
   
  
 
 
 
   
  
   


A side note: In 5.3.0.Final I have not succeed in making the Knowledge Agent
to sniff on Guvnor to get up-to-date packages therefore I tried last version
with the troubles reportedly repaired.

A side note 2: I have found in the drools-camel-server-5.4.0.CR1
documentation, chapter 3.3.1.2 a statement indicating the SOAP support is
not bundled in yet, is that correct or a remnant of some old version?
Citation: "If you want to have SOAP support you need to create your custom
Drools Policy, but it's going to be added in the next release."

Is there perhaps a fault in the camel/cxf configuration or the function is
just not implemented yet?

Help is very appreciated. Thank you,

Oldrich

--
View this message in context: 
http://drools.46999.n3.nabble.com/SOAP-rule-invocation-in-droolsjbpm-integration-distribution-5-4-0-CR1-tp3914873p3914873.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Issue deploying 2.1 oryxdesigner on guvnor 5.4 CR1 and jboss 7.1.1 final

2012-04-16 Thread sumatheja
Hi I deployed the designer 2.1 war in standalone/deployments afetr changing
the url in the jbpm.xml to the appropriate port.

* *

 When I create a new jbpm and save it nothing happens.. I get the following
server log Can anyone let me knoe if it is a bug or If I'm missing
anything.

*17:00:14,356 INFO  [stdout] (http--127.0.0.1-8380-2) (null: -1, -1):
Premature end of file.
17:00:17,997 INFO  [org.jbpm.designer.server.EditorHandler]
(http--127.0.0.1-8380-10) Performing diagram information pre-processing
steps.
17:00:18,027 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,251 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,369 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,598 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,682 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:18,765 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--127.0.0.1-8380-10) Successfully deleted file
:C:\Users\Sumatheja\mywork\jboss-
as-7.1.1.Final\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
17:00:18,821 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--127.0.0.1-8380-10) Created
file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final
\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
17:00:18,827 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--127.0.0.1-8380-10) Successfully deleted file
:C:\Users\Sumatheja\mywork\jboss-
as-7.1.1.Final\standalone\deployments\designer.war\stencilsets\bpmn2.0jbpm\view\activity\workitems\Email.svg
17:00:18,833 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--127.0.0.1-8380-10) Successfully deleted file
:C:\Users\Sumatheja\mywork\jboss-
as-7.1.1.Final\standalone\deployments\designer.war\stencilsets\bpmn2.0jbpm\view\activity\workitems\Log.svg
17:00:18,860 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--127.0.0.1-8380-10) Created
file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final
\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/view/activity/workitems/Log.svg
17:00:18,874 INFO
[org.jbpm.designer.web.preprocessing.impl.JbpmPreprocessingUnit]
(http--127.0.0.1-8380-10) Created
file:C:\Users\Sumatheja\mywork\jboss-as-7.1.1.Final
\standalone\deployments\designer.war\stencilsets/bpmn2.0jbpm/view/activity/workitems/Email.svg
17:00:19,647 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:19,660 INFO  [stdout] (http--127.0.0.1-8380-5) (null: -1, -1):
Premature end of file.
17:00:20,478 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:20,744 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:21,134 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:21,436 INFO  [org.drools.guvnor.server.security.DemoAuthenticator]
(http--127.0.0.1-8380-5) Demo login for user (admin) succeeded.
17:00:21,439 WARNING
[org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper]
(http--127.0.0.1-8380-5) WebApplicationException has been caught :
javax.jcr.PathNotFoundE
xception: processdictionary
17:00:21,443 INFO  [org.jbpm.designer.web.server.DictionaryServlet]
(http--127.0.0.1-8380-2) check connection response code: 500*


Appreciate any help. thanks in advance

-- 
cheers
Sumatheja Dasararaju
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problem with simple Fusion test case

2012-04-16 Thread Wolfgang Laun
There is a fundamental misunderstanding on your side.

An event's timestamp and duration are used for reasoning, relating
events by means of temporal operators, e.g., A before B, A meets B,
and so on.

Your condition
   Event()
is just a test for a fact of type Event() being in WM, and it doesn't
care for its timestamp and duration.

For relating (real or psudo) with your events' times, look at
window:time, timer() and the aforementioned temporal ops.

Cheers
Wolfgang


On 16/04/2012, RobinMacharg  wrote:
> Hi,
>
> I'm new to Drools (this is my first post) and am running into problems
> understanding the temporal aspects of it.
>
> I am trying to create a simple test case, using the pseudo-clock to control
> time.  I declare and add a number of events with different start times
> (@timestamp) and durations (@duration).  I'd then like to advance the
> pseudo-clock by hand, calling fireAllRules() between clock-ticks.  I have a
> single rule that I would hope would fire on events that are 'valid', i.e.
> their (start_time < clock) and their  (start_time + duration > clock).  I'm
> seeing ALL events being picked up the first time I fireAllRules().  I'd
> really appreciate an explanation of what I'm missing here.
>
> Some code:
>
> I have a POJO Event class:
>
> public class Event {
>   public String name;
>   public long start;
>   public long dur;
> //... constructor, getters, setters omitted for brevity
> }
>
> I have a .drl file with an event declaration and a single rule in it:
>
> package myPackage.Event
> import myPackage.Event
> declare Event
> @role( event )
> @timestamp ( start )
> @duration ( dur )
> end
>
> rule "events"
> when
>   e : Event()
> then
>   System.out.println(e.name);
> end
>
> My scaffolding creates a STREAM based, pseudo-clock configured stateful
> KnowledgeSession, and reads the .drl rules using the standard code from the
> examples. I create a number of Events:
>
> Event e1 = new Event("myEvent1", 0, 1000);
> Event e2 = new Event("myEvent1", 1, 2);
>
> ksession.insert(e1)
> ... etc.
>
> Then I fireAllRules(), advance the clock and fire them again.  I'm seeing
> the second event being matched on the first fireAllRules().  I'd not have
> expected it to fire until the clock > 1.  I'm sure Drools is doing the
> right thing, and I'm not, but I can't work out what.  The examples of the
> temporal operators all refer to a second event to be compared to.  Also, I
> can't find an example of referencing the drools system clock value (in this
> case the pseudo-clock) from within a rule match section.
>
> So, what am I doing wrong?  If I can make my example clearer please let me
> know.
>
> Thanks in advance,
> Robin
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Problem-with-simple-Fusion-test-case-tp3914358p3914358.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] please provide a rule for events timeout cases

2012-04-16 Thread Wolfgang Laun
See inline.

On 16/04/2012, skatta1986  wrote:
> Hi, Thanks for the response..
>
> In general timer means executing a thread for every specified time period
> interval.

Why would you think so? java.util.Timer runs one thread, and
TimerTasks are executed by it, one after the other.

> But in our case, one time would be enough for an event. In the
> above rule my query is - after timeout case (i.e., firstime 10 seconds from
> the EventRequest), timer thread will be closed or will it be still running?

There's no point in disposing a Timer thread and to recreate it for
another activity. A dormant thread doesn't burden the system.


>
> Second Query is:
>
> Consider the below Success rule:
> rule event_success_case
>  when
>EventRecord( type=EventRequest, id=1 )
>and EventRecord( type=EventResponse, id=1 )
>
> With "no_response" rule, for every EventRequest there is a timer thread
> running for every 10Sec. Second rule "event_success_case" looks for its
> EventResponse. Suppose with in 10 seconds there is a response then
> "event_success_case" rule is run. Now I would like to close the timer thread
> because it uses my system memory. Please let me know if this is possible.

Trust Drools, trust Java. If the condition isn't true, everything will
be taken care of. (Threads don't use that much memory.)

-W

>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3914382.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread sumatheja
Thanks Edson... I expected this could be a ersion issue... can you send me
the link for the latest snapshot for jBPM... The latest that I could find
is 5.2 final.

2012/4/16 Edson Tirelli 

>
>The error means a version incompatibility due to changes we made to the
> marshalling framework. Until both projects have their releases out, you
> will have to use snapshots. jBPM 5.3 requires Drools 5.4 and vice-versa.
> You can't use Drools 5.4 with jBPM 5.2.
>
>I think jBPM 5.3 has not released any binaries after Drools 5.4.CR1, so
> you need to use the snapshot until it is.
>
>Please note that this is temporary as we are talking about development
> (i.e., non-final) versions.
>
> Edson
>
> 2012/4/16 sumatheja 
>
>> Hi Michael... Thanks for the response I'm getting this exception even
>> without a guvnor i.e. when I use a local project which has jbpm process and
>> a drl file but without the jbpm process everything works fine. I'm
>> using jbpm 5.2 final.
>>
>>
>> 2012/4/16 Michael Anstis 
>>
>>> There was a dramatic change to the marshalling of binary packages for
>>> 5.4.CR1. AFAIK this would mean any existing binary package in Guvnor would
>>> need to be rebuilt.
>>>
>>> Downgrading JARs to older versions would effectively remove the
>>> marshalling change and hence restore compatibility of older binary assets.
>>>
>>> Edson, I think I am right? We need to call this loud and clear in the
>>> release notes.
>>>
>>> sent on the move
>>>
>>> On 16 Apr 2012 12:33, "sumatheja"  wrote:
>>>
 I'm getting the same issue when I try to unmarshall a sample
 application which has the jbpm process (which moves out guvnor as possible
 cause). can someone guide if this is some bug? or should I change the
 jbpm jar version?

 On Mon, Apr 16, 2012 at 11:37 AM, sumatheja wrote:

> Hi,
> I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows
> which were not executing so I imported the jars from jbpm 5.2 final.
> The marshalling and unmarshalling works fine if I have knowledge base
> without rule-flows. I hope this gives some hint..
>
>
> On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun <
> wolfgang.l...@gmail.com> wrote:
>
>> This kind of error indicates some confusion between compilation and
>> execution of the code where this is thrown.
>>
>> Also, which versions of Drools do you used for marshalling and
>> unmarshalling? There's no line 287 in the versions of
>> org.drools.marshalling.impl.PersisterHelper.java available to me.
>>
>> -W
>>
>>
>> On 16/04/2012, sumatheja  wrote:
>> > Hi All,
>> > I ran across an issue while unmarshalling
>> StatefulKnowledgeSession.
>> > First I'm marshalling the session using the following code which
>> works fine
>> >
>> > Marshaller marshaller = MarshallerFactory
>> >
>> > .newMarshaller(workingMemory.getKnowledgeBase());
>> > File file = new File(
>> > "C:\\Users\\Sumatheja\\
>> workingmemory.info");
>> > FileOutputStream fos = new
>> FileOutputStream(file);
>> > ByteArrayOutputStream baos = new
>> > ByteArrayOutputStream();
>> > marshaller.marshall(baos, workingMemory);
>> > baos.writeTo(fos);
>> > baos.close();
>> >
>> > When I try to unmarshall the session using
>> >
>> >  Marshaller marshaller = MarshallerFactory
>> >
>> .newMarshaller(workingMemory.getKnowledgeBase());
>> >   FileInputStream fis = new
>> > FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
>> >   workingMemory = marshaller.unmarshall(fis);
>> >
>> > I'm getting the Error:
>> >
>> >
>> > java.lang.AbstractMethodError:
>> >
>> org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
>> > at
>> >
>> org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
>> > at
>> >
>> mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
>> > at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)
>> >
>> > No Idea what I'm missing out... any help will be appreciated...
>> Thanks in

Re: [rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread Edson Tirelli
   The error means a version incompatibility due to changes we made to the
marshalling framework. Until both projects have their releases out, you
will have to use snapshots. jBPM 5.3 requires Drools 5.4 and vice-versa.
You can't use Drools 5.4 with jBPM 5.2.

   I think jBPM 5.3 has not released any binaries after Drools 5.4.CR1, so
you need to use the snapshot until it is.

   Please note that this is temporary as we are talking about development
(i.e., non-final) versions.

Edson

2012/4/16 sumatheja 

> Hi Michael... Thanks for the response I'm getting this exception even
> without a guvnor i.e. when I use a local project which has jbpm process and
> a drl file but without the jbpm process everything works fine. I'm
> using jbpm 5.2 final.
>
>
> 2012/4/16 Michael Anstis 
>
>> There was a dramatic change to the marshalling of binary packages for
>> 5.4.CR1. AFAIK this would mean any existing binary package in Guvnor would
>> need to be rebuilt.
>>
>> Downgrading JARs to older versions would effectively remove the
>> marshalling change and hence restore compatibility of older binary assets.
>>
>> Edson, I think I am right? We need to call this loud and clear in the
>> release notes.
>>
>> sent on the move
>>
>> On 16 Apr 2012 12:33, "sumatheja"  wrote:
>>
>>> I'm getting the same issue when I try to unmarshall a sample application
>>> which has the jbpm process (which moves out guvnor as possible cause).
>>> can someone guide if this is some bug? or should I change the jbpm jar
>>> version?
>>>
>>> On Mon, Apr 16, 2012 at 11:37 AM, sumatheja  wrote:
>>>
 Hi,
 I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows
 which were not executing so I imported the jars from jbpm 5.2 final.
 The marshalling and unmarshalling works fine if I have knowledge base
 without rule-flows. I hope this gives some hint..


 On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun <
 wolfgang.l...@gmail.com> wrote:

> This kind of error indicates some confusion between compilation and
> execution of the code where this is thrown.
>
> Also, which versions of Drools do you used for marshalling and
> unmarshalling? There's no line 287 in the versions of
> org.drools.marshalling.impl.PersisterHelper.java available to me.
>
> -W
>
>
> On 16/04/2012, sumatheja  wrote:
> > Hi All,
> > I ran across an issue while unmarshalling
> StatefulKnowledgeSession.
> > First I'm marshalling the session using the following code which
> works fine
> >
> > Marshaller marshaller = MarshallerFactory
> >
> > .newMarshaller(workingMemory.getKnowledgeBase());
> > File file = new File(
> > "C:\\Users\\Sumatheja\\
> workingmemory.info");
> > FileOutputStream fos = new
> FileOutputStream(file);
> > ByteArrayOutputStream baos = new
> > ByteArrayOutputStream();
> > marshaller.marshall(baos, workingMemory);
> > baos.writeTo(fos);
> > baos.close();
> >
> > When I try to unmarshall the session using
> >
> >  Marshaller marshaller = MarshallerFactory
> >
> .newMarshaller(workingMemory.getKnowledgeBase());
> >   FileInputStream fis = new
> > FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
> >   workingMemory = marshaller.unmarshall(fis);
> >
> > I'm getting the Error:
> >
> >
> > java.lang.AbstractMethodError:
> >
> org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
> > at
> >
> org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
> > at
> >
> org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
> > at
> >
> org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
> > at
> >
> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
> > at
> >
> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
> > at
> >
> mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
> > at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)
> >
> > No Idea what I'm missing out... any help will be appreciated...
> Thanks in
> > advance
> >
> >
> > --
> > cheers
> > Sumatheja Dasararaju
> >
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



 --
 cheers
 Sumatheja Da

Re: [rules-users] please provide a rule for events timeout cases

2012-04-16 Thread skatta1986
Hi, Thanks for the response..

This is working fine.. But I have a query on the rule:
rule no_response 
   timer( int: 10s ) 
when 
   EventRecord( type=EventRequest, id=1 ) 
   not EventRecord( type=EventResponse, id=1 ) 

In general timer means executing a thread for every specified time period
interval. But in our case, one time would be enough for an event. In the
above rule my query is - after timeout case (i.e., firstime 10 seconds from
the EventRequest), timer thread will be closed or will it be still running?

Second Query is:

Consider the below Success rule:
rule event_success_case 
 when 
   EventRecord( type=EventRequest, id=1 ) 
   and EventRecord( type=EventResponse, id=1 ) 

With "no_response" rule, for every EventRequest there is a timer thread
running for every 10Sec. Second rule "event_success_case" looks for its
EventResponse. Suppose with in 10 seconds there is a response then
"event_success_case" rule is run. Now I would like to close the timer thread
because it uses my system memory. Please let me know if this is possible.


--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3914382.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Problem with simple Fusion test case

2012-04-16 Thread RobinMacharg
Hi,

I'm new to Drools (this is my first post) and am running into problems
understanding the temporal aspects of it.

I am trying to create a simple test case, using the pseudo-clock to control
time.  I declare and add a number of events with different start times
(@timestamp) and durations (@duration).  I'd then like to advance the
pseudo-clock by hand, calling fireAllRules() between clock-ticks.  I have a
single rule that I would hope would fire on events that are 'valid', i.e.
their (start_time < clock) and their  (start_time + duration > clock).  I'm
seeing ALL events being picked up the first time I fireAllRules().  I'd
really appreciate an explanation of what I'm missing here.

Some code:

I have a POJO Event class:

public class Event {
public String name;
public long start;
public long dur;
//... constructor, getters, setters omitted for brevity
}

I have a .drl file with an event declaration and a single rule in it:

package myPackage.Event
import myPackage.Event
declare Event
@role( event )
@timestamp ( start )
@duration ( dur )
end

rule "events"
when
e : Event()
then
System.out.println(e.name);
end

My scaffolding creates a STREAM based, pseudo-clock configured stateful
KnowledgeSession, and reads the .drl rules using the standard code from the
examples. I create a number of Events:

Event e1 = new Event("myEvent1", 0, 1000);
Event e2 = new Event("myEvent1", 1, 2);

ksession.insert(e1)
... etc.

Then I fireAllRules(), advance the clock and fire them again.  I'm seeing
the second event being matched on the first fireAllRules().  I'd not have
expected it to fire until the clock > 1.  I'm sure Drools is doing the
right thing, and I'm not, but I can't work out what.  The examples of the
temporal operators all refer to a second event to be compared to.  Also, I
can't find an example of referencing the drools system clock value (in this
case the pseudo-clock) from within a rule match section.

So, what am I doing wrong?  If I can make my example clearer please let me
know.

Thanks in advance,
Robin


 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-simple-Fusion-test-case-tp3914358p3914358.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread sumatheja
Hi Michael... Thanks for the response I'm getting this exception even
without a guvnor i.e. when I use a local project which has jbpm process and
a drl file but without the jbpm process everything works fine. I'm
using jbpm 5.2 final.

2012/4/16 Michael Anstis 

> There was a dramatic change to the marshalling of binary packages for
> 5.4.CR1. AFAIK this would mean any existing binary package in Guvnor would
> need to be rebuilt.
>
> Downgrading JARs to older versions would effectively remove the
> marshalling change and hence restore compatibility of older binary assets.
>
> Edson, I think I am right? We need to call this loud and clear in the
> release notes.
>
> sent on the move
>
> On 16 Apr 2012 12:33, "sumatheja"  wrote:
>
>> I'm getting the same issue when I try to unmarshall a sample application
>> which has the jbpm process (which moves out guvnor as possible cause).
>> can someone guide if this is some bug? or should I change the jbpm jar
>> version?
>>
>> On Mon, Apr 16, 2012 at 11:37 AM, sumatheja  wrote:
>>
>>> Hi,
>>> I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which
>>> were not executing so I imported the jars from jbpm 5.2 final.   The
>>> marshalling and unmarshalling works fine if I have knowledge base without
>>> rule-flows. I hope this gives some hint..
>>>
>>>
>>> On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun >> > wrote:
>>>
 This kind of error indicates some confusion between compilation and
 execution of the code where this is thrown.

 Also, which versions of Drools do you used for marshalling and
 unmarshalling? There's no line 287 in the versions of
 org.drools.marshalling.impl.PersisterHelper.java available to me.

 -W


 On 16/04/2012, sumatheja  wrote:
 > Hi All,
 > I ran across an issue while unmarshalling
 StatefulKnowledgeSession.
 > First I'm marshalling the session using the following code which
 works fine
 >
 > Marshaller marshaller = MarshallerFactory
 >
 > .newMarshaller(workingMemory.getKnowledgeBase());
 > File file = new File(
 > "C:\\Users\\Sumatheja\\workingmemory.info
 ");
 > FileOutputStream fos = new FileOutputStream(file);
 > ByteArrayOutputStream baos = new
 > ByteArrayOutputStream();
 > marshaller.marshall(baos, workingMemory);
 > baos.writeTo(fos);
 > baos.close();
 >
 > When I try to unmarshall the session using
 >
 >  Marshaller marshaller = MarshallerFactory
 >
 .newMarshaller(workingMemory.getKnowledgeBase());
 >   FileInputStream fis = new
 > FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
 >   workingMemory = marshaller.unmarshall(fis);
 >
 > I'm getting the Error:
 >
 >
 > java.lang.AbstractMethodError:
 >
 org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
 > at
 >
 org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
 > at
 >
 org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
 > at
 >
 org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
 > at
 >
 org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
 > at
 >
 org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
 > at
 >
 mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
 > at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)
 >
 > No Idea what I'm missing out... any help will be appreciated...
 Thanks in
 > advance
 >
 >
 > --
 > cheers
 > Sumatheja Dasararaju
 >
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

>>>
>>>
>>>
>>> --
>>> cheers
>>> Sumatheja Dasararaju
>>>
>>>
>>>
>>
>>
>> --
>> cheers
>> Sumatheja Dasararaju
>>
>>
>>
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
cheers
Sumatheja Dasararaju
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread Michael Anstis
There was a dramatic change to the marshalling of binary packages for
5.4.CR1. AFAIK this would mean any existing binary package in Guvnor would
need to be rebuilt.

Downgrading JARs to older versions would effectively remove the marshalling
change and hence restore compatibility of older binary assets.

Edson, I think I am right? We need to call this loud and clear in the
release notes.

sent on the move

On 16 Apr 2012 12:33, "sumatheja"  wrote:

> I'm getting the same issue when I try to unmarshall a sample application
> which has the jbpm process (which moves out guvnor as possible cause).
> can someone guide if this is some bug? or should I change the jbpm jar
> version?
>
> On Mon, Apr 16, 2012 at 11:37 AM, sumatheja  wrote:
>
>> Hi,
>> I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which
>> were not executing so I imported the jars from jbpm 5.2 final.   The
>> marshalling and unmarshalling works fine if I have knowledge base without
>> rule-flows. I hope this gives some hint..
>>
>>
>> On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun 
>> wrote:
>>
>>> This kind of error indicates some confusion between compilation and
>>> execution of the code where this is thrown.
>>>
>>> Also, which versions of Drools do you used for marshalling and
>>> unmarshalling? There's no line 287 in the versions of
>>> org.drools.marshalling.impl.PersisterHelper.java available to me.
>>>
>>> -W
>>>
>>>
>>> On 16/04/2012, sumatheja  wrote:
>>> > Hi All,
>>> > I ran across an issue while unmarshalling
>>> StatefulKnowledgeSession.
>>> > First I'm marshalling the session using the following code which works
>>> fine
>>> >
>>> > Marshaller marshaller = MarshallerFactory
>>> >
>>> > .newMarshaller(workingMemory.getKnowledgeBase());
>>> > File file = new File(
>>> > "C:\\Users\\Sumatheja\\workingmemory.info
>>> ");
>>> > FileOutputStream fos = new FileOutputStream(file);
>>> > ByteArrayOutputStream baos = new
>>> > ByteArrayOutputStream();
>>> > marshaller.marshall(baos, workingMemory);
>>> > baos.writeTo(fos);
>>> > baos.close();
>>> >
>>> > When I try to unmarshall the session using
>>> >
>>> >  Marshaller marshaller = MarshallerFactory
>>> >
>>> .newMarshaller(workingMemory.getKnowledgeBase());
>>> >   FileInputStream fis = new
>>> > FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
>>> >   workingMemory = marshaller.unmarshall(fis);
>>> >
>>> > I'm getting the Error:
>>> >
>>> >
>>> > java.lang.AbstractMethodError:
>>> >
>>> org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
>>> > at
>>> >
>>> org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
>>> > at
>>> >
>>> org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
>>> > at
>>> >
>>> org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
>>> > at
>>> >
>>> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
>>> > at
>>> >
>>> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
>>> > at
>>> >
>>> mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
>>> > at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)
>>> >
>>> > No Idea what I'm missing out... any help will be appreciated... Thanks
>>> in
>>> > advance
>>> >
>>> >
>>> > --
>>> > cheers
>>> > Sumatheja Dasararaju
>>> >
>>> ___
>>> rules-users mailing list
>>> rules-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>>
>> --
>> cheers
>> Sumatheja Dasararaju
>>
>>
>>
>
>
> --
> cheers
> Sumatheja Dasararaju
>
>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread sumatheja
I'm getting the same issue when I try to unmarshall a sample application
which has the jbpm process (which moves out guvnor as possible cause).
can someone guide if this is some bug? or should I change the jbpm jar
version?

On Mon, Apr 16, 2012 at 11:37 AM, sumatheja  wrote:

> Hi,
> I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which
> were not executing so I imported the jars from jbpm 5.2 final.   The
> marshalling and unmarshalling works fine if I have knowledge base without
> rule-flows. I hope this gives some hint..
>
>
> On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun 
> wrote:
>
>> This kind of error indicates some confusion between compilation and
>> execution of the code where this is thrown.
>>
>> Also, which versions of Drools do you used for marshalling and
>> unmarshalling? There's no line 287 in the versions of
>> org.drools.marshalling.impl.PersisterHelper.java available to me.
>>
>> -W
>>
>>
>> On 16/04/2012, sumatheja  wrote:
>> > Hi All,
>> > I ran across an issue while unmarshalling
>> StatefulKnowledgeSession.
>> > First I'm marshalling the session using the following code which works
>> fine
>> >
>> > Marshaller marshaller = MarshallerFactory
>> >
>> > .newMarshaller(workingMemory.getKnowledgeBase());
>> > File file = new File(
>> > "C:\\Users\\Sumatheja\\workingmemory.info
>> ");
>> > FileOutputStream fos = new FileOutputStream(file);
>> > ByteArrayOutputStream baos = new
>> > ByteArrayOutputStream();
>> > marshaller.marshall(baos, workingMemory);
>> > baos.writeTo(fos);
>> > baos.close();
>> >
>> > When I try to unmarshall the session using
>> >
>> >  Marshaller marshaller = MarshallerFactory
>> >
>> .newMarshaller(workingMemory.getKnowledgeBase());
>> >   FileInputStream fis = new
>> > FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
>> >   workingMemory = marshaller.unmarshall(fis);
>> >
>> > I'm getting the Error:
>> >
>> >
>> > java.lang.AbstractMethodError:
>> >
>> org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
>> > at
>> >
>> org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
>> > at
>> >
>> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
>> > at
>> >
>> mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
>> > at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)
>> >
>> > No Idea what I'm missing out... any help will be appreciated... Thanks
>> in
>> > advance
>> >
>> >
>> > --
>> > cheers
>> > Sumatheja Dasararaju
>> >
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
> --
> cheers
> Sumatheja Dasararaju
>
>
>


-- 
cheers
Sumatheja Dasararaju
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] KnowledgeAgent Changeset problems

2012-04-16 Thread albertorugnone
I am here again! Somebody, can help me in some way? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/KnowledgeAgent-Changeset-problems-tp3787165p3914095.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] please provide a rule for events timeout cases

2012-04-16 Thread Wolfgang Laun
You might use a timer:

rule no_response
   timer( int: 10s )
when
   EventRecord( type=EventRequest, id=1 )
   not EventRecord( type=EventResponse, id=1 )
then
  // ... no matching response after 10s
end

-W



On 16/04/2012, skatta1986  wrote:
> Hi,
>
> For the first time even I have tried the same. But it doesn't work.
>
> I need to correlate the events on live. I am using fire rule until hault
> (ksession.fireUntilHalt()).
>
> EventRecord(type=EventRequest, id=1)
> not EventRecord(type=EventResponse, id=1, this after [1s,10s])
>
> This rule doesn't work because when EventRecord(type=EventRequest, id=1) hit
> working memory, this rule also looks for EventRecord(type=EventResponse,
> id=1). As the EventResponse doesn't the working memory, "not" logic become
> true and executing the R.H.S part as soon as EventRequest arrives. This is
> not waiting for 10seconds time interval.
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3914047.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread sumatheja
Hi,
I'm using drools and guvnor 5.4 cr1. I've few drools ruleflows which
were not executing so I imported the jars from jbpm 5.2 final.   The
marshalling and unmarshalling works fine if I have knowledge base without
rule-flows. I hope this gives some hint..

On Mon, Apr 16, 2012 at 11:29 AM, Wolfgang Laun wrote:

> This kind of error indicates some confusion between compilation and
> execution of the code where this is thrown.
>
> Also, which versions of Drools do you used for marshalling and
> unmarshalling? There's no line 287 in the versions of
> org.drools.marshalling.impl.PersisterHelper.java available to me.
>
> -W
>
>
> On 16/04/2012, sumatheja  wrote:
> > Hi All,
> > I ran across an issue while unmarshalling
> StatefulKnowledgeSession.
> > First I'm marshalling the session using the following code which works
> fine
> >
> > Marshaller marshaller = MarshallerFactory
> >
> > .newMarshaller(workingMemory.getKnowledgeBase());
> > File file = new File(
> > "C:\\Users\\Sumatheja\\workingmemory.info");
> > FileOutputStream fos = new FileOutputStream(file);
> > ByteArrayOutputStream baos = new
> > ByteArrayOutputStream();
> > marshaller.marshall(baos, workingMemory);
> > baos.writeTo(fos);
> > baos.close();
> >
> > When I try to unmarshall the session using
> >
> >  Marshaller marshaller = MarshallerFactory
> > .newMarshaller(workingMemory.getKnowledgeBase());
> >   FileInputStream fis = new
> > FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
> >   workingMemory = marshaller.unmarshall(fis);
> >
> > I'm getting the Error:
> >
> >
> > java.lang.AbstractMethodError:
> >
> org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
> > at
> >
> org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
> > at
> >
> org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
> > at
> >
> org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
> > at
> >
> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
> > at
> >
> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
> > at
> >
> mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
> > at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)
> >
> > No Idea what I'm missing out... any help will be appreciated... Thanks in
> > advance
> >
> >
> > --
> > cheers
> > Sumatheja Dasararaju
> >
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
cheers
Sumatheja Dasararaju
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Can i see a Decision Table in Tempate (like:each row one Decision Table)

2012-04-16 Thread Michael Anstis
With 5.4.CR1 you can define a decision table with BRL fragments as columns.
This is probably what you are after.

sent on the move

On 16 Apr 2012 08:13, "srinivasasanda"  wrote:

> Hi
>
> I have a doubt Please let me know whether it is possible or not.
> There is a option in guvnor create "new rule template" (here we are
> creating
> new rule by using WHEN &  THEN  options), So my doubt is when i click new
> rule template i want to get "Decision Table" format like
>
> Decision table
>  |
>  |->Condition Columns
>  |->Action columsn
>  |->options
>
> -here decision table
>
> I want to see above options when i click new rule template.
> So, If it possible means each row in template in can see one Decision
> Table.
>
> Thanks,
> Sanda
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Can-i-see-a-Decision-Table-in-Tempate-like-each-row-one-Decision-Table-tp3913711p3913711.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] please provide a rule for events timeout cases

2012-04-16 Thread skatta1986
Hi,

For the first time even I have tried the same. But it doesn't work. 

I need to correlate the events on live. I am using fire rule until hault
(ksession.fireUntilHalt()).

EventRecord(type=EventRequest, id=1) 
not EventRecord(type=EventResponse, id=1, this after [1s,10s])

This rule doesn't work because when EventRecord(type=EventRequest, id=1) hit
working memory, this rule also looks for EventRecord(type=EventResponse,
id=1). As the EventResponse doesn't the working memory, "not" logic become
true and executing the R.H.S part as soon as EventRequest arrives. This is
not waiting for 10seconds time interval.


--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3914047.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



Re: [rules-users] Unable to Load Enum Data into Template

2012-04-16 Thread Michael Anstis
What version of Guvnor are you using? There was a bug that was fixed in
5.4.CR1 - I am not sure of the exact version, but it was probably before
this.

sent on the move

On 16 Apr 2012 07:53, "srinivasasanda"  wrote:

> Hi All,
>   I was able to create Enumeration 'MyEnum.age': ['30', '20']and that
> enumeration is successfuly retrieving in normal Rule.But,In Creating
> RuleTemplate,I'm unable to load that enum data.I specified template key as
> $age in the rule.After Loading TemplateData,enum list is not being
> displayed.how can i achieve that..Please suggest me..
>
> Sanda
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Unable-to-Load-Enum-Data-into-Template-tp3913672p3913672.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread Wolfgang Laun
This kind of error indicates some confusion between compilation and
execution of the code where this is thrown.

Also, which versions of Drools do you used for marshalling and
unmarshalling? There's no line 287 in the versions of
org.drools.marshalling.impl.PersisterHelper.java available to me.

-W


On 16/04/2012, sumatheja  wrote:
> Hi All,
> I ran across an issue while unmarshalling StatefulKnowledgeSession.
> First I'm marshalling the session using the following code which works fine
>
> Marshaller marshaller = MarshallerFactory
>
> .newMarshaller(workingMemory.getKnowledgeBase());
> File file = new File(
> "C:\\Users\\Sumatheja\\workingmemory.info");
> FileOutputStream fos = new FileOutputStream(file);
> ByteArrayOutputStream baos = new
> ByteArrayOutputStream();
> marshaller.marshall(baos, workingMemory);
> baos.writeTo(fos);
> baos.close();
>
> When I try to unmarshall the session using
>
>  Marshaller marshaller = MarshallerFactory
> .newMarshaller(workingMemory.getKnowledgeBase());
>   FileInputStream fis = new
> FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
>   workingMemory = marshaller.unmarshall(fis);
>
> I'm getting the Error:
>
>
> java.lang.AbstractMethodError:
> org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
> at
> org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
> at
> org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
> at
> org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
> at
> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
> at
> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
> at
> mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
> at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)
>
> No Idea what I'm missing out... any help will be appreciated... Thanks in
> advance
>
>
> --
> cheers
> Sumatheja Dasararaju
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] "java.lang.AbstractMethodError: org.jbpm.marshalling.impl.ProcessMarshallerImpl.init" while unmarshalling statefulknowledgesession

2012-04-16 Thread sumatheja
Hi All,
I ran across an issue while unmarshalling StatefulKnowledgeSession.
First I'm marshalling the session using the following code which works fine

Marshaller marshaller = MarshallerFactory

.newMarshaller(workingMemory.getKnowledgeBase());
File file = new File(
"C:\\Users\\Sumatheja\\workingmemory.info");
FileOutputStream fos = new FileOutputStream(file);
ByteArrayOutputStream baos = new
ByteArrayOutputStream();
marshaller.marshall(baos, workingMemory);
baos.writeTo(fos);
baos.close();

When I try to unmarshall the session using

 Marshaller marshaller = MarshallerFactory
.newMarshaller(workingMemory.getKnowledgeBase());
  FileInputStream fis = new
FileInputStream("C:\\Users\\Sumatheja\\workingmemory.info");
  workingMemory = marshaller.unmarshall(fis);

I'm getting the Error:


java.lang.AbstractMethodError:
org.jbpm.marshalling.impl.ProcessMarshallerImpl.init(Lorg/drools/marshalling/impl/MarshallerReaderContext;)V
at
org.drools.marshalling.impl.PersisterHelper.buildRegistry(PersisterHelper.java:287)
at
org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:219)
at
org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
at
org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
at
org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:86)
at
mattelli.re.ComplianceEngine.ComplianceRunService(ComplianceEngine.java:271)
at mattelli.re.ComplianceEngine.main(ComplianceEngine.java:84)

No Idea what I'm missing out... any help will be appreciated... Thanks in
advance


-- 
cheers
Sumatheja Dasararaju
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Planner : multiple planning entities

2012-04-16 Thread TEddahabi
It's not exactly the cloudbalancing example, I made some changes in the
original example :
- I made the /CloudComputer/ a planing entity class
- I added a /state/ planning variable  in /CloudComputer/ class ( which take
values from a list in the same class, there is a list of states for each
computer), this state will give cpuPower, and cost ...

Do you see better the problem ?
Thank you for help !!


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Planner-multiple-planning-entities-tp3878013p3913973.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Planner : multiple planning entities

2012-04-16 Thread Geoffrey De Smet
> *Exception in thread "main" java.lang.IllegalArgumentException: The
> planningEntityClass (class
> org.drools.planner.examples.cloudbalancing.domain.CloudAssignment) has a
> PlanningVariable annotated property (cloudComputer) with
> excludeUninitializedPlanningEntity (true), but there is no planning entity
> class that extends the variablePropertyType (class
> org.drools.planner.examples.cloudbalancing.domain.CloudComputer).
Why is the error not understandable?
Take a look in the manual what excludeUninitializedPlanningEntity does.
This won't work on cloudBalance naturally, as no planning value is a 
planning entity.

Op 16-04-12 11:12, TEddahabi schreef:
> I use the 5.4.0.CR1 version and make
> ValueRange.excludeUninitializedPlanningEntity on true (as you advised me),
> but I'm getting this exception :
>
> *Exception in thread "main" java.lang.IllegalArgumentException: The
> planningEntityClass (class
> org.drools.planner.examples.cloudbalancing.domain.CloudAssignment) has a
> PlanningVariable annotated property (cloudComputer) with
> excludeUninitializedPlanningEntity (true), but there is no planning entity
> class that extends the variablePropertyType (class
> org.drools.planner.examples.cloudbalancing.domain.CloudComputer).
>   at
> org.drools.planner.core.domain.variable.AbstractPlanningValueRangeDescriptor.processExcludeUninitializedPlanningEntity(AbstractPlanningValueRangeDescriptor.java:50)
>   at
> org.drools.planner.core.domain.variable.SolutionPropertyPlanningValueRangeDescriptor.processValueRangeAnnotation(SolutionPropertyPlanningValueRangeDescriptor.java:57)
>   at
> org.drools.planner.core.domain.variable.SolutionPropertyPlanningValueRangeDescriptor.(SolutionPropertyPlanningValueRangeDescriptor.java:35)
>   at
> org.drools.planner.core.domain.variable.PlanningVariableDescriptor.buildValueRangeDescriptor(PlanningVariableDescriptor.java:161)
>   at
> org.drools.planner.core.domain.variable.PlanningVariableDescriptor.processValueRangeAnnotation(PlanningVariableDescriptor.java:141)
>   at
> org.drools.planner.core.domain.variable.PlanningVariableDescriptor.processPropertyAnnotations(PlanningVariableDescriptor.java:64)
>   at
> org.drools.planner.core.domain.variable.PlanningVariableDescriptor.processAnnotations(PlanningVariableDescriptor.java:54)
>   at
> org.drools.planner.core.domain.entity.PlanningEntityDescriptor.processPropertyAnnotations(PlanningEntityDescriptor.java:148)
>   at
> org.drools.planner.core.domain.entity.PlanningEntityDescriptor.processAnnotations(PlanningEntityDescriptor.java:64)
>   at
> org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:187)
>   at
> org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:149)
>   at
> org.drools.planner.config.XmlSolverFactory.buildSolver(XmlSolverFactory.java:112)*
>
> Could you help me please to fix this problem ?
> Thank you !!
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Drools-Planner-multiple-planning-entities-tp3878013p3913893.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

-- 
With kind regards,
Geoffrey De Smet


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Planner : multiple planning entities

2012-04-16 Thread TEddahabi
I use the 5.4.0.CR1 version and make
ValueRange.excludeUninitializedPlanningEntity on true (as you advised me),
but I'm getting this exception :

*Exception in thread "main" java.lang.IllegalArgumentException: The
planningEntityClass (class
org.drools.planner.examples.cloudbalancing.domain.CloudAssignment) has a
PlanningVariable annotated property (cloudComputer) with
excludeUninitializedPlanningEntity (true), but there is no planning entity
class that extends the variablePropertyType (class
org.drools.planner.examples.cloudbalancing.domain.CloudComputer).
at
org.drools.planner.core.domain.variable.AbstractPlanningValueRangeDescriptor.processExcludeUninitializedPlanningEntity(AbstractPlanningValueRangeDescriptor.java:50)
at
org.drools.planner.core.domain.variable.SolutionPropertyPlanningValueRangeDescriptor.processValueRangeAnnotation(SolutionPropertyPlanningValueRangeDescriptor.java:57)
at
org.drools.planner.core.domain.variable.SolutionPropertyPlanningValueRangeDescriptor.(SolutionPropertyPlanningValueRangeDescriptor.java:35)
at
org.drools.planner.core.domain.variable.PlanningVariableDescriptor.buildValueRangeDescriptor(PlanningVariableDescriptor.java:161)
at
org.drools.planner.core.domain.variable.PlanningVariableDescriptor.processValueRangeAnnotation(PlanningVariableDescriptor.java:141)
at
org.drools.planner.core.domain.variable.PlanningVariableDescriptor.processPropertyAnnotations(PlanningVariableDescriptor.java:64)
at
org.drools.planner.core.domain.variable.PlanningVariableDescriptor.processAnnotations(PlanningVariableDescriptor.java:54)
at
org.drools.planner.core.domain.entity.PlanningEntityDescriptor.processPropertyAnnotations(PlanningEntityDescriptor.java:148)
at
org.drools.planner.core.domain.entity.PlanningEntityDescriptor.processAnnotations(PlanningEntityDescriptor.java:64)
at
org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:187)
at
org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:149)
at
org.drools.planner.config.XmlSolverFactory.buildSolver(XmlSolverFactory.java:112)*

Could you help me please to fix this problem ?
Thank you !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Planner-multiple-planning-entities-tp3878013p3913893.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Performace Issues drools

2012-04-16 Thread sanal
Hi ,

 I am trying to use drools where the rules are
defined in a tree format.

 eg:Iam explaining it with a hospital senario. A healtcarepackage has got
set of criteria which is defined in a tree format.

 

QtyLimit  
AmtLimit  Excluded
   -- ServiceGroup   -
-  -

  DrugGroup  1  


  ServiceGroup  15000

  LabServices  2

 -GlucoseTest   

Y

-RadiologyServices   2

--XRayChest  5

 

 

Here each of the package criteria is a packagecomponent. and service which
are ordered for patient is a ServiceComponent.Using the above rules ideed to
check wether the service component can be part of the package or not?There
are few more critriea other than above
given(TariffClassType,Tariffclassvalue...etc)

 

 

I have included the Drl which iam using.I have added all the
PackageComponents and the serviceComponents to working memory as facts to
the working memory.Is there any better way for implementing the same?

 

 

 


package com.his.billing.domain
import com.his.clinical.domain.PackageDefinition;
import com.his.clinical.domain.PackageComponent;
import com.his.billing.domain.OrderedComponent;
import com.his.billing.domain.AccumulatedComponent;
#From row number: 11*/
rule "Package Details_11"
 salience 8
when
 $orderedComponent:OrderedComponent($id1:componentKey,$qty:componentQty) and
   
$pkgComps:PackageComponent(componentKey==$id1,isPackageComponent==true,isActive==true)
then
 $orderedComponent.setIsPackageComponent(true);
end
 

/*#From row number: 12*/
rule "Package Details_12"
  salience 7
when

$orderedComponent:OrderedComponent($id1:componentKey,$orderTariffClassType:tariffClassType,$orderTariffClassId:tariffClassValue)
and
   
$pkgComps:PackageComponent(componentKey==$id1,isExcluded==true,(tariffClassTypeValue==null
|| tariffClassTypeValue=="" || (tariffClassTypeValue!=null &&
tariffClassTypeValue == $orderTariffClassType)),(tariffClassValue==null ||
(tariffClassValue!=null &&
tariffClassValue==$orderTariffClassId)),isPackageComponent==true,isActive==true)
 
then
$orderedComponent.setIsExluded(true);
end
 

/*

#From row number: 21*/
 
rule "Package Rate_13"
 salience 6
when
   $objOrderedComponents:AccumulatedComponent()
   $packageDefinition:PackageDefinition($packageId:packageId)
  
$orderedComponent:OrderedComponent($id1:componentKey,$amount:componentAmt,$qty:componentQty,$orderTariffClassType:tariffClassType,$orderTariffClassId:tariffClassValue)
and
   $accumulatedQty:Number()
   from accumulate (
$accQtyComponent:OrderedComponent(packageChargeRecordId==$packageId, $AccQty
: componentQty) from
$objOrderedComponents.getOrderedComponentList(),sum($AccQty ) ) and
   $pkgComps:PackageComponent(componentKey==$id1,(quantityLmt == 0 ||
quantityLmt != null || quantityLmt
<($qty+$accumulatedQty.intValue())),isPackageComponent==true,isActive==true,(tariffClassTypeValue==null
|| tariffClassTypeValue=="" || (tariffClassTypeValue!=null &&
tariffClassTypeValue == $orderTariffClassType)),(tariffClassValue==null ||
(tariffClassValue!=null && tariffClassValue==$orderTariffClassId))) 
then
   $orderedComponent.setIsQtyExceeded(true);
end
 

/*

#From row number: 21*/
rule "Package Rate_14"
  salience 5
when
   $objOrderedComponents:AccumulatedComponent()
   $packageDefinition:PackageDefinition($packageId:packageId)
  
$orderedComponent:OrderedComponent($id1:componentKey,$amount:componentAmt,$qty:componentQty,$orderTariffClassType:tariffClassType,$orderTariffClassId:tariffClassValue)
and
   $accumulatedAmount:Number()
   from accumulate (
$accAmtComponent:OrderedComponent(packageChargeRecordId==$packageId,$accAmount:componentAmt)
from $objOrderedComponents.getOrderedComponentList(),sum($accAmount ) ) and
   $pkgComps:PackageComponent(componentKey==$id1,( amountLmt == 0 ||
amountLmt == null || amountLmt
<($amount+$accumulatedAmount.intValue())),isPackageComponent==true,isActive==true,(tariffClassTypeValue==null
|| tariffClassTypeValue=="" || (tariffClassTypeValue!=null &&
tariffClassTypeValue == $orderTariffClassType)),(tariffClassValue==null ||
(tariffClassValue!=null && tariffClassValue==$orderTariffClassId))) 
then
   $orderedComponent.setIsAmtExceeded(true);
end
 

 
 
/*#From row number: 22*/
rule "Package Details_15"
salience 4
when
 $orderedComponent:OrderedComponent($id1:componentKey)

$pkgComps:PackageComponent(componentKey==$id1,isPackageComponent==true,exemption==true,isActive==true)
then
 $orderedComponent.setExemption(tru

Re: [rules-users] Planner 5.3.0 Final - Issue with Local Search / Move

2012-04-16 Thread Geoffrey De Smet


Op 16-04-12 06:36, duggal schreef:
> I am solving a resource allocation problem using the Planner and have run
> into a few issues with the use of Local Search.
> The objective is to assign tasks to a set of resources. Each task has a
> start and end time and NO task should overlap each other for the same
> resource. There are other rules for preference and mandate of certain tasks
> to certain resources.
>
> I am using the FIRST_FIT construction heuristic which works fine.
Tip: FIRST_FIT is good, FIRST_FIT_DECREASING is usually better.
> I have implemented a Resource Change Move which assigns a new planning
> variable to my planning entity. There seem to be issues with this phase.
If you upgrade to 5.4.0.CR1, you can use the generic change move and 
generic swap move
   
http://docs.jboss.org/drools/release/5.4.0.CR1/drools-planner-docs/html_single/index.html#d0e4563
> **Problem** -
> 1. While looking at the solution created at the end of the local search
> phase AND comparing to the moves output in the log file. I see that there
> are several instances where the log file shows a move BUT the output
> solution has the entity still on the previous planning variable.
> This is happening only towards the end of the phase (about last 8 steps) of
> the time terminated phase.
This sounds like a genuine bug.
Could you copy paste some logging output to show the issue more clearly?

Can you check if 5.4.0.CR1 still has the issue and create a jira:
   https://issues.jboss.org/browse/JBRULES
> 2. I have a rule in the DRL score file which prevents overlap of allocations
> of the task for the same resource. I have instances where the construction
> heuristic violated this constraint. The local search solver then moved one
> of the overlapping entity to another resource. However the final output
> shows the constraint still EXISTS between the two entities (even though the
> overlap is no longer present). As a result even though the constraints are
> actually removed, the score is NOT going down as the planner constraints
> still exist.
> The rule used by me is as follows (Allocation is the planning entity and
> resource is the variable) -
> rule "noOverlapAllocations"
>  when
>  $allocation1 : Allocation($id : id, $resource : resource, $task :
> task, resource != null)
>  $allocation2 : Allocation(id>  $id, resource == $resource,
> isOverlap($task), $id2 : id)
>  then
>  insertLogical(new IntConstraintOccurrence("overlapAllocation",
> ConstraintType.NEGATIVE_HARD, 1, $allocation1, $allocation2));
> end
>
> Please help me resolve these issues.
Smells like a memory corruption in drools-core. There is one fixed for 
5.4.0.CR1, so

First turn on TRACE and see what it outputs.
   
http://docs.jboss.org/drools/release/5.4.0.CR1/drools-planner-docs/html_single/index.html#d0e2873
Then upgrade to knowledge-api, drools-core and drools-compiler 5.4.0.CR1.
It's best to upgrade planner too, but you 'll need to follow this:
   
https://github.com/droolsjbpm/drools-planner/blob/master/drools-planner-distribution/src/main/assembly/filtered-resources/UpgradeFromPreviousVersionRecipe.txt
> Thanks
>
> Vikram
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Planner-5-3-0-Final-Issue-with-Local-Search-Move-tp3913541p3913541.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

-- 
With kind regards,
Geoffrey De Smet


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Can i see a Decision Table in Tempate (like:each row one Decision Table)

2012-04-16 Thread srinivasasanda
Hi

I have a doubt Please let me know whether it is possible or not.
There is a option in guvnor create "new rule template" (here we are creating
new rule by using WHEN &  THEN  options), So my doubt is when i click new
rule template i want to get "Decision Table" format like 

Decision table
  |
  |->Condition Columns
  |->Action columsn
  |->options

-here decision table

I want to see above options when i click new rule template.
So, If it possible means each row in template in can see one Decision Table.

Thanks,
Sanda

--
View this message in context: 
http://drools.46999.n3.nabble.com/Can-i-see-a-Decision-Table-in-Tempate-like-each-row-one-Decision-Table-tp3913711p3913711.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users