Send Email Reminder notifications to all the Approvers after 24 hours via custom servlet prcoess | Community
Skip to main content
May 31, 2017
Solved

Send Email Reminder notifications to all the Approvers after 24 hours via custom servlet prcoess

  • May 31, 2017
  • 3 replies
  • 1719 views

I have created a custom servlet to send workflow notification to all the Approvers using this thread How to use custom email template in a workflow step?

But now another requirement is to send email notification reminder again to all the approver after 48 hours to approve the workflow. I am looking forward for a solution as how this can be done using custom servlet in AEM 6.2 workflow

@Reference

    private ResourceResolverFactory resourceResolverFactory;

    @Reference

    private WorkflowService workflowService;

    @Reference

    private MessageGatewayService messageGatewayService;

    @Override

    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {

}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

As Scott mentioned, you will have to write a scheduler service to look at the workflow instance status. If its still running, then you will have to send the reminder email. If the workflow is complete (means all the approvers are approved) then you dont have to send a reminder.

You can take a look at this example -

Adobe Experience Manager Help | Scheduling Adobe Experience Manager Jobs using Apache Sling

Thanks,

Lokesh

3 replies

June 7, 2017

Thanks for all your help and quick response. I tried this and its working fine

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
New Participant
May 31, 2017

As Scott mentioned, you will have to write a scheduler service to look at the workflow instance status. If its still running, then you will have to send the reminder email. If the workflow is complete (means all the approvers are approved) then you dont have to send a reminder.

You can take a look at this example -

Adobe Experience Manager Help | Scheduling Adobe Experience Manager Jobs using Apache Sling

Thanks,

Lokesh

smacdonald2008
New Participant
May 31, 2017

One solution that comes to mind here is to create an AEM Scheduler Service. A Servlet on its own will not send an email - something has to invoke it.

See: Apache Sling - Scheduler Service (commons scheduler)