Assets workflow fails when ECMA scripts are stored outside trusted roots in AEM
An Adobe Experience Manager (AEM) Assets workflow fails after reaching a transition or process that references a custom ECMA script outside the trusted script roots. The issue can begin after an AEM release introduces or activates stricter script-location enforcement. Asset renditions and Scene7 uploads can complete, but the post-processing workflow remains incomplete and the asset stays in a custom processing state. To fix this, move the custom scripts from /conf or another unsupported location to the appropriate project path under /apps, update and synchronize the workflow models, deploy the changes, and validate a new workflow instance.
Description description
Environment
- Adobe Experience Manager Assets as a Cloud Service
- Custom AEM workflow models
- ECMA workflow scripts
Issue/Symptoms
- You see a DAM asset post-processing workflow fail after an AEM version release.
- You see the workflow fail at a transition, such as an OR-split, or at another step that references a custom ECMA script.
- You receive an error similar to Workflow scripts must be located under /libs or /apps: /conf/global/settings/workflow/scripts/…
- You see asset renditions or Scene7 uploads complete, but the post-processing workflow doesn’t finish.
- You see uploaded assets remain in a custom workflow processing state instead of reaching the expected processed state.
- You see the issue in specific environments depending on the workflow selection, script references, and deployed configuration.
Cause
AEM rejects workflow scripts referenced from locations outside the trusted script roots. A custom workflow model that references an ECMA script under /conf or another unsupported path fails when trusted-script-root enforcement applies. This is a workflow script-location incompatibility and not a failure in Asset Compute, rendition generation, or Scene7 processing.
Resolution resolution
Follow the steps below to resolve the issue:
- Review the failing workflow model and identify all referenced custom scripts, including transition rules, process-step scripts, and dynamic-participant scripts.
- Identify any custom workflow scripts stored outside the trusted script roots, including scripts under
/conf. - Move the affected custom workflow scripts to the appropriate project location under
/apps. - Update each affected workflow model to reference the new script path under
/apps. - Synchronize the updated workflow models so that new workflow instances use the corrected script references.
- Deploy the updated scripts and workflow models by using the organization’s supported source-control and deployment process.
- Validate the updated scripts and workflow models in a lower environment before deploying them to Production.
- After validation, deploy the changes to the higher environments through the standard pipeline.
- Upload a test asset to start a new workflow instance.
- Verify that the workflow proceeds past the previously failing transition, completes the DAM post-processing steps, and moves the asset to the expected processed state.