Error including payload in workflow | Community
Skip to main content
Level 3
June 27, 2025
Solved

Error including payload in workflow

  • June 27, 2025
  • 1 reply
  • 329 views

Hello,

We’ve encountered an issue with the existing custom workflow. Whenever we select the payload (page/assets) and trigger the workflow, the selected payload is not attached. We have to manually use the "Add Content" option to include the assets.

Could someone confirm if this might be due to permission-related issues or something else? I couldn’t find any useful information in the logs. Has anyone else experienced a similar issue?

Best answer by Karishma_begumSh

Hi @s1101v 

Trigger the workflow from the Sites or Assets UI (e.g., /sites.html or /assets.html), where AEM attaches the payload automatically.

 

Launcher or Custom Code Missing Payload Injection

If you're triggering the workflow programmatically (e.g., via servlet, workflow launcher, or custom service), make sure the payload is explicitly set in code:

WorkflowData data = workflowSession.newWorkflowData("JCR_PATH", payloadPath); workflowSession.startWorkflow(model, data);

If this is missing, the workflow will start without any payload.

 

Permissions

If the user/service triggering the workflow does not have adequate permissions on:

  • The payload path (e.g., /content/...)

  • The workflow nodes (/var/workflow/...)

then the payload may silently fail to attach.

Ensure the user/service account has at least:

  • jcr:read, jcr:modifyProperties on the payload

  • Write access to /var/workflow/instances and related paths

Hope this helpful.

 

Regards,

Karishma.

 

 

1 reply

Karishma_begumSh
Karishma_begumShAccepted solution
Level 4
June 27, 2025

Hi @s1101v 

Trigger the workflow from the Sites or Assets UI (e.g., /sites.html or /assets.html), where AEM attaches the payload automatically.

 

Launcher or Custom Code Missing Payload Injection

If you're triggering the workflow programmatically (e.g., via servlet, workflow launcher, or custom service), make sure the payload is explicitly set in code:

WorkflowData data = workflowSession.newWorkflowData("JCR_PATH", payloadPath); workflowSession.startWorkflow(model, data);

If this is missing, the workflow will start without any payload.

 

Permissions

If the user/service triggering the workflow does not have adequate permissions on:

  • The payload path (e.g., /content/...)

  • The workflow nodes (/var/workflow/...)

then the payload may silently fail to attach.

Ensure the user/service account has at least:

  • jcr:read, jcr:modifyProperties on the payload

  • Write access to /var/workflow/instances and related paths

Hope this helpful.

 

Regards,

Karishma.