Class BuildExecutionApplicator


  • public class BuildExecutionApplicator
    extends Applicator
    An applicator which actually executes a rule body if build is required for a LHS/RHS match. Execution will fail upon the first RuleExecutionResult.Status.FAIL.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • BuildExecutionApplicator

        public BuildExecutionApplicator​(RuntimeEnvironment environment,
                                        RuleExecutionContext context,
                                        RuleBodyExecutor executor)
        Creates the applicator.
        Parameters:
        environment - the actual runtime environment
        context - the actual rule execution context
        executor - the actual rule executor
    • Method Detail

      • apply

        public void apply​(java.lang.Object expectedLhsValue,
                          java.lang.Object rhsValue,
                          int index)
                   throws VilException
        Description copied from class: Applicator
        Apply this applicator for one combination which requires building. This may be due to the fact that rhsValue
        • is newer than expectedLhsValue
        • exists but expectedLhsValue does not exist
        • exists but no LHS is specified (expectedLhsValue is null)
        Specified by:
        apply in class Applicator
        Parameters:
        expectedLhsValue - the expected result after building rhsValue (may be null)
        rhsValue - the value determined for the right side as part of a match
        index - the 0-based index of the RHS match condition in the specifying rule (Applicator.getElementCount()
        Throws:
        VilException - in case that executing parts of a rule or setting variable values fails
      • stopMatchLoop

        public boolean stopMatchLoop()
        Description copied from class: Applicator
        Enables a pre-exit of the match loop.
        Overrides:
        stopMatchLoop in class Applicator
        Returns:
        true if the match loop shall exit before the next iteration, false if the loop shall continue (default)
      • stopConditionLoop

        public boolean stopConditionLoop()
        Description copied from class: Applicator
        Enables a pre-exit of the condition loop.
        Overrides:
        stopConditionLoop in class Applicator
        Returns:
        true if the condition loop shall exit before the next iteration, false if the loop shall continue (default)