DAM Update Asset Workflow failing

Avatar

Avatar
Validate 10
Level 3
sreenivasula
Level 3

Likes

7 likes

Total Posts

95 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 3
sreenivasula
Level 3

Likes

7 likes

Total Posts

95 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sreenivasula
Level 3

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
Coach
MVP
Arun_Patidar
MVP

Likes

1,440 likes

Total Posts

3,312 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,440 likes

Total Posts

3,312 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
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
Validate 10
Level 3
sreenivasula
Level 3

Likes

7 likes

Total Posts

95 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 3
sreenivasula
Level 3

Likes

7 likes

Total Posts

95 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sreenivasula
Level 3

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
Coach
MVP
Arun_Patidar
MVP

Likes

1,440 likes

Total Posts

3,312 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,440 likes

Total Posts

3,312 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
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
Validate 10
Level 3
sreenivasula
Level 3

Likes

7 likes

Total Posts

95 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 3
sreenivasula
Level 3

Likes

7 likes

Total Posts

95 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sreenivasula
Level 3

04-09-2018

Hello all,

              Any help here please, blocked on this.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

05-09-2018

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

Avatar

Avatar
Level 1
araia58430379
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
araia58430379
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
araia58430379
Level 1

10-10-2018

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

Avatar

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile
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
Level 1
araia58430379
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
araia58430379
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
araia58430379
Level 1

10-10-2018

I am using AEM 6.3, SP2

Avatar

Avatar
Validate 1
Level 1
devandram973192
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
devandram973192
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
devandram973192
Level 1

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!