Re: [rules-users] Seting up test scenarios for Excel Decision Table with a map of data coming in

2014-02-06 Thread abhinay_agarwal
Hi Laune,

When you say /If you can insert data for the declared incomingData and make
a rule
fire for each fact, the consequence could create the map from the
fields of the incomingData fact and insert it/

I don't understand, how will the map be created automatically. Can you give
an example or  sscce http://sscce.org  

- AA



--
View this message in context: 
http://drools.46999.n3.nabble.com/Seting-up-test-scenarios-for-Excel-Decision-Table-with-a-map-of-data-coming-in-tp4027995p4028005.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] Seting up test scenarios for Excel Decision Table with a map of data coming in

2014-02-06 Thread Wolfgang Laun
On 06/02/2014, abhinay_agarwal abhinay_agar...@infosys.com wrote:
 Hi Laune,

 When you say /If you can insert data for the declared incomingData and
 make
 a rule
 fire for each fact, the consequence could create the map from the
 fields of the incomingData fact and insert it/

 I don't understand, how will the map be created automatically. Can you give
 an example or  sscce http://sscce.org

I did not write automatically. - In a single rule firing for each
incomingData, let the RHS code create a map, put the incomingData
object's  fields as map elements  and insert the map.

-W



 - AA



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Seting-up-test-scenarios-for-Excel-Decision-Table-with-a-map-of-data-coming-in-tp4027995p4028005.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] Seting up test scenarios for Excel Decision Table with a map of data coming in

2014-02-06 Thread abhinay_agarwal
ahh.. now I get it. You just wanted the map to be created and inserted
through the rules itself. :)



--
View this message in context: 
http://drools.46999.n3.nabble.com/Seting-up-test-scenarios-for-Excel-Decision-Table-with-a-map-of-data-coming-in-tp4027995p4028007.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] [Optaplanner] provisioning / scalability

2014-02-06 Thread Mats Norén
Hi,
I have a use case where multiple users need to run multiple simultaneous
solvers.
Is there a best practice in scaling out Optaplanner for multitenancy?
Just to be clear I'm not interested in scaling out a single optimization
run but instead multiple solvers.
So I'm looking for pros and cons for:
- multiple solvers in the same JVM
- multiple JVM:s on a single machine (with multiple solvers)
- multiple machine setup
- virtual machine vs lxc (Docker) vs bare metal

I'm also interested in provisioning of rules etc

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

Re: [rules-users] [Optaplanner] provisioning / scalability

2014-02-06 Thread Geoffrey De Smet


On 06-02-14 14:17, Mats Norén wrote:

Hi,
I have a use case where multiple users need to run multiple 
simultaneous solvers.

Is there a best practice in scaling out Optaplanner for multitenancy?
Just to be clear I'm not interested in scaling out a single 
optimization run but instead multiple solvers.

So I'm looking for pros and cons for:
- multiple solvers in the same JVM

Provide 1 CPU core per Solver that's running in parallel.
1 Solver saturates 1 CPU core entirely
and it is ussually happy if it has 300mb of free heap space on top of it 
needs as a bare minimum.
If there is no such free heap space, you're basically trading more cpu 
for less memory (due to higher GC activity).


So provide 1 CPU core per Solver that's running in parallel.
If you need to run 8 jobs and have 4 CPU cores, I would probably run 4 
at the same time for half the time.

- multiple JVM:s on a single machine (with multiple solvers)
I see no reason to do that. By using 1 JVM you pool class instances, etc 
so use less memory overall.

- multiple machine setup

Definitely the way to increase Solvers running in parallel.

- virtual machine vs lxc (Docker) vs bare metal

No data on that yet.


I'm also interested in provisioning of rules etc

Let me know what works well for you and what doesn't with multitenancy!


Regards,
Mats



___
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] 6.0.1.F Guided Rule makes all argument types strings

2014-02-06 Thread SrjTx
I have a global class foo with method bar(int x, int y, string s);

I added it to a globals file as alias x.

In a then in an rdrl, I can select call a method on x, so I choose
bar.  I get 3 text boxes 
   int[]
   int[]
   string[]

And I fill in 
   int[3   ]
   int[8   ]
   string[Hi  ]

The resulting source is x.bar(3, 8, Hi) - which fails validation
because the first two are supposed to be ints.  Do you enter ints
differently?  Or, is this a bug?

Also note that a space is always a;ready in the text boxes so you have to
delete it first.  If you just start typeing hi, you will get the value  Hi





--
View this message in context: 
http://drools.46999.n3.nabble.com/6-0-1-F-Guided-Rule-makes-all-argument-types-strings-tp4028010.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] Null pointer exception when adding drools to existing project

2014-02-06 Thread kashili
After 4 days of struggle, I found out that Helloworld program that drools
generates is infact HELLworld.
Source of issue is classpath.
Following are links that better explains this problem, than what is listed
in Drools wiki (or documentation).

http://www.javacodegeeks.com/2012/02/jboss-drools-getting-started.html
http://hocinegrine.com/2013/08/21/eclipse-maven-drools-5-5-0-final-example/





--
View this message in context: 
http://drools.46999.n3.nabble.com/Null-pointer-exception-when-adding-drools-to-existing-project-tp4027944p4028011.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] Seting up test scenarios for Excel Decision Table with a map of data coming in

2014-02-06 Thread mvanders
Thank you guys, for the above I've come to use the following.

This will also make it MUCH MUCH easier for the business users to add new
rules to the decision sheets (excel) and allow them to just use a simple Job
Fact for the input of data to test against :)

For others interested, what i ended up doing was creating an DRL rule in the
following fashion as per suggestion.

rule JobMapRule
dialect mvel
when
job : Job( )
then
Map incomingData = new HashMap();

incomingData.put('workType', job.workType);
incomingData.put('status', job.status);

insert(incomingData)
retract(job)
end

This way my incomingData Fact gets created to memory, then removes the Job
Fact from memory so that it does not appear to have fired within the Test
Scenarios as well :)

Thanks for your help. This has been an extremely large learning curve this
past few days.

Cheers
Mark



--
View this message in context: 
http://drools.46999.n3.nabble.com/Seting-up-test-scenarios-for-Excel-Decision-Table-with-a-map-of-data-coming-in-tp4027995p4028012.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] Seting up test scenarios for Excel Decision Table with a map of data coming in

2014-02-06 Thread mvanders
Last question I hope.

In the test scenario how can i stop it from telling me that the rule
JobMapRule fire. Within the test scenario it does not need to know that
information.

Cheers
Mark



--
View this message in context: 
http://drools.46999.n3.nabble.com/Seting-up-test-scenarios-for-Excel-Decision-Table-with-a-map-of-data-coming-in-tp4027995p4028013.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