AnsweredAssumed Answered

Get task forms from RuntimeEventListener implementation

Question asked by apita on Feb 23, 2018
Latest reply on Jul 16, 2018 by

I'm using Alfresco Process Services 1.7


I've implemented a RuntimeEventListener for process lifecycle events and publish them out to a Kafka stream. It's working, but I was unable to fetch task's task_form on TASK_CREATED and/or TASK_COMPLETED events. I figured I'd be able to retrieve the task form with the following code:

EngineServices engineServices = event.getEngineServices();
FormService formService = engineServices.getFormService();
Task task = (Task) ((ActivitiEntityEventImpl) event).getEntity();
Object renderedTaskForm = formService.getRenderedTaskForm(task.getId());
It never returns anything, despite the task having a referenced form. How can I access this information?