Joget DX Preview Release Available for Download

Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.

Page tree
Skip to end of metadata
Go to start of metadata

本文中包含的电子邮件审批系统 充当电子邮件轮询系统,可根据配置定期提取电子邮件并完成作业。

图1 : 配置监听器

同一时间点可以配置多个监听器. 从技术上讲,每个监听器都将是一个流程实例,它在循环中重复运行,直到用户终止它。

配置

图 2: IMAP邮件设置

IMAP电子邮件设置必须进行配置,以便它将检查新邮件的特定电子邮件收件箱。

创建一个专门的电子邮件地址来接收这样的“响应”电子邮件是很重要的,这样执行代码块不会花费太多的时间处理不相关的电子邮件。

图3:监听器设置

监听设置也需要配置,以确定检查频率和电子邮件匹配。

请注意,检查间隔也受到Joget Workflow系统设置中设置的截止检查器间隔的限制。

 

图4:监听器设置 - 主题和内容

主题和内容模式非常重要。

确保您匹配您在其他Joget Workflow应用程序中发送的外发邮件的内容。

可能需要一些尝试才能正确完成,因此您可以打开“ 调试模式”以获取相关日志以进行调试。

 

Content Pattern
{form_approval_new_application_approval_action_status}
{unuse}
{unuse}ID: {processId}
{unuse}Remarks: [{form_approval_new_application_approval_action_remarks}]
{unuse}

将电子邮件工具中配置的示例电子邮件从系统发送给应答者。

The following application required your approval with details:
====================================
Name : #form.seaa_application.name#
Email : #form.seaa_application.email#
ID: #assignment.processId#
====================================
Please reply this email with keyword "Approved", "Rejected" or "Clarification Required". 
If your have remark message, please fill inline between the square brackets below.
Remarks: [ ]
==  This is a system generated message. ==

示例电子邮件

The following application required your approval with details:
====================================
Name : Etta
Email : etta@joget.com
ID: 43_seaa_new_application_approver_process
====================================
Please reply this email with keyword "Approved", "Rejected" or "Clarification Required".
If your have remark message, please fill inline between the square brackets below.
Remarks: []
==  This is a system generated message. ==

接收方回复邮件的样本电子邮件。

Approved

> The following application required your approval with details:
> ====================================
> Name : Etta
> Email : etta@joget.com
> ID: 43_seaa_new_application_approver_process
> ====================================
> Please reply this email with keyword "Approved", "Rejected" or "Clarification Required".
> If your have remark message, please fill inline between the square brackets below.
> Remarks: [356pm approved]
> ==  This is a system generated message. ==

显示电子邮件轮询和分配完成的服务器日志。

Log
INFO  02 Mar 2016 16:52:50 App: eas - Poll Email tool  - Connect to IMAP for machine@sample-joget.com
INFO  02 Mar 2016 16:52:53 App: eas - Poll Email tool  - IMAP connected for machine@sample-joget.com
INFO  02 Mar 2016 16:52:53 App: eas - Poll Email tool  - Unread Messages: 1
INFO  02 Mar 2016 16:52:54 App: eas - Poll Email tool  - Subject filter for (Re: Email Approval).
INFO  02 Mar 2016 16:52:55 App: eas - Poll Email tool  - --- Mail 0: Re: Email Approval ---
INFO  02 Mar 2016 16:52:55 App: eas - Poll Email tool  - Sender: Cat Grant <cat-grant@sample-joget.com>
INFO  02 Mar 2016 16:52:55 App: eas - Poll Email tool  - Mail Content: Approved____> The following application required your approval with details:__> ====================================__> Name : Etta__> Email : etta@joget.com__> ID: 43_seaa_new_application_approver_process__> ====================================__>__> Please reply this email with keyword "Approved", "Rejected" or "Clarification Required".__>__> If your have remark message, please fill inline between the square brackets below.__> Remarks: [356pm approved]__>__> ==  This is a system generated message. ==__>__>__
INFO  02 Mar 2016 16:52:55 App: eas - Poll Email tool  - subject_pattern:
INFO  02 Mar 2016 16:52:55 App: eas - Poll Email tool  - subject_reg:
INFO  02 Mar 2016 16:52:55 App: eas - Poll Email tool  - subject_reg:
INFO  02 Mar 2016 16:52:55 App: eas - Poll Email tool  - content_pattern: {form_approval_new_application_approval_action_status}__{unuse}__{unuse}ID: {processId}__{unuse}Remarks: [{form_approval_new_application_approval_action_remarks}]__{unuse}__
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - content_reg: \{form_approval_new_application_approval_action_status\}__\{unuse\}__\{unuse\}ID: \{processId\}__\{unuse\}Remarks: \[\{form_approval_new_application_approval_action_remarks\}\]__\{unuse\}__
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - content_reg: (.*?)__([\s\S]*)__([\s\S]*)ID: (.*?)__([\s\S]*)Remarks: \[(.*?)\]__([\s\S]*)__
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - key: form_approval_new_application_approval_action_status
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - value: Approved
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - key: unuse
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - value: __> The following application required your approval with details:__> ====================================__> Name : Etta__> Email : etta@joget.com
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - key: unuse
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - value: >
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - key: processId
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - value: 43_seaa_new_application_approver_process
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - key: unuse
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - value: > ====================================__>__> Please reply this email with keyword "Approved", "Rejected" or "Clarification Required".__>__> If your have remark message, please fill inline between the square brackets below.__>
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - key: form_approval_new_application_approval_action_remarks
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - value: 356pm approved
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - key: unuse
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - value: >__> ==  This is a system generated message. ==__>__>
INFO  02 Mar 2016 16:52:56 App: eas - Poll Email tool  - Submit Form for assignment: 81_43_seaa_new_application_approver_process_approval {approval_new_application_approval_action_status=[Ljava.lang.String;@e992653, approval_new_application_approval_action_remarks=[Ljava.lang.String;@68a31aa1}
I

如果根据主题或内容进行匹配,则代码块将检索电子邮件的发件人信息(电子邮件)并将其与系统中的现有用户相匹配。

如果与用户匹配,并且与特定用户的分配有进一步匹配,则将继续完成分配。

在完成分配时,根据所设置的配置,还可以设置工作流程变量的值和/或表格数据值。

 

图 5: 可选 - SMTP 邮件自动回复设置

如果您希望侦听器自动回复匹配的电子邮件,则可以配置此部分。

APP_eas-1-20160303184155.jwa

  • No labels