final RuleModel rm = new RuleModel();
IPattern[] lhs = new IPattern[ brl.getDefinition().size() ];
brl.getDefinition().toArray( lhs );
rm.lhs = lhs;
final RuleModelPeerVariableVisitor peerVariableVisitor = new RuleModelPeerVariableVisitor( rm,
baseBRLConditionColumn.getVarName() );
List<RuleModelPeerVariableVisitor.ValueHolder> peerVariables = peerVariableVisitor.getPeerVariables();
//Add other variables values
for ( ValueHolder valueHolder : peerVariables ) {
switch ( valueHolder.getType() ) {
case TEMPLATE_KEY:
final BRLConditionVariableColumn vc = getConditionVariableColumnIndex( brl.getChildColumns(),
valueHolder.getValue() );
final int iCol = model.getExpandedColumns().indexOf( vc );
final CellValue<?> cv = this.data.get( iBaseRowIndex ).get( iCol );
final String field = vc.getFactField();
final String value = getValue( vc,
cv );
currentValueMap.put( field,
value );
break;
case VALUE:
currentValueMap.put( valueHolder.getFieldName(),
valueHolder.getValue() );
}
}
} else if ( baseColumn instanceof BRLActionVariableColumn ) {
final BRLActionVariableColumn baseBRLActionColumn = (BRLActionVariableColumn) baseColumn;
final BRLActionColumn brl = model.getBRLColumn( baseBRLActionColumn );
final RuleModel rm = new RuleModel();
IAction[] rhs = new IAction[ brl.getDefinition().size() ];
brl.getDefinition().toArray( rhs );
rm.rhs = rhs;
final RuleModelPeerVariableVisitor peerVariableVisitor = new RuleModelPeerVariableVisitor( rm,
baseBRLActionColumn.getVarName() );
List<ValueHolder> peerVariables = peerVariableVisitor.getPeerVariables();
//Add other variables values
for ( ValueHolder valueHolder : peerVariables ) {
switch ( valueHolder.getType() ) {
case TEMPLATE_KEY: