A new Flexera Community experience is coming on November 25th, click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flexible Approval Replies

I'm wondering if anyone has used the flexible approval and have it successfully update the request id.  We have it configured in our development environment and the emails show the links to approve or reject and the keywords are successfully translated in the email.

When we reply to the email or use the reply to approve or reject link, we see what appears to be the ESD Service start to process the reply but never finish.  In the ESDService.log we see the following:

Process request variables..

Process request variables start...

Then nothing after that.  The request stays in a pending approval status and it seems like the ESD Service doesn't process any further. In the Request.log it shows the initial approval email sent but nothing after that.

Also in the MailParser.log we see this every 5 minutes:

Unexpected error in FetchDataFromIMAPServer: The IMAP server replied to the 'SEARCH' command with a 'NO' response: The specified charset is not supported. at MailKit.Net.Imap.ImapFolder.<SearchAsync>d__350.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MailKit.Net.Imap.ImapFolder.Search(SearchQuery query, CancellationToken cancellationToken)
at AppPortal.Infrastructure.Services.MailParserService.FetchDataFromIMAPServer(MailParserConfiguration configdata, List`1 lstNotificationSubj)

Unexpected error in AutoApproveEmailsFromMailBox : Value cannot be null.
Parameter name: source at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at AppPortal.Infrastructure.Services.MailParserService.AutoApproveEmailsFromMailBox()

(1) Solution
I'm thinking that we simply remove the non-English notifications.. This would likely resolve the issue. We can always add them back later if necessary. To do this, run the following query:

delete from WD_Notifications where NotificationID in (3,28) and LocaleId != ''

Once you have run this query, restart the ESD Service. Do you see the error any longer in MailParser.log? If not, then I'd expect that the flexible approval should be working.

View solution in original post

(7) Replies
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Teri,
I have gotten the flexible approval working in my environment.. With that being said, I've also spoken to somebody which was running into the exact issue you are encountering.. I was testing against a gmail imap server.. In this other persons case, they were using an Exchange server. I know that the issue is occurring as the exchange server does not support the character sets for strings which App Portal is searching for. App Portal will search for the subject email strings returned by the following query:

select subject from WD_Notifications where NotificationID in (3,28)

Actually, App Portal will search the subjects up to the first ## in the string. For example, if only English was enabled, then App portal would search for the following strings on the Exchange server:


Approval Request: From


If the French language was enabled in App Portal, then App Portal would also search for the following:

Demande d'approbation : Soumis par

Basically, something in the search string is being rejected by the Exchange server. Either a "special" character, or a double byte character (such as Chinese).

I get the impression that this is something which would need to be handled by the exchange server team.. The following post shows code which is similar to what App Portal is doing:

https://stackoverflow.com/questions/43495877/the-imap-server-replied-to-the-search-command-with-a-no-response-character

Then one thing that I can thing of that we might do would be to change the subject line for the notifications to be in English only.. I'd expect that this would allow us to work around the issue.. Let me know how many rows are returned by the above query and the localeID of each.

Hi Charles,

In my development environment there are 39 rows returned from the query.  I am finding two rows  of each of the following locales:
de, de-Ch, de-li, es, es-MX, fr, fr-CA, it, ja, ja-jp, ko, nl, py, pt-BR, ru, th, zh

All of the subjects in English do not have a locale id and we do not use any locales other than English in the environment. 

I'm thinking that we simply remove the non-English notifications.. This would likely resolve the issue. We can always add them back later if necessary. To do this, run the following query:

delete from WD_Notifications where NotificationID in (3,28) and LocaleId != ''

Once you have run this query, restart the ESD Service. Do you see the error any longer in MailParser.log? If not, then I'd expect that the flexible approval should be working.
Note that at the end of the query, there are two single quotes, not a double quote..

Charles,

That worked and the replies now come through, however, even though the keywords for approve and reject are configured and come through in the body of the approval email, I always get the No Response Acknowledgement Email.  I have the keywords comma separated in the Flexible Approval -Approval Keywords template and in the Reject Keywords template.

Once the IMAP server is queried the MailParser.log has the following:

Could not Approve/ Reject the request 1614. No Response provided. Please provide required keywords to approve/ reject the request.

Forming mail for autoapprove/ reject acknowledgement type : NORESPONSE.

I tried using just the word Approved in the approval keyword template and still had the same results.  Does your request get approved or rejected based on keywords?

Teri

Teri,
Yes, I see the requests getting approved correctly, if in the body of my reply I include the word "Approved". If I simply reply to the email without the word Approved, then I see the behavior that you describe.. Namely:

-Could not Approve/ Reject the request 150. No Response provided. Please provide required keywords to approve/ reject the request.
-Forming mail for autoapprove/ reject acknowledgement type : NORESPONSE.

In addition I saw a notification sent to the approver which states:

Your request from App Portal (AppPortal) for ApproveMe, for the Install process for AppPortal was not approved/ rejected, since response provided was not using predefined keywords.

In the initial approval email that you received, you should have seen a line which states:

You can also click on the following link to auto-populate the mail with required keywords : Approve , Reject

If you click on the Approve link, then a new reply should be created with the word Approve in the body.. If you send this reply, with only Approve in the body, do you see the request approved?

Thanks
Charles

Hi Charles,

 

I’ve tried those as well and the reply to where it opens a new email with Approved in the body, request id in the subject line and still have the same issue. I can open a ticket for this since the original issue is resolved by deleting the language notifications.

-Teri