Trigger workflow on rollout of a site -MSM | Community
Skip to main content
Level 9
October 16, 2015
Solved

Trigger workflow on rollout of a site -MSM

  • October 16, 2015
  • 11 replies
  • 5646 views

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.
Best answer by Scott_Brodersen

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

Ojjis
Level 7
October 16, 2015

Hiya, take a look at these links. It's possible to create and associate workflows for the rollout configurations (<server>:<port>/miscadmin#/etc/msm/rolloutconfigs). There is a lot of info about that on this site. 
http://dev.day.com/docs/en/cq/current/administering/multi_site_manager.html
 

/Johan

 

Scott_Brodersen
Level 8
October 16, 2015

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

Scott_Brodersen
Level 8
October 16, 2015

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

Level 9
October 16, 2015

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

Scott_Brodersen
Level 8
October 16, 2015

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?

Level 9
October 16, 2015

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?

Level 9
October 16, 2015

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

Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
October 16, 2015

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

Level 9
October 16, 2015

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.

Scott_Brodersen
Level 8
October 16, 2015

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?