DAM Update Asset Workflow failing

Avatar

Avatar

sreenivasula

Avatar

sreenivasula

sreenivasula

31-08-2018

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 ?

Replies

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883
Arun_Patidar
MVP

02-09-2018

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

Avatar

sreenivasula

Avatar

sreenivasula

sreenivasula

03-09-2018

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

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883
Arun_Patidar
MVP

03-09-2018

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

Avatar

sreenivasula

Avatar

sreenivasula

sreenivasula

04-09-2018

Hello all,

              Any help here please, blocked on this.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

05-09-2018

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

Avatar

Avatar

araia58430379

Avatar

araia58430379

araia58430379

10-10-2018

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

Avatar

Avatar

raj_mandalapu

MVP

Avatar

raj_mandalapu

MVP

raj_mandalapu
MVP

10-10-2018

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

Avatar

Avatar

araia58430379

Avatar

araia58430379

araia58430379

10-10-2018

I am using AEM 6.3, SP2

Avatar

Avatar

devandram973192

Avatar

devandram973192

devandram973192

17-04-2019

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!