class FlowCancelService {

    public void cancelRunningFlows(Long resourceId) {
        LOGGER.info("Cancel running flow for id: [{}]", resourceId);
        Payload cancelEvent = () -> resourceId;
        reactor.notify(Flow2Handler.FLOW_CANCEL, eventFactory.createEventWithErrHandler(eventParameterFactory.createEventParameters(resourceId), cancelEvent));
    }

}