在我们的项目中,我们的任务是在完成某些任务后向某些用户发送通知。
以下是用 BPMN2.0 xml 编写的代码 -
<serviceTask id="notifyPartner" name="Notify Partner" flowable:type="mail">
<documentation>Notify Partner about the assignment.</documentation>
<extensionElements>
<flowable:field name="to">
<flowable:string><![CDATA[testemail@some.com]]></flowable:string>
</flowable:field>
<flowable:field name="from">
<flowable:string><![CDATA[testemail@some.com]]></flowable:string>
</flowable:field>
<flowable:field name="subject">
<flowable:string><![CDATA[Notify Partner]]></flowable:string>
</flowable:field>
<flowable:field name="text">
<flowable:string><![CDATA[Notify Partner about the assignment.]]></flowable:string>
</flowable:field>
</extensionElements>
</serviceTask>
使用 application.properties 作为 -
spring.flowable.mailServerHost=smtp.gmail.com
spring.flowable.mailServerPort=587
spring.flowable.mailServerUserName=testemail@some.com
spring.flowable.mailServerPassword=****
spring.flowable.mailServerUseTls=true
但这一切都没有成功。它给出以下错误 -
java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
我什至尝试在 flowable.cfg.xml 中设置所有属性
<property name="mailServerHost" value="smtp.gmail.com" />
<property name="mailServerPort" value="587" />
<property name="mailServerUseTls" value="true" />
<property name="mailServerUsername" value="testemail@some.com" />
<property name="mailServerPassword" value="****" />
是否缺少其他配置?使用的可流动版本是 6.2.1。