A common request is for the ability to include the comments entered by the task reviewer in an email. In AEM Forms 6.4 there is no out of the box mechanism to capture the user entered comments and include these comments in email. 

To meet this requirement, a sample OSGi bundle is provided that can be used to capture comments and store these comments as workflow metadata property. 

The following screenshot shows you how to use process step in AEM Workflow to capture comments and store them as metadata property. The "Capture Workflow Comments" is the name of the java class that needs to be used in the process step. You need to pass the metadata property name that will hold the comments. In the screenshot below,managerComments is the metadata property that will store the comments.

Capture

To test this capability on your system, please follow the following steps

Import and install the assets related to this article using package manager into AEM. The assets contain OSGi bundle which stores the comments, workflow model and sample user(manager).

Import the Adaptive Form from the Forms and Documents screen by clicking on Create | File Upload

Preview the form by browsing to this URL

The form should be pre-populated with the logged in user's details. If the form is not pre-populated, make sure the user profile of the logged in user had all the fields populated.

Fill in the Start and End Date and submit the form.

Logout of AEM.

Login to AEM as manager/password.

Open the task from the inbox and submit the form. Please enter some comments when prompted.

Logout of AEM.

The comments will be stored in the metadata property called managerComments in crx. To check for the comments login to crx as admin. The workflow instances are stored in the following path

/var/workflow/instances/server0

Select the appropriate workflow instance and check for the property managerComments in the metadata node.

 

 

Download

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy