I have a requirement to create page version on save.
So I have created a launcher on cq:Page modifcation event. with below properties
Event : Modified
Node : cq:Page
Path : /content
excludedList : event-user-data:changedByWorkflowProcess
Workflow is using OOTB create version process step.
Do I need to consider any other approach to solve this problem or I am missing something ?
With the above solution, it creates page version on change.
Problem: when any user try to move the page , move operation fails.
Solved! Go to Solution.
Moving operation means deleting the node and then adding the node to new location. OOB workflow launchers only supports created, modified and removed. To implement your use case to trigger the WF launcher in case of moving page would require to register a Observation event listener for Event.NODE_MOVED
observationManager.addEventListener(this, Event.NODE_MOVED, ASSET_UPDATE_PATH, isDeep, uuid, nodeTypeName, noLocal);
Here are some references:-
Hope this helps.
hi @arunpatidar ,
So you are saying , instead of workflow I should go for Event Listener. Also, Property change will be triggered for each and every property change. I want to create only one Version with the change. Any suggestions for this
Also, is there any way I can implement using workflow launcher only ?
You can create workflow launcher as you suggested and create version using that workflow.