Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Email Approver System mentioned included in this article acts as a email polling system that fetches emails and complete assignments periodically based on configurations.

...

Subject and Content Patterns are very important.

Make sure that you match the content of the outgoing mail that you send out in your other Joget Workflow App.

...

Code Block
titleContent Pattern
{form_approval_new_application_approval_action_status}
{unuse}
{unuse}ID: {processId}
{unuse}Remarks: [{form_approval_new_application_approval_action_remarks}]
{unuse}

Sample email to be sent out configured in Email Tool from the system to the respondent.

Code Block
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. ==

Sample email

Code Block
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. ==

Sample email replied by the receiver back to the mailer.Actual email content:

Code Block
Approved

> The following application required your approval with details:
> ====================================
> Name : 340pmEtta
> Email : 340pmetta@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. ==
>
>

Server log showing email pooling polling and assignment completion.

Code Block
titleLog
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 : 340pmEtta__> Email : 340pmetta@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 : 340pmEtta__> Email : 340pmetta@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

If there is a match based on the subject or the content, the code block will then retrieve the email's sender information (email) and matches it with an existing user in the system.

If there's a match with an user and if there's a further match with the particular user's assignment, then it will then proceed to complete the assignment.

...

You can configure this section if you want the listener to automatically reply to email that it matches.

View filenameAPP_eas-1-20160303184155.jwaheight250Download the app from Joget Marketplace.