Semantic Web Drools Module, Request for Feedbak
by Xavier Breton
Hi,
I'm looking for feedback, I'll develop a Semantic Web Drools Module that
will be the subject of my Master Degree Tesis.
The idea is to use Eclipse Modelling Framework (EMF) for prototyping and
follow a Model Driven Architecture (MDA) where the source language is
Semantic of Business Vocabularies and Business Rules (SBVR) and the target
language is Drools DRL.
The mapping could be (PIM level):
- Semantic Web Rule Language (SWRL)
- Ontology Web Language (OWL)
- RuleML
- Rule Interchange Format (RIF)
- REWERSE Rule Markup Language (R2ML)
It could be added to the module at the source UML or Entity Relationship
like models to transform the models into SBVR.
Regards
Xavier Breton
10 years, 10 months
Attach custom editor on guided decision table cell
by c3310082
Hi,
We would like to render a custom editor when a user double-clicks on a cell
that is present in web guided decision table in Guvnor 5.1 (or later). The
custom editor needs to be invoked for cells that represent a particular fact
model attribute only.
This is somewhat similar to WS custom forms functionality available for
guided business rules.
So far we have seen the
org.drools.guvnor.client.decisiontable.GuidedDecisionTableWidget class that
contains implementation for:
public void onCellDblClick(GridPanel grid,
int rowIndex,
int colIndex,
EventObject e)
in the GridCellListenerAdapter class that opens up text editor or drop down
editor.
We're new to GWT and Guvnor so would appreciate it if anyone can provide the
high level steps.
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Attach-custom-editor-...
Sent from the Drools - Dev mailing list archive at Nabble.com.
12 years, 2 months
Updating Web decision table via REST API
by Erhans Triadi
I use Drool Guvnor version 5.2.0.BRMS. I try to updating my Web decision
table with Rest API from user guide
http://docs.jboss.org/drools/release/5.3.0.Final/drools-guvnor-docs/html/...
*This my source code:*
*package com.sample;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.ws.rs.core.Response;
import org.apache.cxf.jaxrs.client.WebClient;
import org.drools.ide.common.client.modeldriven.dt52.DTCellValue52;
import org.drools.ide.common.client.modeldriven.dt52.GuidedDecisionTable52;
import org.drools.ide.common.server.util.GuidedDTXMLPersistence;
public class Update {
public static void main(String args[]){
WebClient client = WebClient.create("http://127.0.0.1:8081/");
String authorizationHeader = "Basic " +
org.apache.cxf.common.util.Base64Utility.encode("admin:admin".getBytes());
client.header("Authorization", authorizationHeader);
String
content=client.path("jboss-brms/rest/packages/mortgages/assets/Pricing%20loans/source").accept("text/plain").get(String.class);
//List<DTCellValue52> lData = new ArrayList<DTCellValue52>();
List<List<DTCellValue52>> llData = new
ArrayList<List<DTCellValue52>>();
System.out.println(content);
GuidedDecisionTable52 dt =
GuidedDTXMLPersistence.getInstance().unmarshal(content);
//llData = dt.getData();
String oldContent =
GuidedDTXMLPersistence.getInstance().marshal(dt);
System.out.println("Original : \n============\n"+oldContent);
llData = dt.getData();
System.out.println("Numeric List idx-1 data-0 =
"+llData.get(1).get(2).getNumericValue());
llData.get(1).get(2).setNumericValue(new BigDecimal(5000));
dt.setData(llData);
String newContent =
GuidedDTXMLPersistence.getInstance().marshal(dt);
System.out.println("Become : \n============\n"+newContent);
WebClient client2 = WebClient.create("http://127.0.0.1:8081/");
client2.header("Authorization", authorizationHeader);
Response response=
client2.path("jboss-brms/rest/packages/mortgages/assets/Pricing%20loans/source").accept("text/xml").put(newContent);
System.out.println("succeed");
System.out.println(response.getMetadata());
}
}*
I just try to set new value with 5000.
This code doesn't retrieve error, but the result is not true. My "Pricing
loan" asset still not updated with new set value.
Anyone can help?
Best Regards.
12 years, 5 months
A note on the "switch" proposal for Drools 6.0
by Wolfgang Laun
The switch statement as we see it in C and Java is due to the classic
"multiway branch" based on a (single) discrete value. As K&R note (in
their book), "falling through" has an advantage: it permits more than
one case label in front of code to be executed alike for all values.
The disadvantage is the necessity of using "break" at the end of such
a statement sequence.
Other languages (Pascal, Modula, Ada,...) permit lists and ranges in
case labels: hence there is no necessity for "break", and case
branches are distinct alternatives.
If the "switch" in the current proposal for Drools 6.0 has no (or no
useful) interpretation of "falling through", then "break" should not
be necessary.
-W
12 years, 5 months
trigger patterns
by Mark Proctor
I've been thinking about something i think might make authoring rules
easier. I've found that often in rules only one of the patterns is the
reactive trigger pattern, and I use techniques to stop the reactivity of
other patterns; such as using watch(!*). However even with !* you'll get
reactivity when something is first inserted, just not after
modificiation. So I've been thinking about formalising this.
To a certain degree the use of queries already have this, via ?. When ?
is used the query is executed when left triggered only, further it is
not left open and there is no reactivity. There are plans to allow
patterns to also obey ?. Such that if you did ?Person() it would only
join when left triggered and there would be no reactivity from Person
itself.
However I'm not sure this is enough, while I may not want reactivity
from inserts and modifies, I may still want retract to be obeyed.
Assuming A and B are class definitions and we allowed ? on ground terms.
The following would ignore all B insertions until it is left triggered
via an A propagation. However no link is maintained, so we do not
receive B modifications or retracts either - so the behaviour is exactly
like queries.
$a : A()
?B($a; )
Do we want a half measure that ignores modifies, but allows retracts?
Maybe using a double ??
$a : A()
??B($a; )
Or is the default query behaviour adequate? Or are there some other
alternatives people can think of?
I've been thinking about the same for rule groups too. If we have "rule
groups" maybe only certain facts will trigger evaluations for rules. But
again not sure what a syntax would look like.
Mark
12 years, 5 months