Java Delegate or Execution Listener?

465 views
Skip to first unread message

roleba...@gmail.com

unread,
Feb 25, 2016, 5:53:58 AM2/25/16
to camunda BPM users
I have a task which sends an email to the customer. Which listener would you recommend for this task?

Link to the docs: https://docs.camunda.org/manual/latest/user-guide/model-api/bpmn-model-api/delegation-code/

Ingo Richtsmeier

unread,
Feb 25, 2016, 6:58:41 AM2/25/16
to camunda BPM users, roleba...@gmail.com
No Listener, I would recommend a Java Delegate to implement the send task in the process diagram.

And code all the email stuff in the execute() method.

Kind Regards, Ingo

roleba...@gmail.com

unread,
Feb 25, 2016, 12:53:06 PM2/25/16
to camunda BPM users, roleba...@gmail.com
Ok, thanks!

Is there anything that speaks against the Execution Listener? I ask only for a general understanding of this choice.

webcyberrob

unread,
Feb 25, 2016, 5:11:35 PM2/25/16
to camunda BPM users
Hi
As a principle, I typically advocate that business intent, eg send email is implemented as a delegate, whereas peripheral intent, eg logging, audit, statistics, security use execution listeners or similar. I guess this is along the lines of separation of concerns...

Rob

Reply all
Reply to author
Forward
0 new messages