Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

URL Form content path


Level 2



I am completely new to AEM and would need everyone help.

I am creating a form with 2 approval steps.. I can use the "assign task" in the WF but it only allows to view the submitted form in read-only mode. The approver can't change any data... So I would like to build a link that links to the submitted adaptive form with prefilled data that I use jcr:///... /Data.json protocol. Does anyone know how to get the url to the payload (content path) in the workflow? Appreciate any help.



1 Accepted Solution


Correct answer by
Level 5
8 Replies


Level 5

@SPMonkey  - Hoping this helps you


In AEM Workflow -With resource object in Java you should be able to get page path etc.



Pseudo Code 


public final void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap args) throws
WorkflowException {

/* Get the Workflow Payload */

final WorkflowData workflowData = workItem.getWorkflowData();
final String type = workflowData.getPayloadType();





Level 2

Hi Manjunathdj,


Thanks so much for the reply. I appreciate that.


Is there any OOTB feature that is available directly in the workflow so we can use and get the payload path/URL without creating a new bundle? We are trying to build a string that could be used in the notification email so when the approver receives an email, they can click on the link, modify the form and submit the form. The following screenshot has one part of the string we would like to build in the WF. Thanks much.


PS: I am completely new to AEM so please treat me like a baby when you give any instruction. I really appreciate your time and effort. 🙂




Correct answer by
Level 5


Level 2

Sorry for a silly question. 

This is my workflow:


In the "Send Email" action, I put the parameter ${payload.path}


When i received the email, the link is incorrect. Could you help?








Level 2

Assuming that I create a ECMA file with this code and call it in a Process step in the workflow, could you share how can I assign path to a workflow variable?





Level 5



In java you can get payload as below and send email



    public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) {
        // Getting payload from Workflow - workItem -> workflowData -> payload
        String payloadType = workItem.getWorkflowData().getPayloadType();
        LOGGER.debug("{}: Payload type: {}", TAG, payloadType);