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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

DAM Update Asset - Issue with Custom Workflow

Avatar

Level 2

Hi,

There is an issue with importing packages containing DAM assets.  They are not checking to see if the asset already has a dc:title on the metadata node before ingesting.

So we have implemented a custom workflow. Inserted a OR Condition just after the GateKeeperProcess in DAM Update Asset workflow which checks for the conditions as stated below... If condition met, it terminates the workflow else go for ingestion.

function check(){
   var payload = workflowData.getPayload().toString();
   var node = workflowSession.getSession().getNode(payload);
   var node = node.getParent().getParent();
   if(node.hasNode("metadata") && node.getNode("metadata").hasProperty("dc:format")){        
        if((node.getNode("metadata").getProperty("dc:format").getString().indexOf("/pdf") >= 0) ||
           (node.getNode("metadata").getProperty("dc:format").getString().indexOf("/xslx") >= 0) ||
           (node.getNode("metadata").getProperty("dc:format").getString().indexOf("/pptx") >= 0))
        {
            return true;
        }
        else {
            return false;
        }
   }else{
        return false;
   }
}

The workflow is working as expected but when uploading a package containing assets with title metadata, that metadata is being overwritten by the ingestion workflow.

Any pointers how we can avoid overwriting the metadata like dc:title...

Thanks in advance!

-Anuj Varshney

 

 


 

0 Replies