src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/service/HistoryService.java
/**
     * Save history data into data storage.
     *
     * @param historyHolder holder of history information.
     */
Save history data into data storage.
@param historyHolder holder of history information.
Save history data into data storage . @param historyHolder holder of history information .
public void store(FlowHistoryHolder historyHolder) {
        transactionManager.doInTransaction(() -> {
            String taskId = historyHolder.getTaskId();
            if (historyHolder.getFlowEventData() != null) {
                FlowEvent event = HistoryMapper.INSTANCE.map(historyHolder.getFlowEventData());
                event.setTaskId(taskId);
                flowEventRepository.add(event);
            }
            if (historyHolder.getFlowHistoryData() != null) {
                FlowHistory history = HistoryMapper.INSTANCE.map(historyHolder.getFlowHistoryData());
                history.setTaskId(taskId);
                flowHistoryRepository.add(history);
            }
            if (historyHolder.getFlowDumpData() != null) {
                FlowDump dump = HistoryMapper.INSTANCE.map(historyHolder.getFlowDumpData());
                dump.setTaskId(taskId);
                flowDumpRepository.add(dump);
            }
        });
    }
public void store ( FlowHistoryHolder historyHolder ) { transactionManager . doInTransaction ( ( ) -> { String taskId = historyHolder . getTaskId ( ) ; if ( historyHolder . getFlowEventData ( ) != null ) { FlowEvent event = HistoryMapper . INSTANCE . map ( historyHolder . getFlowEventData ( ) ) ; event . setTaskId ( taskId ) ; flowEventRepository . add ( event ) ; } if ( historyHolder . getFlowHistoryData ( ) != null ) { FlowHistory history = HistoryMapper . INSTANCE . map ( historyHolder . getFlowHistoryData ( ) ) ; history . setTaskId ( taskId ) ; flowHistoryRepository . add ( history ) ; } if ( historyHolder . getFlowDumpData ( ) != null ) { FlowDump dump = HistoryMapper . INSTANCE . map ( historyHolder . getFlowDumpData ( ) ) ; dump . setTaskId ( taskId ) ; flowDumpRepository . add ( dump ) ; } } ) ; }
Save history data into data storage.
Save history data into data storage .