protected boolean checkCondition ( TestContext context ) { if ( conditionExpression != null ) { return conditionExpression . evaluate ( index , context ) ; } // replace dynamic content with each iteration String conditionString = condition ; if ( conditionString . indexOf ( Citrus . VARIABLE_PREFIX + indexName + Citrus . VARIABLE_SUFFIX ) != - 1 ) { Properties props = new Properties ( ) ; props . put ( indexName , String . valueOf ( index ) ) ; conditionString = new PropertyPlaceholderHelper ( Citrus . VARIABLE_PREFIX , Citrus . VARIABLE_SUFFIX ) . replacePlaceholders ( conditionString , props ) ; } conditionString = context . replaceDynamicContentInString ( conditionString ) ; if ( ValidationMatcherUtils . isValidationMatcherExpression ( conditionString ) ) { try { ValidationMatcherUtils . resolveValidationMatcher ( "iteratingCondition" , String . valueOf ( index ) , conditionString , context ) ; return true ; } catch ( AssertionError e ) { return false ; } } if ( conditionString . indexOf ( indexName ) != - 1 ) { conditionString = conditionString . replaceAll ( indexName , String . valueOf ( index ) ) ; } return BooleanExpressionParser . evaluate ( conditionString ) ; }
Check aborting condition .