Get Extensions Elementos from activity id

Hi, i need help.
Im construct new endpoint (‘get ExtensionsElement(ActivityID)’), i need get the extension elements from the id of activity what going in the parameter

Thanks!

@Facundo_Rodriguez_La , you can get extension elements like below:

BaseElement baseElement = execution.getProcessEngineServices()
      .getRepositoryService().getBpmnModelInstance(execution.getProcessDefinitionId())
      .getModelElementById(execution.getCurrentActivityId());

CamundaProperties extensionElements = baseElement.getExtensionElements().getElementsQuery()
                 .filterByType(CamundaProperties.class).singleResult();

Collection<CamundaProperty> camundaProperties= extensionElements.getCamundaProperties();   

thanks for fast response,

what is ‘execution’?

this is my code

@Inject RepositoryService

Or Inject ProcessEngine.getRepositoryService()

Thanks! It helped me