How to create a task listener and set it for a UserTask, when creating a bpmn.xml file using coding

Hey,

Not sure if I am completely following.

Your listener should implement org.flowable.engine.delegate.TaskListener. If you are talking about org.flowable.bpmn.model.FlowableListener then this is the one from the model and you should create an instance of it and populate it properly.

There are multiple types of implementation type for the listener. I would suggest that you have a look in the FlowableListenerParser to see how it is done when parsing it from the bpmn.xml

Cheers,
Filip

1 Like