SequenceFlows are only deleted for Task elements

Details

Description

in org.activiti.designer.features.DeleteFlowElementFeature#deleteBusinessObject(), there is now a hardcoded check:

if (bo instanceof Task) {
}

This means sequenceflows are only cleaned up for Tasks, and not for events or other elements. This is probably because a cast is needed to get to the getIncoming() methods of subtypes of FlowElement, but should at least be expanded to cover other elements so this works properly.