Best practice for AEM Guides Review Tasks | Community
Skip to main content
January 6, 2025
Solved

Best practice for AEM Guides Review Tasks

  • January 6, 2025
  • 3 replies
  • 1320 views

Hi,

I am currently exploring the AEM Guides feature.

Regarding task creation, I understand that there is an out-of-the-box (OOTB) workflow that sends a notification to the reviewer once the review task is created.

However, I need help with the reverse process. Is there any documentation about a workflow or process that notifies the author/owner via email and the bell notification icon within the AEM server once a reviewer submits all their comments?

 

Thanks!

Best answer by partyush

Hi @eysmatyu 

To notify the author when a reviewer submits their comments, you can implement a custom AEM workflow that triggers email and in-system notifications. Here’s how to achieve this:

Steps:

  1. Create Custom Workflow:
    In Workflow Editor, create a workflow model with the following steps:

    • Participant Step: Assign the review task to the reviewer.
    • Process Step: Notify the author after review completion.
  2. Configure Workflow Launcher:
    Trigger the workflow when the review is completed by setting up a Launcher:

    • Path: /content/<project-path>/guides
    • Event Type: Modified
    • Node Type: nt:unstructured
  3. Email Notification:
    Add a Send Email step to notify the author:

    • To: ${payload.jcr:content/metadata/authorEmail}
    • Subject: Review Completed
    • Message: The review for ${payload.name} is complete
  4. Bell Notification:
    Implement a custom Workflow Process Step using the NotificationManager API:

 

@Component(service = WorkflowProcess.class, property = {"process.label=Send Bell Notification"}) public class BellNotificationProcess implements WorkflowProcess { @Reference private NotificationManager notificationManager; @Override public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) { String authorId = (String) workItem.getWorkflowData().getMetaDataMap().get("authorId"); String message = "Your review task has been completed."; notificationManager.send(authorId, message); } }

 

Deploy and Test:
Deploy the workflow and custom step, then verify email and bell notifications trigger upon review completion.

Please let me know in case of any doubts.

 

Best

Partyush Kumar

3 replies

partyush
Community Advisor
partyushCommunity AdvisorAccepted solution
Community Advisor
January 6, 2025

Hi @eysmatyu 

To notify the author when a reviewer submits their comments, you can implement a custom AEM workflow that triggers email and in-system notifications. Here’s how to achieve this:

Steps:

  1. Create Custom Workflow:
    In Workflow Editor, create a workflow model with the following steps:

    • Participant Step: Assign the review task to the reviewer.
    • Process Step: Notify the author after review completion.
  2. Configure Workflow Launcher:
    Trigger the workflow when the review is completed by setting up a Launcher:

    • Path: /content/<project-path>/guides
    • Event Type: Modified
    • Node Type: nt:unstructured
  3. Email Notification:
    Add a Send Email step to notify the author:

    • To: ${payload.jcr:content/metadata/authorEmail}
    • Subject: Review Completed
    • Message: The review for ${payload.name} is complete
  4. Bell Notification:
    Implement a custom Workflow Process Step using the NotificationManager API:

 

@Component(service = WorkflowProcess.class, property = {"process.label=Send Bell Notification"}) public class BellNotificationProcess implements WorkflowProcess { @Reference private NotificationManager notificationManager; @Override public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) { String authorId = (String) workItem.getWorkflowData().getMetaDataMap().get("authorId"); String message = "Your review task has been completed."; notificationManager.send(authorId, message); } }

 

Deploy and Test:
Deploy the workflow and custom step, then verify email and bell notifications trigger upon review completion.

Please let me know in case of any doubts.

 

Best

Partyush Kumar

gkalyan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 6, 2025

@eysmatyu 

Go through this AEM guide documentation on "Customize review workflow" which will help your case.

https://experienceleague.adobe.com/en/docs/experience-manager-guides/using/install-guide/cs-ig/custom-workflow-cs/customize-workflows

kautuk_sahni
Community Manager
Community Manager
January 27, 2025

@eysmatyu Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni