@Override public void processRow(ResultSet resultSet) throws SQLException { result.put( resultSet.getLong(1), new Payload(resultSet.getBytes("payload")) ); } });
@Override public ExecutionMessage mapRow(ResultSet rs, int rowNum) throws SQLException { return new ExecutionMessage(rs.getLong("EXEC_STATE_ID"), rs.getString("ASSIGNED_WORKER"), rs.getString("EXEC_GROUP"), rs.getString("MSG_ID"), ExecStatus.find(rs.getInt("STATUS")), new Payload(rs.getBytes("PAYLOAD")), rs.getInt("MSG_SEQ_ID"), rs.getLong("CREATE_TIME")); } }
@Override public SystemContext extractSystemContext(byte[] executionObjectSerialized) { Execution execution = executionMessageConverter.extractExecution(new Payload(executionObjectSerialized)); return execution.getSystemContext(); }
@Override public SystemContext extractSystemContext(byte[] executionObjectSerialized) { Execution execution = executionMessageConverter.extractExecution(new Payload(executionObjectSerialized)); return execution.getSystemContext(); }
public Payload createPayload(Execution execution, boolean setContainsSensitiveData) { Payload payload = new Payload(objToBytes(execution)); if(setContainsSensitiveData || checkContainsSensitiveData(execution)) { setSensitive(payload); } return payload; }
public Payload createPayload(Execution execution, boolean setContainsSensitiveData) { Payload payload = new Payload(objToBytes(execution)); if(setContainsSensitiveData || checkContainsSensitiveData(execution)) { setSensitive(payload); } return payload; }
@Override public Long reTrigger(SystemContext newSystemContext, byte[] executionObj) { Execution execution = executionMessageConverter.extractExecution(new Payload(executionObj)); //We must refresh the system context with the new one in order to re-trigger execution.getSystemContext().clear(); execution.getSystemContext().putAll(newSystemContext); //generate new execution id Long newExecutionId = idGenerator.next(); execution.getSystemContext().setExecutionId(newExecutionId); execution.setExecutionId(newExecutionId); // create execution record in ExecutionSummary table executionStateService.createParentExecution(execution.getExecutionId()); // create execution message ExecutionMessage message = createExecutionMessage(execution); queueDispatcher.dispatch(Collections.singletonList(message)); return newExecutionId; }
@Override public Long reTrigger(SystemContext newSystemContext, byte[] executionObj) { Execution execution = executionMessageConverter.extractExecution(new Payload(executionObj)); //We must refresh the system context with the new one in order to re-trigger execution.getSystemContext().clear(); execution.getSystemContext().putAll(newSystemContext); //generate new execution id Long newExecutionId = idGenerator.next(); execution.getSystemContext().setExecutionId(newExecutionId); execution.setExecutionId(newExecutionId); // create execution record in ExecutionSummary table executionStateService.createParentExecution(execution.getExecutionId()); // create execution message ExecutionMessage message = createExecutionMessage(execution); queueDispatcher.dispatch(Collections.singletonList(message)); return newExecutionId; }