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
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
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
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
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
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
Sliding time windows and interval-based events
by OlliSee
Hi there,
I can't seem to find a hint in the documentary about WHEN an event is
considered to be recognized by a sliding time window.
I tried it out myself with an event with a duration of 5000 (= 5s) and a
rule with a sliding time window of just 1s. So the event can never be
completely situated in the window, only the end or start time can be. As it
turns out, the rule fires once as soon as the event is inserted.
Personally, I don't like this behaviour. But why isn't this documented
somehow?
Kind regards
Oliver
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Sliding-time-windows-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
Expose JBoss rules as webservice
by Vkishore_Kumar
Hello,
I am developing a java based stand alone logger framework to plug in to my integration applications. After logging the messages, the framework need to forward the message to a notification service (a Java based SOAP/HTTP web service) . The business logic of this notification service now needs to be implemented using JBoss Business Rules Management System. Since my integration applications run on WebSphere server, I would be using the WebSphere SOAP engine for logger framework to invoke the notification web service. I am new to the JBoss suite of integration products. Could you please help me with the below
1. To build some rules, say if-else or decision tables, is JBoss BRMS alone sufficient?
2. Once the business rules are developed, is there a way to expose these rules as a SOAP/HTTP web service?
3. What are the set of products needed to develop and deploy this rule service as a SOAP/HTTP web service? I assume it is JBoss BRMS and JBoss Enterprise SOA Platform.
[cid:image001.png@01CBCDF2.1C66A5E0]
Any help/guidance on the above queries are greatly appreciated.
Thanks & Regards
Kishore
________________________________
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
15 years