src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteService.java
/**
     * Handles request for flow delete.
     *
     * @param key command identifier.
     * @param flowId the flow to delete.
     */
Handles request for flow delete.
@param key command identifier.
@param flowId the flow to delete.
Handles request for flow delete . @param key command identifier . @param flowId the flow to delete .
public void handleRequest(String key, CommandContext commandContext, String flowId) {
        log.debug("Handling flow delete request with key {} and flow ID: {}", key, flowId);
        if (fsms.containsKey(key)) {
            log.error("Attempt to create a FSM with key {}, while there's another active FSM with the same key.", key);
            return;
        }
        String eventKey = commandContext.getCorrelationId();
        if (flowEventRepository.existsByTaskId(eventKey)) {
            log.error("Attempt to reuse key %s, but there's a history record(s) for it.", eventKey);
            return;
        }
        FlowDeleteFsm fsm = fsmFactory.newInstance(commandContext, flowId);
        fsms.put(key, fsm);
        fsmExecutor.fire(fsm, Event.NEXT, FlowDeleteContext.builder().build());
        removeIfFinished(fsm, key);
    }
public void handleRequest ( String key , CommandContext commandContext , String flowId ) { log . debug ( "Handling flow delete request with key {} and flow ID: {}" , key , flowId ) ; if ( fsms . containsKey ( key ) ) { log . error ( "Attempt to create a FSM with key {}, while there's another active FSM with the same key." , key ) ; return ; } String eventKey = commandContext . getCorrelationId ( ) ; if ( flowEventRepository . existsByTaskId ( eventKey ) ) { log . error ( "Attempt to reuse key %s, but there's a history record(s) for it." , eventKey ) ; return ; } FlowDeleteFsm fsm = fsmFactory . newInstance ( commandContext , flowId ) ; fsms . put ( key , fsm ) ; fsmExecutor . fire ( fsm , Event . NEXT , FlowDeleteContext . builder ( ) . build ( ) ) ; removeIfFinished ( fsm , key ) ; }
Handles request for flow delete.
Handles request for flow delete .