Expand my Community achievements bar.

SOLVED

Custom Request For Activation workflow

Avatar

Level 4

What do I need to modify to trigger my custom "Request for activation" or "Request for deactivation workflow"? Automatically the OOTB workflow gets triggered but i need to trigger my custom workflows. Thanks!

1 Accepted Solution

Avatar

Correct answer by
Employee

In order to trigger custom workflow on click of manage publication, below are the steps:

 

  1.  Go to/libs/cq/gui/content/common/managepublicationwizard/body/items/form/granite:data path and right click and then click on overlay node.

 

vanegi_0-1599644719949.png

 

2.  Overlay popup will appear, Check Match Node Type checkbox and click on OK.

 

vanegi_1-1599644719945.png

 

3. The structure will be created under apps, Now go to /apps/cq/gui/content/common/managepublicationwizard and add a property 

sling:resourceSuperType and value of this property as /libs/cq/gui/content/common/managepublicationwizard

 

vanegi_2-1599644719946.png

 

4. Now go to /apps/cq/gui/content/common/managepublicationwizard/body/items/form/granite:data path and add properties as

requestActivationWorkflow : /etc/workflow/models/custom_request_for_activation/jcr:content/model

requestDeactivationWorkflow : /etc/workflow/models/custom_request_for_deactivation/jcr:content/model

 

vanegi_3-1599644719947.png

 

 

Now on manage publication for publish and unpublish your custom workflow will be triggered.

Note :

  1.       Even though your workflows will be in /conf still you need to add it in the same manner shown above.
  2.      It does not work project specific. Changing the workflow will happen globally.

Thanks!!

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

In order to trigger custom workflow on click of manage publication, below are the steps:

 

  1.  Go to/libs/cq/gui/content/common/managepublicationwizard/body/items/form/granite:data path and right click and then click on overlay node.

 

vanegi_0-1599644719949.png

 

2.  Overlay popup will appear, Check Match Node Type checkbox and click on OK.

 

vanegi_1-1599644719945.png

 

3. The structure will be created under apps, Now go to /apps/cq/gui/content/common/managepublicationwizard and add a property 

sling:resourceSuperType and value of this property as /libs/cq/gui/content/common/managepublicationwizard

 

vanegi_2-1599644719946.png

 

4. Now go to /apps/cq/gui/content/common/managepublicationwizard/body/items/form/granite:data path and add properties as

requestActivationWorkflow : /etc/workflow/models/custom_request_for_activation/jcr:content/model

requestDeactivationWorkflow : /etc/workflow/models/custom_request_for_deactivation/jcr:content/model

 

vanegi_3-1599644719947.png

 

 

Now on manage publication for publish and unpublish your custom workflow will be triggered.

Note :

  1.       Even though your workflows will be in /conf still you need to add it in the same manner shown above.
  2.      It does not work project specific. Changing the workflow will happen globally.

Thanks!!