How fetch formKey in TaskListener using delegateTask

I am trying to fetch formKey in TaskListener implemeted class -
TaskEntity taskEntity = (TaskEntity) delegateTask;

taskEntity.getFormKey()

but getting blow error

The form key / form reference is not initialized. You must call initializeFormKeys() on the task query before you can retrieve the form key or the form reference.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.