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

DAM Update Asset Workflow failing

Avatar

Level 4

Hello All,

     We have a requirement, when we upload a pdf(say abc.pdf) to /content/dam/media/ folder, then some custom workflow we developed, creates a structure under /content/dam/media as follows.

/content/dam/media/<random-unique-name>/1.0/<random-unique-name.pdf>

But the moment we drop any asset to /content/dam/* folder, DAM update Asset Workflow triggers and start creating renditions for /content/dam/media/abc.pdf, but by the time it completes, asset is moved to /content/dam/media/<random-unique-name>/1.0/<random-unique-name.pdf> by custom workflow,  So DAM Update Asset workflow is throwing below exceptions.

30.08.2018 06:33:23.429 *ERROR* [JobHandler: /etc/workflow/instances/server0/2018-08-29_1/update_asset_118:/content/dam/media/abc.pdf/jcr:content/renditions/original] com.day.cq.dam.core.impl.RenditionMakerImpl Error while generating renditions for asset /content/dam/media/abc.pdf

javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/media

.....

Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /content/dam/test

30.08.2018 06:33:23.479 *ERROR* [JobHandler: /etc/workflow/instances/server0/2018-08-29_1/update_asset_118:/content/dam/media/abc.pdf/jcr:content/renditions/original] com.day.cq.dam.core.impl.AssetImpl saveAsset: error while saving asset [/content/dam/media/abc.pdf]:

javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/media

....

Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /content/dam/media

Though with above exceptions in log, in AEM 6.0, the workflow completes and creates renditions for moved asset /content/dam/media/<random-unique-name>/1.0/<random-unique-name.pdf>

Now we are migrating to AEM 6.3, and the DAM Update Asset workflow is not completing(in RUNNING state) because of above exceptions and no renditions are created for moved asset /content/dam/media/<random-unique-name>/1.0/<random-unique-name.pdf>

30.08.2018 06:33:25.505 *ERROR* [JobHandler: /etc/workflow/instances/server0/2018-08-29_1/update_asset_118:/content/dam/media/abc.pdf/jcr:content/renditions/original] com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess getAssetFromPaylod: asset [/content/dam/media/abc.pdf/jcr:content/renditions/original] in payload of workflow [/etc/workflow/instances/server0/2018-08-29_1/update_asset_118] does not exist.

30.08.2018 06:33:25.505 *ERROR* [JobHandler: /etc/workflow/instances/server0/2018-08-29_1/update_asset_118:/content/dam/media/abc.pdf/jcr:content/renditions/original] com.day.cq.workflow.compatibility.CQWorkflowProcessRunner Process execution resulted in an error: com.day.cq.workflow.WorkflowException: execute: gatekeeping failed, asset [{/content/dam/media/abc.pdf/jcr:content/renditions/original}] in payload doesn't exist for workflow [{VolatileWorkItem_node1_etc_workflow_instances_server0_2018-08-29_1_update_asset_118}].

com.day.cq.workflow.WorkflowException: com.day.cq.workflow.WorkflowException: execute: gatekeeping failed, asset [{/content/dam/media/abc.pdf/jcr:content/renditions/original}] in payload doesn't exist for workflow [{VolatileWorkItem_node1_etc_workflow_instances_server0_2018-08-29_1_update_asset_118}].

                at com.day.cq.dam.core.process.GateKeeperProcess.execute(GateKeeperProcess.java:84)

                at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)

                at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:189)

                at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:258)

                at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:500)

                at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:291)

                at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:58)

                at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:227)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                at java.lang.Thread.run(Thread.java:745)

Caused by: com.day.cq.workflow.WorkflowException: execute: gatekeeping failed, asset [{/content/dam/research/media/abc.pdf/jcr:content/renditions/original}] in payload doesn't exist for workflow [{VolatileWorkItem_node1_etc_workflow_instances_server0_2018-08-29_1_update_asset_118}].

                at com.day.cq.dam.core.process.GateKeeperProcess.execute(GateKeeperProcess.java:81)

                ... 10 common frames omitted

Is there anyway to continue and complete the workflow like in AEM 6.0, even if it fails for creating renditions on the /content/dam/media/abc.pdf ?

12 Replies

Avatar

Community Advisor

Hi,

Instead of moving pdfs why don't you copy pdfs in random folder and delete the originally pdf as soon as workflow ends or via scheduled job which scan folder and delete pdfs only from original locations /content/dam/media/

API to use - AssetManager ("The Adobe AEM Quickstart and Web Application.")

Avatar

Level 4

Thanks Arun!

     In 6.0, that is how its designed and now we are migrating to 6.3 and facing problem.

My query is, is there anyway we can complete(now its in RUNNING state) DAM Update Asset workflow, though it fails at renditions creation step at original path(/content/dam/media/ ). So that a new instance of DAM Update Asset workflow triggers on new path(/content/dam/media/<random-unique-name>/1.0/<random-unique-name.pdf>) and executes.

Thanks in advance!

Avatar

Community Advisor

Hi,

Not sure, could be because of upgrade workflow is not moving to next step as its failed. Could be a bug fix.

But better to check with Adobe.

Avatar

Level 4

Hello all,

              Any help here please, blocked on this.

Avatar

Level 10

Log a bug as a support ticket. As Arun suggests - this could be an upgrade bug.

Avatar

Level 1

Hi, @sreenivasula I am facing the same issue. Did you find the solution?

Avatar

Community Advisor

Did you try after installing latest service packs ? There are two service packs you can check 3.1 and 3.2

Avatar

Level 2

Hi Experts,

Is this issue resolved?

Apparently, I facing this issue in AEM 6.3 SP2 as well.

If it is resolved, can share with me how this issue has been resolved.

It would be helpful for further action.

Thanks in advance!

Avatar

Level 3

Even we face the same issue on AEM 6.4.2.0
Is this issue resolved?

Avatar

Level 6

Any help on this ? Using 6.4 with service pack 4.1