Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Workflow running multiple times.

Avatar

Level 1

Hello, 
I am working on the custom workflow and I have configured the workflow launcher for my  workflow to be triggered on the modification of .zip file in the specific folder in asset. But when I modify the .zip file in that specific folder its triggering the workflow twice with admin user and also with the service user. What I am missing here? How I can make my workflow to run only once by admin user? Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@testweewew 

 

It can be controlled by using Exclude List of the Workflow Launcher. We need to ignore property updates or event triggers via workflow itself.

 

I have appended following list

cq:name,cq:parentPath,dam:assetState,jcr:lastModifiedBy,event-user-data:changedByWorkflowProcess

 

This is how the launcher looks like.

aanchalsikka_0-1695092200228.png

 


Aanchal Sikka

View solution in original post

5 Replies

Avatar

Community Advisor

@testweewew  check if this launcher based workflow is also applied as a Post processing workflow on this asset folder.

That could cause your workflow to run twice.

If you are on AEM as cloud service, the recommendation from Adobe is to stop using launcher based workflows and switch to post processing workflows.

 

Avatar

Community Advisor

@testweewew are you adding any metadata or updating contents of zip via workflow? If yes then it may trigger twice unless you add user specific rule or go property based jcr event listener 

Avatar

Level 1

I am using the unarchiver OOTB workflow(Unarchiver) a and then adding custom process step to copy the content of the unarchived folder to some other location. In launcher I am using dam:AssetContent as nodeType when zip file is created/modified I am triggering the workflow. I am using AEM cloud version. 

Avatar

Correct answer by
Community Advisor

@testweewew 

 

It can be controlled by using Exclude List of the Workflow Launcher. We need to ignore property updates or event triggers via workflow itself.

 

I have appended following list

cq:name,cq:parentPath,dam:assetState,jcr:lastModifiedBy,event-user-data:changedByWorkflowProcess

 

This is how the launcher looks like.

aanchalsikka_0-1695092200228.png

 


Aanchal Sikka

Avatar

Administrator

@testweewew Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni