How to trigger workflow when there is change in content fragment ?

p1hampi

05-10-2020

Hi All, 

I have created a workflow(simple workflow which can Accept / Reject the content) which will get triggered when author can make any change in content fragment on page. Please provide help how to trigger the workflow. 

Thanks in advance, 

Regards,

Pavan 

content fragments events workflow

Accepted Solutions (1)

Accepted Solutions (1)

Vijayalakshmi_S

MVP

05-10-2020

Hi @p1hampi,

In order to listen to change in data of content fragment such that page(in which fragment used is to be the payload) and hence to be activated, we need to listen to node modified event on the exact content fragment node(within jcr:content of page). 

In addition to fragmentPath property, could see a property named "text" which gets updated on change of data in content fragment. 

Given this, create a workflow launcher with following properties and specify your workflow model. 

  • Frame the path pattern according to your site content hierarchy. 
  • Below launcher definition will listen to change in fragment used in the page - /content/we-retail/language-masters/en/sample-content-page/jcr:content/root/responsivegrid/contentfragment  and hence will be the payload for your workflow and will be activated.Vijayalakshmi_S_0-1602008122811.png

 

 

 

 

Hi @p1hampi,

If workflow needs to be triggered on change of a content fragment, it is straight forward to make use of Workflow Launcher where the payload will be the respective content fragment. 

But per your below statement in the original post, if you are looking for page(where respective content fragment is located) to be the payload/part of workflow, then it might call for different approach (Page holds reference alone to content fragment via fragmentPath property of Content Fragment component)

"when author can make any change in content fragment on page."

Please elaborate on the complete expected behavior.