Workflow Step Read and Write Metadata on Image Upload -AEM 5.6.1 | Community
Skip to main content
Level 9
October 16, 2015
Solved

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

  • October 16, 2015
  • 5 replies
  • 2159 views

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

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 Sham_HC

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.

5 replies

Sham_HC
Level 10
October 16, 2015

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

Level 9
October 16, 2015

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.

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

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.

Level 9
October 16, 2015

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?

Sham_HC
Level 10
October 16, 2015

It is not possible IMO without touching OOB workflow model