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
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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));
}
}
}
Hi @AsifChowdhury ,
Please check if this helps - https://experienceleague.adobe.com/docs/experience-manager-learn/forms/inbox-customization/add-marri...
Thanks,
Chitra
Hi @ChitraMadan , I have seen this article already. This is only allows to grab those fields which are available in the workflow metadata. But what I am asking that is not available in the workflow metaDataMap. So this will not work.
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));
}
}
}
Views
Likes
Replies