Reputation: 729
I want to create a decision table
with some empty cells.
the auto-generated rule is like this.
rule "Row 1 some name"
enabled false
salience -99
no-loop true
dialect "mvel"
when
$p : Model1( name == "string" )
$output : Model2( model3Code== ( $a.code ), model1Code== ( $p.code) )
then
$output.setSomeProperty( false );
end
In the above code, you see because of column3 is empty $a
not generated, and the build of rules failed.
My problem is to know how I can check if a cell is empty or not and empty cells ignore from Model2
conditions.
Upvotes: -1
Views: 601
Reputation: 729
Finally, I found a solution for this.
If in the Model2
condition select type of condition to predicate
and use $param
inside it, when the cell is empty that condition not added to rule anymore. Only conditions that it's `$param" parameters are set will be generated.
Upvotes: 1