Highlighted

Display AEM Content Fragment in a Workflow Step

Giancarlo__Sapi

25-05-2018

In AEM 6.2 I created a simple workflow model with only participation steps. This is for reviewing/approving/publishing AEM Content Fragments.

I tried two options, but one doesn't work and the other seems to have an error...

  1. I created a workflow launcher that listens to the AEM Content Fragment section in /content/dam. When a change is made, the workflow gets triggered correctly. In the Inbox is also the link to the content fragment. When clicking the link, a download box appears that will download the content fragment as a physical file. This is not good for review purposes.
  2. In the navigation page I selected the content fragment. Then I selected "Timeline" and from there "Workflow". I selected the workflow model and started the workflow. The payload shows a different link now. When clicking on the payload link, nothing happens. If I select an asset, e.g. an image, these links show the image. But with an AEM Content Fragment the link does nothing.
    When I though mouse over the link, the status message shows a complete different link (see image).

What is the process to display an AEM Content Fragment from a workflow step when clicking on the payload?

AEMCFWorkflowError .png

Replies

Highlighted

Giancarlo__Sapi

29-05-2018

Yes, the link shows how to create an AEM Content Fragment. However, how do you review the content fragment in a workflow step? The payload has the link to the content fragment and will never have a link to another page containing the fragment.

It's similar to an asset in the workflow step: clicking on the payload link will display the asset.

If you look at the screenshot, you see that the payload link is not resolved propertly.

Highlighted

Giancarlo__Sapi

29-05-2018

Thanks, arunp99088702​. Yes, correct. The challenge however is the link provided in the workflow step (payload). If you work on an AEM Content Fragment and want to review the content fragment via workflow, then the payload link does not show the content fragment. It actually does nothing...

I could of course add a "sling:resourceType" pointing to some GET.jsp to read the content fragment and display it, but that is quite cumbersome for an author creating content fragments with the AEM tool.

I could also try to write a workflow process step, but I can't add a modified link to the "comment" programmatically.

I have a feeling a rendering resource is missing for AEM Content Fragments. See, if you edit an asset, e.g. image and review/approve via workflow, the link opens a viewer to display the asset. As a workflow member I can click on the payload and actually see the image, without having to leave the inbox. Hence I assume this must be possible for AEM Content Fragments as well.