class ProcessorFlowsFactory implements FlowsFactory {

    @Override
    public Collection<String> getOutputFlows() {
        return concat(
                getListener()
                        .map(listener -> concat(getReturnedBranches(listener), getOutputParameters(listener)))
                        .orElseGet(Stream::empty),
                getAfterGroup().map(this::getOutputParameters).orElseGet(Stream::empty)).distinct().collect(toList());
    }

}