Rules dont execute when republishing EAR on JBoss
by Ran Mochary
Hi,
I use Eclipse Galileo to deploy my EAR application and run a JBoss server
(version 5.1.0GA).
In order to work with Drools, I added the following jars under my JBoss
configuration lib/ folder: drools-api.jar, drools-compiler.jar,
drools-core.jar
My EAR include 2 .drl files - one is loaded and executed in a Servlet that
is loading on startup when JBoss is booting, and the other is loading and
running from the EJB layer.
When JBoss is launched from scratch, the rules get executed normally.
The rules get executed normally also when JBoss is stopped and started
again.
When I republish my EAR while JBoss is running, Eclipse will undeploy the
old EAR and redeploy the new EAR, as it would normally do.
However, in this case (republish/redeploy), no rules get executed except
rules with empty "when" clause.
I found a solution for this problem by replacing the 3 drools jar files from
version 5.1.1 to version 5.0.1.
In addition to my EAR, the JBoss server also runs Guvnor war. Guvnor 5.1.1
includes new features that I would like to use.
As I understand, reverting the 3 jars to 5.0.1 means I cannot use Guvnor
v5.1.1.
I would appreciate help with solving this problem.
Best regards,
Ran
Ran Mochary
Delegate Communications
15 years, 4 months
How to get correct version of rules based on effective date
by Faisal Shafique
Hi,
We are evaluating Drools to replace a big legacy eligibility system in government sector. One of the critical requirement is to have the system pull correct rule based on a date e.g interest rate was 5% till 12/31/2010 but changed to 6% from 1/1/2011. If we are running rules in 2010 or before, calculation should use 5% else it should use 6%. Rules will run with a user clicking a button and results will be shown to user so probably a StatelessSession will be used. Something like AgendaFilters to filter rules based on a date probably will not be very scalable since over time we'll have lot of different temporal version of rules and all of them will have to be in KnowledgeBase for AgendaFilter to work which will be memory intensive and un-needed.IMHO, we should build KnowledgeBase with correct version of rules in the first place. Any ideas or pointers?
Thanks
15 years, 4 months
Does this work - create new facts in session and add to other facts?
by Thomas Adler
Hi,
I am trying to use Drools and I would like to check whether such scenario could work:
I have facts Document and Line (EJB3 beans, in fact). And Document class has attribute:
List<Line> lines
So - I would like to pass to stateless session a Document instance "document" and I would like to write rule, that
1) create some new Lines;
2) calculates total from lines;
3) updates document.total;
4) add new Lines instances, that where created during the rule execution to document.lines;
And at the end of execution of this session I will like to do some other things with document and document.lines, e.g. persist in database.
So - can Drools handle such create of associations during the session execution?
Thanks!
Thomas
15 years, 4 months
Autoreply: Travis Smith is out of the office
by Travis_Smith@bnz.co.nz
I will be out of the office starting 18/02/2011 and will return on
06/03/2011.
I am on Annual Leave for the above duration.
For any URGENT issues in Lending Manager, HotDocs or Transact, please
contact BNZ Systems Support.
Regards,
-Trav
_______________________________________________
Travis Smith
Analyst Programmer
BTS Development Centre
Tel: +64 4 474 6356 Email: Travis_Smith(a)bnz.co.nz
CAUTION - This message may contain privileged and confidential information
intended only for the use of the addressee named above. If you are not the
intended recipient of this message you are hereby notified that any use,
dissemination, distribution or reproduction of this message is prohibited.
This email was sent by the Bank of New Zealand. You can contact us on
0800 ASK BNZ (0800 275 269). Any views expressed in this message are those
of the individual sender and may not necessarily reflect the views of Bank
of New Zealand.
15 years, 4 months
Eclipse IDE not validating .drl files
by StormeHawke
So it's been a while since I did any work with drools, so I don't know how
long this problem has been here, but I recently started working on a new
Drools project, using the latest Drools Eclipse IDE. Back on my previous
Drools project, if I had a syntax error in my code it would give me compile
errors in the IDE (I didn't have to wait until runtime). These syntax
errors didn't always make sense, but they were generally helpful for finding
misplaced semicolons and capitalization issues.
The latest version of the Drools IDE does not seem to do this any more. Is
this a deliberate change or is there something wrong with my configuration?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Eclipse-IDE-not-valid...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
Can't reload a saved BPMN2 process file...
by bob.breitling
I am running DROOLS 5.2.0-M1 with the latest designer war from 2.9.2011.
When I try to reload a saved BPMN2 process, I get this error in my jboss log
and the diagram does not display:
Cannot find the declaration of element 'bpmn2:definitions'.
By the way, the xmlns URIs are missing from the omg website.
If I access the guvnor from webdav I can see the BPMN file and I can open it
with a text editor, so the file is definitely there.
Also are there any examples of using BPMN2 with DROOLS? Everything I have
found uses Rule Flow and not BPMN.
Thanks,
Bob
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Can-t-reload-a-saved-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
Unterminated String Literal error
by StormeHawke
I'm getting an error as follows:
Error: Unable to build expression for 'consequence': [Error: unterminated
string literal]
[Near : {... label, priceValue);
}
} ....}]
I've combed the file looking for any stray quote characters, did a ctrl + f
and verified that all my string literals are closed, all my lines of code
have their appropriate ; terminations... I'm sure I'm probably missing
something obvious, but can somebody take a look for me?
I'm using Drools version 5.1.0; my rule file is below.
package net.intellidata.pricing.rules
import net.intellidata.pricing.data.model.PriceDataRecord;
import net.intellidata.pricing.PriceRequest;
import net.intellidata.pricing.result.PriceResult;
import net.intellidata.pricing.result.ValueType;
import net.intellidata.pricing.result.PriceValue;
import net.intellidata.pricing.data.InputType;
rule "someclient-default rule"
dialect "mvel"
when
$priceRequest : PriceRequest( )
$priceDataRecord : PriceDataRecord( )
then
PriceResult result = new PriceResult($priceRequest.getClient(),
$priceRequest.getRequestedPn());
for(InputType inputType : $priceDataRecord.keyset())
{
String label = inputType.getPropertyName();
Object value = $priceDataRecord.get(inputType);
ValueType valueType = null;
String valueDisplay = null;
switch(inputType)
{
//Don't add ID and PN to the result - ID is unnecessary and PN is
included as a separate property
case ID:
case PN:
break;
case PACKAGE_UNIT:
valueType = ValueType.INTEGER;
valueDisplay = value.toString();
break;
case MOQ_1:
case MOQ2:
valueType = ValueType.INTEGER;
valueDisplay = value.toString();
break
case PRICE_1:
case PRICE_2:
valueType = ValueType.BIG_DECIMAL;
valueDisplay = value.toString();
break;
case LEAD_TIME:
valueType = ValueType.DOUBLE;
valueDisplay = value.toString();
break;
default:
throw new IllegalArgumentException("InputType " + InputType.toString()
+ " is not defined for " + $priceRequest.getClient().getName());
}
if(valueType != null)
{
PriceValue priceValue = new PriceValue(label, value, valueType,
valueDisplay);
result.put(label, priceValue);
}
}
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Unterminated-String-L...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
Migrating from one environment to another
by Chris Selwyn
I am aware of the Guvnor export/import mechanism to move an entire
repository and the method of importing a DRL to create a package.
But what I have been looking for is a mechanism to move the entire
contents of a Guvnor package (DSL, model, DSLR file, DRL files etc) from
one Guvnor instance to another, so far without luck.
Is there such a mechanism?
Chris Selwyn
15 years, 4 months