Re: [rules-users] Changing asset metadata properties in Guvnor

2013-03-28 Thread Jervis Liu
On 2013/3/26 20:56, morfeus929 wrote: My code is : URL baseURL = new URL(http://localhost:8080/guvnor-5.5.0.Final-tomcat-6.0/;); URL url = new URL(baseURL, rest/packages/mortgages/assets/bobik); HttpURLConnection connection =

[rules-users] Working memory - database synchronisation approach

2013-03-28 Thread riri
Hello everyone, I am currently working on a Spring, Hibernate, Bitronix project and am trying to integrate Drools functionality. I have a set of JPA Entities that I can manage using Spring Data and Hibernate and I would like to use these entities as facts inside a StatefulKnowledgeSession. As I

Re: [rules-users] Upload POJO model, no facts are imported

2013-03-28 Thread rjr201
When you upload the Jar file you have to then go to 'File'-'Save' and check it in. If the objects still don't appear, try going to the edit tab on the package and looking at the list under Configuration: Imported types. If there is nothing in this list, click on the green cross and see if you can

Re: [rules-users] Upload POJO model, no facts are imported

2013-03-28 Thread Stephen Masters
The usual reason for the POJO jar upload doing nothing is when it contains classes with dependencies which are not on the Guvnor classpath. btw … Although there is an option in the menu, you don't actually need to 'save'. That happens as soon as the 'upload' is complete. I don't know whether

Re: [rules-users] Changing asset metadata properties in Guvnor

2013-03-28 Thread morfeus929
Thanks for your answer, it was helpful. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Changing-asset-metadata-properties-in-Guvnor-tp4023019p4023097.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Working memory - database synchronisation approach

2013-03-28 Thread Stephen Masters
That sounds like a decent design to me. I don't much like having persistence inside the rules. The issue you have seems more related to the fact that you're executing the rules in a separate thread than your persistence design. I don't suppose you're actually spawning a thread from inside a

Re: [rules-users] Working memory - database synchronisation approach

2013-03-28 Thread Stephen Masters
fyi - There may be simpler/cleaner ways of doing it, but if you wish to ensure that you always have access to your Spring context even when you're out roaming on a separate thread, you can get static access to the context like this below. I use it so that I can use Spring to help me get data

Re: [rules-users] Changing asset metadata properties in Guvnor

2013-03-28 Thread kurrent93
Hi Jervis Where do I go to raise a jira ticket for this? br Anton -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Changing-asset-metadata-properties-in-Guvnor-tp4023019p4023101.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Working memory - database synchronisation approach

2013-03-28 Thread riri
Thank you very much for the quick replies! I would very much like to avoid having persistence in my rules but I am not sure how to get notified of changes of an object inside the working memory so that the service to update it can be called outside the WorkingMemoryEventListener. What I have

Re: [rules-users] Working memory - database synchronisation approach

2013-03-28 Thread Stephen Masters
Aha! From that explanation, it sounds like the problem is that the unit test itself has been marked as transactional, rather than just the database update. It also sounds a bit like you're managing the entity persistence from inside the entities themselves, which is likely to cause troubles if

Re: [rules-users] Working memory - database synchronisation approach

2013-03-28 Thread riri
I may not have explained the architecture I have very well so here it is: I have plain JPA entities, some of which I want to insert as facts in the working memory, all entities have repositories defined for them via the Spring Data JpaRepository and these repositories are called by Spring Services

[rules-users] Drools JPA Example

2013-03-28 Thread Charles Moulliard
Hi, I'm looking for a Drools JPA example. As the Drools Community Project does not contain such example I contact the community to figure out if such example exist and is available in a git repo Regards, -- Charles Moulliard Apache Committer / Sr. Enterprise Architect (RedHat) Twitter :

Re: [rules-users] Planner: drl for Selection and Decreasing

2013-03-28 Thread Al Ferguson
Here is a Java version of what a first draft scoring might look: Can someone help me for the drl equivalent? Geoffrey? -- View this message in context: http://drools.46999.n3.nabble.com/Planner-drl-for-Selection-and-Decreasing-tp4022999p4023111.html Sent from the Drools: User forum mailing

Re: [rules-users] Planner: drl for Selection and Decreasing

2013-03-28 Thread Geoffrey De Smet
You could put that in a SimpleScoreCalculator and use scoreDirectorFactory's assertScoreDirector to assert any DRL you write. As for the DRL: for (final OrderLine planningEntity : orderSourcing.getOrderLineList()) { when OrderLine(...) if (allocatedResource == null) { when

[rules-users] Issue with Rule X1 extends X2

2013-03-28 Thread arul.prasha...@gmail.com
When two rules recide within a same drl extends works as expected. rule Base_Rule|1.1.2 enabled false when $bdy : BDY() Vehicles() then System.out.println( 222 +$bdy); end rule TX_Rule|1.1.2 extends Base_Rule|1.1.2 when then System.out.println(

Re: [rules-users] Issue with Rule X1 extends X2

2013-03-28 Thread Wolfgang Laun
It works for me. Make sure to test for errors after compilation ( kBuilder.hasErrors() ). The code you've shown for the 2nd scenario is incomplete, so no comment. -W On 29/03/2013, arul.prasha...@gmail.com arul.prasha...@gmail.com wrote: When two rules recide within a same drl extends works