class SubProcessConverter extends ProcessConverterDelegate {

    public Result<SubProcessPropertyWriter> convertSubProcess(Node<View<? extends BPMNViewDefinition>, ?> node) {
        Result<SubProcessPropertyWriter> processRootResult =
                NodeMatch.fromNode(BaseSubprocess.class, SubProcessPropertyWriter.class)
                        .when(EmbeddedSubprocess.class, this::convertEmbeddedSubprocessNode)
                        .when(EventSubprocess.class, this::convertEventSubprocessNode)
                        .when(BaseAdHocSubprocess.class, this::convertAdHocSubprocessNode)
                        .when(MultipleInstanceSubprocess.class, this::convertMultipleInstanceSubprocessNode)
                        .ignore(BPMNViewDefinition.class)
                        .apply(node);

        if (processRootResult.isIgnored()) {
            return processRootResult;
        }

        DefinitionsBuildingContext subContext = context.withRootNode(node);
        SubProcessPropertyWriter processRoot = processRootResult.value();

        super.convertChildNodes(processRoot, subContext);
        super.convertEdges(processRoot, subContext);

        return processRootResult;
    }

    public  SubProcessConverter(DefinitionsBuildingContext context,
                               PropertyWriterFactory propertyWriterFactory,
                               ConverterFactory converterFactory);

}