Expand my Community achievements bar.

SOLVED

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

Avatar

Former Community Member

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 {

}

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

3 Replies

Avatar

Level 10

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)

Avatar

Correct answer by
Level 10

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

Avatar

Former Community Member

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