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