Exemplo n.º 1
0
 public static PropositionResult buildPropositionResult(
     ExecutionEnvironment environment, boolean result, Object source) {
   PropositionResult propositionResult = new PropositionResult(result);
   BasicResult basicResult =
       new BasicResult(
           ResultEvent.PROPOSITION_EVALUATED, source, environment, propositionResult.getResult());
   environment.getEngineResults().addResult(basicResult);
   return propositionResult;
 }
Exemplo n.º 2
0
  public static PropositionResult buildPropositionResult(
      ExecutionEnvironment environment,
      ValidationResult validationResult,
      boolean result,
      Object source) {
    Map<String, Object> executionDetails = new LinkedHashMap<>();
    executionDetails.put(RulesExecutionConstants.PROCESS_EVALUATION_RESULTS, validationResult);
    PropositionResult propositionResult = new PropositionResult(result, executionDetails);

    BasicResult basicResult =
        new BasicResult(
            executionDetails,
            ResultEvent.PROPOSITION_EVALUATED,
            source,
            environment,
            propositionResult.getResult());
    environment.getEngineResults().addResult(basicResult);
    return propositionResult;
  }