class FlowElementConverter extends AbstractConverter {

    public Result<BpmnNode> convertNode(FlowElement flowElement) {
        return Match.of(FlowElement.class, Result.class)
                .when(StartEvent.class, converterFactory.startEventConverter()::convert)
                .when(EndEvent.class, converterFactory.endEventConverter()::convert)
                .when(BoundaryEvent.class, converterFactory.intermediateCatchEventConverter()::convertBoundaryEvent)
                .when(IntermediateCatchEvent.class, converterFactory.intermediateCatchEventConverter()::convert)
                .when(IntermediateThrowEvent.class, converterFactory.intermediateThrowEventConverter()::convert)
                .when(Task.class, converterFactory.taskConverter()::convert)
                .when(Gateway.class, converterFactory.gatewayConverter()::convert)
                .when(SubProcess.class, converterFactory.subProcessConverter()::convertSubProcess)
                .when(CallActivity.class, converterFactory.callActivityConverter()::convert)
                .when(TextAnnotation.class, converterFactory.artifactsConverter()::convert)
                .when(DataObjectReference.class, converterFactory.artifactsConverter()::convert)
                .ignore(DataStoreReference.class)
                .ignore(DataStore.class)
                .ignore(SequenceFlow.class, null)
                .defaultValue(Result.ignored("FlowElement not found", getNotFoundMessage(flowElement)))
                .inputDecorator(BPMNElementDecorators.flowElementDecorator())
                .outputDecorator(BPMNElementDecorators.resultBpmnDecorator())
                .mode(getMode())
                .apply(flowElement)
                .value();
    }

    public  FlowElementConverter(BaseConverterFactory converterFactory);

}