Expand my Community achievements bar.

SOLVED

Adding workflow on comment post on blog

Avatar

Level 3

For the collab component.


"collab/commons/components/comments"

I need to  add a workflow in submit mechanism ,so that when user submits  the comment  the workflow starts and this can trigger  a mail 

Please let me know if you have suggestions

1 Accepted Solution

Avatar

Correct answer by
Level 8

Once your workflow is built, you can add a Launcher configuration that listens for a node creation under certain paths and/or of certain types.  You can assign your custom workflow to this launcher and it'll be kicked off when the conditions are met.

View solution in original post

3 Replies

Avatar

Level 9

You appear to be using the (deprecated) collab comment component from AEM 5.6.1 social communities v1.3, which used nt:unstructured for the node type. 

- - -

NOTE : Social Communities, now known simply as Communities, has been undergoing a transformation.  You can upgrade to the new Social Component Framework (SCF) on AEM 5.6.1 by installing v1.4 and migrating your custom components. 

With SCF, the libs component would be "social/commons/components/comments".  While this still does not provide notifications for comments, it does set you on an easier upgrade path if /when you upgrade from AEM 5.6.1 to a later release.

- - -

Comments are created under /content/usergenerated, so the workflow would listen for that. 

A major factor in your workflow is your topology, as the email should only be sent one time. 

Typically, for v1.3, when the comment is entered on a publish instance, it is reverse replicated to an author instance.  If the topology is a TarMK publish farm, then the author instance will forward replicate the comment to the other publish instances (AEM Communities 6.1 no longer uses replication for UGC).

There is obviously some work needed to ensure only one email is sent.

One possibility is to send the emails from author. 

Another would be to use a property that identifies the originating cq instance (for example) so that the email is only sent on that node.

Hope this is helpful.

- JK

Avatar

Correct answer by
Level 8

Once your workflow is built, you can add a Launcher configuration that listens for a node creation under certain paths and/or of certain types.  You can assign your custom workflow to this launcher and it'll be kicked off when the conditions are met.

Avatar

Level 3

Thanks all for the inputs, real i have now good idea what to do.I work upon and if I have issues will come  back again