Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

 

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.

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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.

View solution in original post

14 Replies

Avatar

Community Advisor

Hi,

It should work, there are many examples OOTB launcher setup

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



Arun Patidar

Avatar

Level 2

Hi Arun,
I have tried with the path :

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

but it's not worked.

Thanks.



Avatar

Community Advisor

As Arun mentioned it should work with the given expression.

Also you can find many more example in OOT workflow launcher

BrijeshYadav_0-1675086187029.png

 

Avatar

Level 2

Hi Brijesh,

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

laucher-1.jpg

Thanks.

 

Avatar

Employee Advisor

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

 

DEBAL_DAS_0-1675099406061.pngDEBAL_DAS_1-1675099419479.png

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.

Avatar

Level 2

Hi Debal, I have tried the way you suggested but it's not working for me, please check the below attachment.
Launcher.jpg
I have also tried by changing nodetype to  nt:file.
Thanks.

Avatar

Employee Advisor

Did you check instances, Archive, Failures console -

 

DEBAL_DAS_0-1675151634515.png

 

Avatar

Level 2

Hi Debal,

yes i have checked, no instances are getting captured in Archive, Failures console.

Thanks.

Avatar

Employee Advisor

Let me know the workflow model.

Are you dealing with custom workflow here? If yes, please do share.

Avatar

Level 2

Hi Debal,

yes it's a custom workflow just with one Dynamic Participant Step and below one Process Step.

Thanks.

Avatar

Employee Advisor

Please do share workflow logic (code) if it's possible I will validate at my end.

Avatar

Level 2

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.

Avatar

Correct answer by
Employee Advisor

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.

Avatar

Level 2

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.