configure workitemhandler to send email in JBPM 7

江枫思渺然 提交于 2020-03-26 04:03:13

问题


below is the work item handler currently we have to send email in JBPM 7.32.

But we are getting error java.lang.RuntimeException: Unable to send email".

new org.jbpm.process.workitem.email.EmailWorkItemHandler("smtp.gmail.com", "465", "ax@gmail.com", "x@gmail.com",true)

Could you please help.

Below is the sample workflow we have , to just send an email.

below is the settings where we have this e-mail work item handler.


回答1:


  1. Delete the Email task from your BPMN web Design (process graphic)
  2. Delete the Email from Work Item Handlers
  3. go to Settings/Service Tasks and Install Email (if it is installed, unistall it and click on install)
  4. fill the form with required parameters:
    host : smtp server host name
    port : smtp server port number
    username : account to be used when login to SMTP server (the email address)
    password : account's password to be used when login to SMTP server
  5. if you provide all this informations, the Work Item Handler will be generated automatically ( you can check it in Settings/Deployments/ work Item Handlers), DON'T EDIT IT !
  6. Go back to your Process, and insert again the email task as in the following screen shot
  7. Select your Email task, go to the Diagram properties (on the right), and click on Assignments.
  8. You can now assign global variables or constants to each attribute (Body,From,Subject,To)
    From : valid email address
    To : valid email address of the recipients (to specify multiple addresses separate them with semicolon ';')
    Subject : email subject
    Body : email body (can include html)


来源:https://stackoverflow.com/questions/60485774/configure-workitemhandler-to-send-email-in-jbpm-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!