What's the best approach to exclude DAM assets from the default "DAM Update Asset" workflow | Community
Skip to main content
johndoe42
New Participant
October 16, 2015
Solved

What's the best approach to exclude DAM assets from the default "DAM Update Asset" workflow

  • October 16, 2015
  • 3 replies
  • 2319 views

Hi guys

I'm currently working on an import task that requires me to import thousands of employee images at a time. Since this requires some specific tasks to be performed I decided to use a dedicated workflow for this and to exclude the target DAM path from the default "DAM Update Asset" workflow.

I tried [0] first but it didn't work for me. Then I tried to put a "Goto Step" with the below JS in front of the default workflow and a "No operation" step at the end to which the "Goto Step" is jumping if the condition is met.

function check() { try { var emplPath = "/content/dam/employees"; var assetPath = workflowData.getPayload().toString(); var result = assetPath.indexOf(emplPath) !== -1; log.info("Employee check for " + emplPath + " returns " + result); return result; } catch(e) { log.error(e); return false; } }

This is working fine and I'm also able to exclude multiple locations if needed however I'm wondering if this is the best way to approach this requirement. Is there some kind of best practice how to do this? I think the launcher configuration would be a better place to address this issue but I wasn't able to get a proper configuration set up so I settled with the updated default workflow for now.

Any thoughts?

Cheers & thx in advance

 

[0] https://forums.adobe.com/thread/1231883

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by leeasling

Personally I would change the "path" field on the workflow launcher configuration.  You can exclude the folder by doing so.

/content/dam(/(?!employees).*/)renditions/original

3 replies

leeaslingAccepted solution
New Participant
October 16, 2015

Personally I would change the "path" field on the workflow launcher configuration.  You can exclude the folder by doing so.

/content/dam(/(?!employees).*/)renditions/original
johndoe42
johndoe42Author
New Participant
October 16, 2015

Dear leeasling

This was exactly what I was looking for. I was trying so hard to get it working with the exclude list that I somehow completely ignored this possibility. Thank you very much for pointing out the obvious. ;)

Cheers

New Participant
October 16, 2015

Happy to help!