private Arguments makeArguments(TDRGElement element, RuntimeEnvironment runtimeEnvironment) { Arguments arguments = new Arguments(); List<String> parameters = basicDMNTransformer.drgElementArgumentNameList(element, false); parameters.forEach(p -> arguments.put(p, runtimeEnvironment.lookupBinding(p))); return arguments; }
@Override public String toString() { StringBuilder result = new StringBuilder(); boolean first = true; for (String key : this.keySet()) { Object value = this.get(key); if (first) { first = false; } else { result.append(", "); } result.append(String.format("%s='%s'", key, value)); } return result.toString(); } }
public Boolean apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-contains-function_004_805503b274'' long feelContainsFunction_004_805503b274StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelContainsFunction_004_805503b274Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelContainsFunction_004_805503b274Arguments_); // Evaluate decision ''feel-contains-function_004_805503b274'' Boolean output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-contains-function_004_805503b274'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelContainsFunction_004_805503b274Arguments_, output_, (System.currentTimeMillis() - feelContainsFunction_004_805503b274StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-contains-function_004_805503b274'' evaluation", e); return null; } }
public javax.xml.datatype.XMLGregorianCalendar apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-time-function_ErrorCase_063_e85c40b474'' long feelTimeFunction_ErrorCase_063_e85c40b474StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelTimeFunction_ErrorCase_063_e85c40b474Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_ErrorCase_063_e85c40b474Arguments_); // Evaluate decision ''feel-time-function_ErrorCase_063_e85c40b474'' javax.xml.datatype.XMLGregorianCalendar output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-time-function_ErrorCase_063_e85c40b474'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_ErrorCase_063_e85c40b474Arguments_, output_, (System.currentTimeMillis() - feelTimeFunction_ErrorCase_063_e85c40b474StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-time-function_ErrorCase_063_e85c40b474'' evaluation", e); return null; } }
private Arguments makeArguments(TDRGElement element, RuntimeEnvironment runtimeEnvironment) { Arguments arguments = new Arguments(); List<String> parameters = basicDMNTransformer.drgElementArgumentNameList(element, false); parameters.forEach(p -> arguments.put(p, runtimeEnvironment.lookupBinding(p))); return arguments; }
public String apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-replace-function_008_8c7c3871f8'' long feelReplaceFunction_008_8c7c3871f8StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelReplaceFunction_008_8c7c3871f8Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelReplaceFunction_008_8c7c3871f8Arguments_); // Evaluate decision ''feel-replace-function_008_8c7c3871f8'' String output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-replace-function_008_8c7c3871f8'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelReplaceFunction_008_8c7c3871f8Arguments_, output_, (System.currentTimeMillis() - feelReplaceFunction_008_8c7c3871f8StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-replace-function_008_8c7c3871f8'' evaluation", e); return null; } }
@Override public String toString() { StringBuilder result = new StringBuilder(); boolean first = true; for (String key : this.keySet()) { Object value = this.get(key); if (first) { first = false; } else { result.append(", "); } result.append(String.format("%s='%s'", key, value)); } return result.toString(); } }
public java.math.BigDecimal apply(java.math.BigDecimal n, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision 'main' long mainStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments mainArguments_ = new com.gs.dmn.runtime.listener.Arguments(); mainArguments_.put("n", n); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, mainArguments_); // Evaluate decision 'main' java.math.BigDecimal output_ = evaluate(n, annotationSet_, eventListener_, externalExecutor_); // End decision 'main' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, mainArguments_, output_, (System.currentTimeMillis() - mainStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in 'main' evaluation", e); return null; } }
public String apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-replace-function_015_57ce78ec8a'' long feelReplaceFunction_015_57ce78ec8aStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelReplaceFunction_015_57ce78ec8aArguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelReplaceFunction_015_57ce78ec8aArguments_); // Evaluate decision ''feel-replace-function_015_57ce78ec8a'' String output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-replace-function_015_57ce78ec8a'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelReplaceFunction_015_57ce78ec8aArguments_, output_, (System.currentTimeMillis() - feelReplaceFunction_015_57ce78ec8aStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-replace-function_015_57ce78ec8a'' evaluation", e); return null; } }
public List<java.math.BigDecimal> apply(List<java.math.BigDecimal> heights, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision 'increase1' long increase1StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments increase1Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); increase1Arguments_.put("heights", heights); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, increase1Arguments_); // Evaluate decision 'increase1' List<java.math.BigDecimal> output_ = evaluate(heights, annotationSet_, eventListener_, externalExecutor_); // End decision 'increase1' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, increase1Arguments_, output_, (System.currentTimeMillis() - increase1StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in 'increase1' evaluation", e); return null; } }
public javax.xml.datatype.XMLGregorianCalendar apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-time-function_ErrorCase_074_387d4411ea'' long feelTimeFunction_ErrorCase_074_387d4411eaStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelTimeFunction_ErrorCase_074_387d4411eaArguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_ErrorCase_074_387d4411eaArguments_); // Evaluate decision ''feel-time-function_ErrorCase_074_387d4411ea'' javax.xml.datatype.XMLGregorianCalendar output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-time-function_ErrorCase_074_387d4411ea'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_ErrorCase_074_387d4411eaArguments_, output_, (System.currentTimeMillis() - feelTimeFunction_ErrorCase_074_387d4411eaStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-time-function_ErrorCase_074_387d4411ea'' evaluation", e); return null; } }
public java.math.BigDecimal apply(com.gs.dmn.example_credit_decision.type.Applicant applicant, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_) { try { // Start decision 'assessApplicantAge' long assessApplicantAgeStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments assessApplicantAgeArguments_ = new com.gs.dmn.runtime.listener.Arguments(); assessApplicantAgeArguments_.put("applicant", applicant); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, assessApplicantAgeArguments_); // Evaluate decision 'assessApplicantAge' java.math.BigDecimal output_ = evaluate(applicant, annotationSet_, eventListener_, externalExecutor_); // End decision 'assessApplicantAge' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, assessApplicantAgeArguments_, output_, (System.currentTimeMillis() - assessApplicantAgeStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in 'assessApplicantAge' evaluation", e); return null; } }
public javax.xml.datatype.XMLGregorianCalendar apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-time-function_032_d9b0d7f931'' long feelTimeFunction_032_d9b0d7f931StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelTimeFunction_032_d9b0d7f931Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_032_d9b0d7f931Arguments_); // Evaluate decision ''feel-time-function_032_d9b0d7f931'' javax.xml.datatype.XMLGregorianCalendar output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-time-function_032_d9b0d7f931'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_032_d9b0d7f931Arguments_, output_, (System.currentTimeMillis() - feelTimeFunction_032_d9b0d7f931StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-time-function_032_d9b0d7f931'' evaluation", e); return null; } }
private java.math.BigDecimal apply(java.math.BigDecimal n, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_) { try { // Start BKM 'FACT' long fACTStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments fACTArguments_ = new com.gs.dmn.runtime.listener.Arguments(); fACTArguments_.put("n", n); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, fACTArguments_); // Evaluate BKM 'FACT' java.math.BigDecimal output_ = evaluate(n, annotationSet_, eventListener_, externalExecutor_); // End BKM 'FACT' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, fACTArguments_, output_, (System.currentTimeMillis() - fACTStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in 'FACT' evaluation", e); return null; } }
public javax.xml.datatype.XMLGregorianCalendar apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-time-function_ErrorCase_059_c7e1705fe1'' long feelTimeFunction_ErrorCase_059_c7e1705fe1StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelTimeFunction_ErrorCase_059_c7e1705fe1Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_ErrorCase_059_c7e1705fe1Arguments_); // Evaluate decision ''feel-time-function_ErrorCase_059_c7e1705fe1'' javax.xml.datatype.XMLGregorianCalendar output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-time-function_ErrorCase_059_c7e1705fe1'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelTimeFunction_ErrorCase_059_c7e1705fe1Arguments_, output_, (System.currentTimeMillis() - feelTimeFunction_ErrorCase_059_c7e1705fe1StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-time-function_ErrorCase_059_c7e1705fe1'' evaluation", e); return null; } }
public String apply(List<String> employees, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision 'decision4' long decision4StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments decision4Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); decision4Arguments_.put("employees", employees); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, decision4Arguments_); // Evaluate decision 'decision4' String output_ = evaluate(employees, annotationSet_, eventListener_, externalExecutor_); // End decision 'decision4' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, decision4Arguments_, output_, (System.currentTimeMillis() - decision4StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in 'decision4' evaluation", e); return null; } }
public javax.xml.datatype.XMLGregorianCalendar apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-date-and-time-function_014_ded0e5fe2f'' long feelDateAndTimeFunction_014_ded0e5fe2fStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelDateAndTimeFunction_014_ded0e5fe2fArguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelDateAndTimeFunction_014_ded0e5fe2fArguments_); // Evaluate decision ''feel-date-and-time-function_014_ded0e5fe2f'' javax.xml.datatype.XMLGregorianCalendar output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-date-and-time-function_014_ded0e5fe2f'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelDateAndTimeFunction_014_ded0e5fe2fArguments_, output_, (System.currentTimeMillis() - feelDateAndTimeFunction_014_ded0e5fe2fStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-date-and-time-function_014_ded0e5fe2f'' evaluation", e); return null; } }
private java.math.BigDecimal apply(String riskCategory, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_) { try { // Start BKM 'CreditContingencyFactorTable' long creditContingencyFactorTableStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments creditContingencyFactorTableArguments_ = new com.gs.dmn.runtime.listener.Arguments(); creditContingencyFactorTableArguments_.put("riskCategory", riskCategory); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, creditContingencyFactorTableArguments_); // Evaluate BKM 'CreditContingencyFactorTable' java.math.BigDecimal output_ = evaluate(riskCategory, annotationSet_, eventListener_, externalExecutor_); // End BKM 'CreditContingencyFactorTable' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, creditContingencyFactorTableArguments_, output_, (System.currentTimeMillis() - creditContingencyFactorTableStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in 'CreditContingencyFactorTable' evaluation", e); return null; } }
public java.math.BigDecimal apply(com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''feel-decimal-function_006_d9661e1d45'' long feelDecimalFunction_006_d9661e1d45StartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments feelDecimalFunction_006_d9661e1d45Arguments_ = new com.gs.dmn.runtime.listener.Arguments(); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, feelDecimalFunction_006_d9661e1d45Arguments_); // Evaluate decision ''feel-decimal-function_006_d9661e1d45'' java.math.BigDecimal output_ = evaluate(annotationSet_, eventListener_, externalExecutor_); // End decision ''feel-decimal-function_006_d9661e1d45'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, feelDecimalFunction_006_d9661e1d45Arguments_, output_, (System.currentTimeMillis() - feelDecimalFunction_006_d9661e1d45StartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''feel-decimal-function_006_d9661e1d45'' evaluation", e); return null; } }
public String apply(String employmentStatus, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision ''Employment Status Statement'' long employmentStatusStatementStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments employmentStatusStatementArguments_ = new com.gs.dmn.runtime.listener.Arguments(); employmentStatusStatementArguments_.put("employmentStatus", employmentStatus); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, employmentStatusStatementArguments_); // Evaluate decision ''Employment Status Statement'' String output_ = evaluate(employmentStatus, annotationSet_, eventListener_, externalExecutor_); // End decision ''Employment Status Statement'' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, employmentStatusStatementArguments_, output_, (System.currentTimeMillis() - employmentStatusStatementStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in ''Employment Status Statement'' evaluation", e); return null; } }