class SubProcessConverter extends ProcessConverterDelegate {

    public Result<SubProcessPropertyWriter> convertSubProcess(Node<View<? extends BPMNViewDefinition>, ?> node) {
        final Result<SubProcessPropertyWriter> processRootResult;
        final BPMNViewDefinition def = node.getContent().getDefinition();
        if (def instanceof EmbeddedSubprocess) {
            processRootResult = Result.success(convertEmbeddedSubprocessNode(cast(node)));
        } else if (def instanceof EventSubprocess) {
            processRootResult = Result.success(convertEventSubprocessNode(cast(node)));
        } else if (def instanceof BaseAdHocSubprocess) {
            processRootResult = Result.success(convertAdHocSubprocessNode(cast(node)));
        } else if (def instanceof MultipleInstanceSubprocess) {
            processRootResult = Result.success(convertMultipleInstanceSubprocessNode(cast(node)));
        } else {
            return Result.ignored("unknown type");
        }

        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);

}