How Identify if Service Task is fired due to Boundary Event

Hi,

I am capturing start and stop event for serviceTask and userTask on camunda-engine.

have added following property to capture events.

eventing:
execution: true

I am then streaming those events for further processing.

executionDelegate.getBpmnModelElementInstance() instanceof ServiceTask

Whenever a boundary error event is attached to a ServiceTask then two Events for type ServiceTask are fired with the same value in ActivityInstanceId field

executionDelegate.getActivityInstanceId()

Is there a way to Identify if a ServiceTask is caused by BoundaryEvent from executionDelegate variable

@EventListener
public void onExecutionEvent(DelegateExecution executionDelegate) {
//code to send
}