Hi,
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.
Kong
Solved! Go to Solution.
Views
Replies
Total Likes
@SPMonkey - Hoping this helps you
In AEM Workflow -With resource object in Java you should be able to get page path etc.
Pseudo Code
******************************************
@Override
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();
......
*******************************************************************
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.
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?
${payload.path}
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?
You are using OOTB WorkFlow Process so refer below to alter email templates
In java you can get payload as below and send email
@Override
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);
workItem.getWorkflowData().getPayload().toString()