Map<String, IDataPointValueSource> context = new HashMap<String, IDataPointValueSource>();
context.put(PointLinkRT.CONTEXT_VAR_NAME, point);
int targetDataType = new DataPointDao().getDataPoint(targetPointId).getPointLocator().getDataTypeId();
try {
PointValueTime pvt = scriptExecutor.execute(script, context, System.currentTimeMillis(),
targetDataType, -1);
if (pvt.getValue() == null)
message = new TranslatableMessage("event.pointLink.nullResult");
else if (pvt.getTime() == -1)
message = new TranslatableMessage("pointLinks.validate.success", pvt.getValue());
else
message = new TranslatableMessage("pointLinks.validate.successTs", pvt.getValue(),
Functions.getTime(pvt.getTime()));
}
catch (ScriptException e) {
message = new TranslatableMessage("common.default", e.getMessage());
}
catch (ResultTypeException e) {