Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Custom system notification

Avatar

Level 4

Hi,

We need to send custom system notification(like below) for workflow steps. Can somebody guide me please, how to generate these notification programmatically.

 

 

Thanks & regards

Sumit

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Level 4

Sumit Chakraborty wrote...

Hi,

We need to send custom system notification(like below) for workflow steps. Can somebody guide me please, how to generate these notification programmatically.

 

 

 

Thanks & regards

Sumit

 

 

Attached image

Avatar

Correct answer by
Level 10

Avatar

Level 4

Was trying below:

private InboxManager inboxManager;

--------------------------

--------------------------

public void sendMessage(Authorizable user, String reason) throws IOException {

        

        final Message msg = this.inboxManager.createMessage(user);

        msg.setReason(reason);
        

        msg.save();

    }

Maven config using :

<dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-notification</artifactId>
            <version>5.6.8</version>
            
        </dependency>

 

 

Getting the error below:

org.osgi.framework.BundleException: Unresolved constraint in bundle group-id.myproject-bundle [392]: Unable to resolve 392.0: missing requirement [392.0] osgi.wiring.package; (osgi.wiring.package=com.day.cq.wcm.notification.inbox)
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3980)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2043)

Anybody has done similar thing ? Please help.