AEM Inbox
How to capture workflow comment in AEM inbox. I can add custom column in AEM inbox but how to capture the exact column and value in the AEM inbox.


By default the comments is under each work item

But I need to show it in the inbox
How to capture workflow comment in AEM inbox. I can add custom column in AEM inbox but how to capture the exact column and value in the AEM inbox.


By default the comments is under each work item

But I need to show it in the inbox
The Correct approach to achieve this requirement, while adding a custom column, we need to query the workflow instance location where the comments are stored. Then we can add the value to the additional column. Here is the code snippet:
Resource resource = resourceResolver.getResource(resourcePath);
if(resource != null) {
Resource metadata = resource.getChild("metaData");
if(metadata != null) {
ValueMap valueMap = metadata.getValueMap();
if(valueMap.containsKey("comment")){
workflowMetadata.put("comment", valueMap.get("comment", String.class));
}
}
}Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.