class BaseTaskConverter extends AbstractConverter implements NodeConverter<Task> {

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

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

}