]
Michael Anstis moved GUVNOR-1936 to DROOLS-1838:
------------------------------------------------
Project: Drools (was: Guvnor)
Key: DROOLS-1838 (was: GUVNOR-1936)
Workflow: GIT Pull Request workflow (was: classic default workflow)
Component/s: Guided Decision Table Editor
(was: Guided Decision Table)
Affects Version/s: 5.5.0.Final
(was: drools-5.4.0.Final)
Referencing condition literals in action columns in Web based
decision table
----------------------------------------------------------------------------
Key: DROOLS-1838
URL:
https://issues.jboss.org/browse/DROOLS-1838
Project: Drools
Issue Type: Feature Request
Components: Guided Decision Table Editor
Affects Versions: 5.5.0.Final
Reporter: Roman Novak
Assignee: Michael Anstis
The use case is to avoid reduncancy in entering data in the web based decision table.
The redundance occurs, when a "not" condition is used in the LHS of a rule, and
exactly the entered condition (in the example rule below it is "demo") should be
used/referenced on the RHS of the rule.
The solution proposal is:
* it is already possible to reference binding variables in Guvnor decision tables via
"=". e.g. set the default value of an action column by "=$p.name"
(again with the example below in mind).l
* it should be possible to reference the actual column content via the mandatory
"Column header (description)" field in a way, so that during the generation of
the rule code the content of the column in the editor is placed into the action field.
* suggestion for (de-)referencing the column: ={<column header>}
Example rule to illustrate the problem:
declare Address
streetName : String
end
declare Person
name : String
end
rule "Using a declared Type"
when
$p : Person( name == "Bob" )
not Address(streetName == "demo")
then
// if the address does not exist, we create it... (just for example)
Address addr = new Address();
// how can the streetName "demo" from above be referenced ? in a normal
rule it is not possible! (scope delimiter "not")
addr.setStreetName("demo");
insert( addr );
end