return;
else
ready = false; //Stop anyone else from using this
}
// Propagate the update to the target point. Validate that the target point is available.
DataPointRT targetPoint = Common.runtimeManager.getDataPoint(vo.getTargetPointId());
if (targetPoint == null) {
raiseFailureEvent(newValue.getTime(), new TranslatableMessage("event.pointLink.targetUnavailable"));
return;
}
if (!targetPoint.getPointLocator().isSettable()) {
raiseFailureEvent(newValue.getTime(), new TranslatableMessage("event.pointLink.targetNotSettable"));
return;
}
int targetDataType = targetPoint.getVO().getPointLocator().getDataTypeId();
if (!StringUtils.isBlank(vo.getScript())) {
ScriptExecutor scriptExecutor = new ScriptExecutor();
Map<String, IDataPointValueSource> context = new HashMap<String, IDataPointValueSource>();
DataPointRT source = Common.runtimeManager.getDataPoint(vo.getSourcePointId());
context.put(CONTEXT_VAR_NAME, source);
try {
PointValueTime pvt = scriptExecutor.execute(vo.getScript(), context, newValue.getTime(),
targetDataType, newValue.getTime());