在 Talend DI 4.2.1 中使用 tScriptRule 组件。使用 jexl 表达式评估日期模式的结果对于所有条件都为 false。从测试作业派生的代码段如下:
public class Script {
static class Row {
public String EFFECTIVEDATE;
public String getEFFECTIVEDATE() {
return this.EFFECTIVEDATE;
}
}
public static void main(String[] args) {
Row row1 = new Row();
row1.EFFECTIVEDATE = "10-01-2012";
com.bekwam.tscriptrules.JexlRowEvaluator e_tScriptRules_2 = new com.bekwam.tscriptrules.JexlRowEvaluator();
boolean ruleTest_tScriptRules_2_1 = e_tScriptRules_2
.evalTrue("'${TalendDate.isDate(row1.EFFECTIVEDATE, \"dd-mm-yyyy\")}' == true", "row1", row1);
System.out.println(ruleTest_tScriptRules_2_1);
}
}
库/组件来自tScriptRules