clOperation = outcome.toControlLoopOperation();
clOperation.setTarget(policy.getTarget().toString());
clResponse = outcome.getControlLoopResponse();
+
+ if (outcome.getEnd() == null) {
+ clOperation.setOutcome("Started");
+ } else if (clOperation.getOutcome() == null) {
+ clOperation.setOutcome("");
+ }
}
}
.setParameter(6, record.getTargetEntity())
.getResultList();
+ if (results.size() > 1) {
+ logger.warn("unexpected operation history record count {} for {}", results.size(), event.getRequestId());
+ }
+
Dbao entry = (results.isEmpty() ? new Dbao() : results.get(0));
entry.setClosedLoopName(event.getClosedLoopControlName());
*/
// no start time
+ operation.setStart(null);
mgr.store(REQ_ID, event, MY_ENTITY, operation);
// no end time
+ operation = new ControlLoopOperation(operation);
operation.setStart(Instant.now());
mgr.store(REQ_ID, event, MY_ENTITY, operation);
// both start and end times
+ operation = new ControlLoopOperation(operation);
operation.setEnd(Instant.now());
mgr.store(REQ_ID, event, MY_ENTITY, operation);
// only end time
+ operation = new ControlLoopOperation(operation);
operation.setStart(null);
mgr.store(REQ_ID, event, MY_ENTITY, operation);