Hi @PUBG_Noob,
As I understand it, the businessObject
is a ModdleElement
which can be created with the BpmnFactory.
The connector should be an extension element, so it can be found in businessObject.extensionElements.values
.
You can also check how the Business Object of an existing Element with a connector looks like and try to replicate that.