class BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> {

    @Override
    public Result<BpmnNode> convert(org.eclipse.bpmn2.Task task) {
        return Match.of(Task.class, BpmnNode.class)
                .when(org.eclipse.bpmn2.BusinessRuleTask.class, this::businessRuleTask)
                .when(org.eclipse.bpmn2.ScriptTask.class, this::scriptTask)
                .when(org.eclipse.bpmn2.UserTask.class, this::userTask)
                .when(org.eclipse.bpmn2.ServiceTask.class, this::serviceTaskResolver)
                .whenExactly(org.eclipse.bpmn2.impl.TaskImpl.class, this::defaultTaskResolver)
                .missing(ManualTask.class)
                .missing(SendTask.class)
                .missing(ReceiveTask.class)
                .orElse(this::defaultTaskResolver)
                .inputDecorator(BPMNElementDecorators.flowElementDecorator())
                .outputDecorator(BPMNElementDecorators.bpmnNodeDecorator())
                .mode(getMode())
                .apply(task);
    }

    public  BaseTaskConverter(TypedFactoryManager factoryManager, PropertyReaderFactory propertyReaderFactory,
                             Mode mode);

}