How to activate a particular node through java code / workflow in Day CQ

1.4k Views Asked by At

I want to activate only the modified node in my Day CQ project. Node structure is:

Parent Node

  • Child Node 1
  • Child Node 2
  • Child Node 3

Requirement is:

  1. If I am creating any node under parent node workflow should run.
  2. Workflow should activate only newly created child node and parent node and not all child nodes.

Is it possible ??? Please give solution also in comment......

1

There are 1 best solutions below

1
On

This can be easily relaised in using the workflow console. Open the workflow console create a workflow model using in the models tab. Then open the model and add the "Activate Page/Asset Step [com.day.cq.wcm.workflow.process.ActivatePageProcess]" to the model. Save the model and switch to the launcher tab. Create a new launcher for the path of the your parent node and select event type "Created".