Skip to main content
Level 9
Oct 16, 2015 2:27 AM UTC
Solved

Trigger workflow on rollout of a site -MSM

Hello All,

Is there a way to trigger a workflow on rollout of site? Please let me know. I have custom rollout configurations in place but i have to now trigger a workflow on rollout.

Appreciate help.

Thanks,

NZ

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
Oct 16, 2015 2:27 AM UTC

great, glad to hear it!

For others, I was going to suggest that you check that you are using the correct path to the model...i.e., the model node as in /etc/workflow/models/request_for_activation/jcr:content/model

scott

11 replies

Level 9
Oct 16, 2015 2:27 AM UTC

Figured it out thanks.

Translate
Scott_Brodersen
Level 8
Oct 16, 2015 2:27 AM UTC

I updated the docs so that now it has an example value for the model path :)

That the workflow starts for each page is the expected behaviour because the liveaction configuration is inherited for each child page. Perhaps your workflow can include a test on the payload path in an OR step, to prevent processing of child pages?

Translate
Level 9
Oct 16, 2015 2:27 AM UTC

Hey scott, great input , wish it was clear in the documentation.

Really appreciate all the help.

Now my workflow is picking up payload, multiple times when i trigger the workflow. i.e> if i create a live copy, selecting languages en_CA and fr_CA , with name Test2, my workflow runns through all the pages available under /content/Test2. I would want it to pick just /content/Test2/en_CA,  /content/Test2/fr_CA  as payload, and trigger it one shot. I am trying to send payload path to Query Builder rest service to retrieve nodes of desired sling:resourceType modified in past two days and retrieve desired property in those nodes

What gets currently picked up in my workflow is 

/content/Test2

/content/Test2/en_CA - Query Builder ideally should have returned results but it skips and moves to next node

/content/Test2/en_CA/samplePage

/content /Test2/en_CA/samplePage/samplePage2

/content/Test12/en_CA/support

/content/Test12/en_CA/support/support

/content/Test12/en_CA/support/support/devices

/content/Test2/fr_CA

/content/Test2/fr_CA/samplePage

/content /Test2/fr_CA/samplePage/samplePage2

/content/Test12/fr_CA/support

/content/Test12/fr_CA/support/support

/content/Test12/fr_CA/support/support/devices

 

I would want to pick just /content/Test12/en_CA and  /content/Test12/fr_CA, or the languages selected while creating livecopy please let me know.

Translate
Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
Oct 16, 2015 2:27 AM UTC

great, glad to hear it!

For others, I was going to suggest that you check that you are using the correct path to the model...i.e., the model node as in /etc/workflow/models/request_for_activation/jcr:content/model

scott

Translate
Level 9
Oct 16, 2015 2:27 AM UTC

figured it out..thanks will update on rollout..

Translate
Level 9
Oct 16, 2015 2:27 AM UTC

Hey Scott, 

None that i could see regarding workflow, will check it , strange, it should have worked.. any idea of how we could extract the arguments in the process step in the java code for workflow?

Translate
Scott_Brodersen
Level 8
Oct 16, 2015 2:27 AM UTC

NitroHazeDev wrote...

Yes i did add the enabled property and assigned it to true, although the doc doesn't say so.

It still doesn't work.Am using 5.6

 

I don't know why I mentioned the enabled property....I meant to discuss the "target" property. I assume you set this property to the workflow to execute? Are there any useful log messages when you do the roll out?

Translate
Level 9
Oct 16, 2015 2:27 AM UTC

Yes i did add the enabled property and assigned it to true, although the doc doesn't say so.

It still doesn't work.Am using 5.6

Translate
Scott_Brodersen
Level 8
Oct 16, 2015 2:27 AM UTC

Johan has it right. Specifically, if you go to that page see the Creating Rollout Configurations section. When you create the rollout, add the "workflow" sync action to start a workflow.

scott

Translate
Scott_Brodersen
Level 8
Oct 16, 2015 2:27 AM UTC

did you add the enabled property (= true) to the workflow node?

Translate