Hi,
We currently have a workflow launcher (L1) which triggers WF-A when there are any changes under /content/dam(/.*/)dogs
Now we have to trigger another workflow - WF-B when there are any changes under this - /content/dam(/.*/)dogs/m2. So we have another launcher for this as well (L2)
To avoid WF-1 getting triggered when there are changes under /content/dam(/.*/)dogs/m2 we have to add a Condition.
How to add path as an condition to exclude (/content/dam(/.*/)dogs/m2) in L1 ? I have known about adding only the properties in the condition list of a WF launcher.
Anyone aware of any implicit object name we can give in the condition field ?
something like this ?
path!= /content/dam(/.*/)dogs/m2
OR Any different idea is appreciated.
Thanks,
Solved! Go to Solution.
Views
Replies
Total Likes
@mrudul -
Also, have you tried editing the condition and selcting the condition as the path? And then enter a RegeX that matches paths that do not start with "/content/dam(/.*/)dogs/m2".
For example, you can use the following regular expression: ^(?!\/content\/dam\/.*\/dogs\/m2).*$.
@mrudul Cant you add a property for level as "level1" or "level2" and trigger the WF based on that property ? you can add that property by metadata profile. Just an idea.
Hello @mrudul -
Here's how you can approach this:
Create a custom workflow process step that will be responsible for evaluating the path condition. This custom step will be invoked in WF-A. In the custom process step, you can use the ResourceResolver to access the current path of the resource being processed. Then, you can compare it with the exclusion path (/content/dam(/.*/)dogs/m2). If the path matches the exclusion criteria, you can choose to exit the workflow without proceeding further.
By implementing this approach, you can effectively exclude the /content/dam(/.*/)dogs/m2 path from being processed by WF-A while still maintaining a workflow launcher for changes under /content/dam(/.*/)dogs. Note that this requires custom development in AEM using Java to create the custom workflow process step.
Regards,
Tanika
Thanks for this @Tanika02 . Yes, using a custom step is always an option. I was trying to understand implicit objects if there are available readily to directly use.
I believe we can also use a simple ecma script to get the payload path and switch accordingly. Ntl, thanks for elaborating.
@mrudul -
Also, have you tried editing the condition and selcting the condition as the path? And then enter a RegeX that matches paths that do not start with "/content/dam(/.*/)dogs/m2".
For example, you can use the following regular expression: ^(?!\/content\/dam\/.*\/dogs\/m2).*$.
Will try that and get back to you.
Views
Likes
Replies