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

SOLVED

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

johndoe42
Level 3
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
leeasling
Correct answer by
Level 8
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
leeasling
Correct answer by
Level 8
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

johndoe42
Level 3
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