配置workitemhandler以在JBPM 7中发送电子邮件 [英] configure workitemhandler to send email in JBPM 7

查看:90
本文介绍了配置workitemhandler以在JBPM 7中发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是当前我们必须在JBPM 7.32中发送电子邮件的工作项处理程序.

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

但是我们收到错误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)

可以请你帮忙.

下面是我们拥有的示例工作流程,只需发送电子邮件即可.

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. 从BPMN网站设计中删除电子邮件"任务(流程图)
  2. 从工作项处理程序中删除电子邮件
  3. 转到设置/服务任务"并安装电子邮件"(如果已安装,请取消安装并单击安装")
  4. 使用所需参数填写表格:
    主机:smtp服务器主机名
    端口:SMTP服务器端口号
    用户名:登录SMTP服务器时使用的帐户(电子邮件地址)
    密码:登录SMTP服务器时要使用的帐户密码
  5. 如果您提供所有这些信息,则会自动生成工作项处理程序(您可以在设置/部署/工作项处理程序"中进行检查),请勿编辑
  6. 返回您的流程,然后再次插入电子邮件任务,如以下屏幕截图所示:
  7. 选择您的电子邮件任务,转到图"属性(在右侧),然后单击分配".
  8. 您现在可以将全局变量或常量分配给每个属性(Body,From,Subject,To).
    发件人:有效的电子邮件地址
    收件人:收件人的有效电子邮件地址(指定多个地址,用分号;"隔开)
    主题:电子邮件主题
    正文:电子邮件正文(可以包含h​​tml)
  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)

这篇关于配置workitemhandler以在JBPM 7中发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆