UserTask with a deployed "Camunda Forms” - CamundaFormRef

Hi,

I want to get the Fields form in an AbstractBpmnParseListener for a UserTask.

This works if the form fields are contained directly in the UserTask (Generated Task Forms). But I have no idea how to get a deployed form if “Camunda Forms” is selected as the Forms Type in the UserTask.

taskDefinition.addTaskListener(TaskListener.EVENTNAME_CREATE, new TaskListener() {
  @Override
    public void notify(DelegateTask delegateTask) {
      final FormService formService = delegateTask.getProcessEngineServices().getFormService();
      final TaskFormData taskFormData = formService.getTaskFormData(delegateTask.getId());
      final CamundaFormRef camundaFormRef = taskFormData.getCamundaFormRef();
      // How do I get the deployed form with the camundaFormRef to get the fields?
  }
});

thanks Robert