public void execute ( ) { if ( condition == null ) { throw new SystemException ( "Rule cannot be executed as it has no condition" ) ; } if ( condition . isTrue ( ) ) { for ( Action action : onTrue ) { action . execute ( ) ; } } else { for ( Action action : onFalse ) { action . execute ( ) ; } } }
Executes the rule .