Get task forms from RuntimeEventListener implementation

cancel
Showing results for 
Search instead for 
Did you mean: 
sampopes
Member II

Re: Get task forms from RuntimeEventListener implementation

Jump to solution

Apologies if the question seems too basic or invalid. I am new to Activiti and BPM.

I have an event listner and getting  ActivitiEvent object.

ActivitiEvent event

 

How to get delegateTask object from it?

Thanks!

bassam_al-saror
Alfresco Employee

Re: Get task forms from RuntimeEventListener implementation

Jump to solution

You can get the entity which should be a TaskEntity if it's ActivitiEntityEvent event and task related (i.e. type is ActivitiEventType.TASK_CREATED).

 

TaskEntity task = (TaskEntity) ((ActivitiEntityEvent) event).getEntity();