Unable to Start Workflow with the help of Launchers using proper regualr expession | Community
Skip to main content
January 30, 2023
Solved

Unable to Start Workflow with the help of Launchers using proper regualr expession

  • January 30, 2023
  • 3 replies
  • 3511 views

 

Hi

I am trying to start a workflow with the help of launcher but only for the images inside abc-cropping folder.
As in the below String (3 sub folders) bold part is not static, it is differnt for differnt country and regions but abc-cropping is static and is present inside same level hierarchy so tyring with regular expression in the below mentiond path.

 

String - /content/dam/xyzsite/products/temporary/india/scm-mumbai/1_2345/abc-cropping

path - /content/dam/xyzsite/products/temporary(/.*)/abc-cropping

 

but it's not working, when i am workig trying with   /content/dam/xyzsite/products/temporary(/.*), workflow is getting triggered on all the assets inside any sub folder of temporary.

But we want to triger workflow only on the assets inside abc-cropping folder using launcher.

Please guide valid path(regular expression) for the above String.

 

Thanks.

 

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 DEBAL_DAS

Hi Debal,

 

The workflow code contains some project specific data.
Debal sir, it's working fine if we provide the exact path or the below path:
/content/dam/xyzsite/products/temporary(/.*) .
I don't understand why it's not working if we put anything extra after (/.*) in the path.

Thanks.


Sharing .content.xml associated with workflow launcher here -

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:WorkflowLauncher" condition="" conditions="[jcr:content/jcr:mimeType==image/.*]" description="" disabledFeatures="[]" enabled="{Boolean}true" eventType="{Long}1" excludeList="" features="[]" glob="/content/dam/my-digital-assets(/.*/)abc-cropping(/.*/)renditions/original" nodetype="nt:file" runModes="author" workflow="/var/workflow/models/scheduled_activation"/>

Could you please just test it with some other workflow model and share your observation.

3 replies

arunpatidar
Community Advisor
Community Advisor
January 30, 2023

Hi,

It should work, there are many examples OOTB launcher setup

/content/dam/xyzsite/products(/.*/)abc-cropping(/.*) 

Arun Patidar
Level 2
January 31, 2023

Hi Arun,
I have tried with the path :

/content/dam/xyzsite/products(/.*/)abc-cropping(/.*)

but it's not worked.

Thanks.



BrijeshYadav
Level 5
January 30, 2023

As Arun mentioned it should work with the given expression.

Also you can find many more example in OOT workflow launcher

 

Level 2
January 31, 2023

Hi Brijesh,

I tried the way you suggested, but it didn't worked, even tried with Nodetype as dam:Asset

Thanks.

 

DEBAL_DAS
New Member
January 30, 2023

I have tested with workflow launcher configuration below and it's working for me-

 

I have used path: /content/dam/my-digital-assets(/.*/)abc-cropping(/.*/)renditions/original

 

Just for testing purpose, I have used Scheduled Page/Asset Activation workflow here.

 

Hope this will help.

Debal Das, Senior AEM Consultant
Level 2
January 31, 2023

Hi Debal, I have tried the way you suggested but it's not working for me, please check the below attachment.

I have also tried by changing nodetype to  nt:file.
Thanks.

Level 2
February 1, 2023

Sharing .content.xml associated with workflow launcher here -

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:WorkflowLauncher" condition="" conditions="[jcr:content/jcr:mimeType==image/.*]" description="" disabledFeatures="[]" enabled="{Boolean}true" eventType="{Long}1" excludeList="" features="[]" glob="/content/dam/my-digital-assets(/.*/)abc-cropping(/.*/)renditions/original" nodetype="nt:file" runModes="author" workflow="/var/workflow/models/scheduled_activation"/>

Could you please just test it with some other workflow model and share your observation.


Hi @arunpatidar  @brijeshyadav @debal_das 
The below path worked for me finally.
/content/dam/xyzsite/products/temporary(/.*)abc-cropping(/.*)

Thanks a lot for giving your valuable time to guide me.

 

Thanks.