Expand my Community achievements bar.

SOLVED

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

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

View solution in original post

3 Replies

Avatar

Correct answer by
Level 8

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

Avatar

Level 3

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