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

Workflow Step Read and Write Metadata on Image Upload -AEM 5.6.1

Avatar

Level 9

Hello,

I am trying to read and write metadata on Image upload, I am able to trigger the custom workflow to extract metadata, but in vain.

Here are my observations. I have tried using asset.getMetadataValue and Valuemap but no use.

I have also tried using node.getProperty("dam:Fileformat").getString() but no results, can anyone help me here?

Update: Instead of updating "DAM Update Asset" Workflow, i created a workflow launcher on node created at path : /content/dam/Test, (i.e> if there is an image uploaded at path  /content/dam/Test) , but in my opinion , it cannot extract metadata or write anything to it, cause the metadata update by "DAM Update Asset" Workflow is not complete by the time my workflow is triggered. Any way i could trigger my custom workflow after the "DAM Update asset" workflow is complete?

or have my workflow triggered after the metadata node for the particular image uploaded ,has been completely updated?

Regards,

Nicole

1 Accepted Solution

Avatar

Correct answer by
Level 10

Yes upgrade will be problem & after upgrade you might need to verify and add that additional step.  ALternatively you can configure launcher to skip for test folder & create a new launcher for test folder which can internally call dam update workflow. Note which ever approach you take will need to modify OOB workflow model or launcher & also this is required to avoid running multiple workflow for same payload.

View solution in original post

0 Replies

Avatar

Level 10

At the end of DAM Update Asset add an "Container Step" and call your workflow.

Avatar

Level 9

Sham HC wrote...

At the end of DAM Update Asset add an "Container Step" and call your workflow.

 

Wouldn't it be a problem if i do it in DAM update asset workflow itself on AEM upgrade? I would want to have a separate workflow model being invoked, would that be feasible?

In addition to that, i am monitoring a particular path /content/dam/test, and only uploads to this path must trigger workflow. If i put it in DAM update asset workflow as container step, wouldn't i be having it triggered for all the image uploads rather than just a fixed path?

Also i would not want my workflow to be triggered on any property edit for the image, just as DAM update asset does.

Hence, triggering workflow on fixed path, where images are uploaded (Node Created Event) and after DAM Update asset has completed writing/ updating the metadata node is what i am looking for.

Avatar

Correct answer by
Level 10

Yes upgrade will be problem & after upgrade you might need to verify and add that additional step.  ALternatively you can configure launcher to skip for test folder & create a new launcher for test folder which can internally call dam update workflow. Note which ever approach you take will need to modify OOB workflow model or launcher & also this is required to avoid running multiple workflow for same payload.

Avatar

Level 9

Sham HC wrote...

Yes upgrade will be problem & after upgrade you might need to verify and add that additional step.  ALternatively you can configure launcher to skip for test folder & create a new launcher for test folder which can internally call dam update workflow. Note which ever approach you take will need to modify OOB workflow model or launcher & also this is required to avoid running multiple workflow for same payload.

 

Thank you Sham,

Now i have a workflow launcher set up on node created event on a path, /content/dam/test, but can i make it listen to to a condition, say , once metadata has been completely written by DAM Update asset workflow?

Avatar

Level 10

It is not possible IMO without touching OOB workflow model