Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

OOTB Email service not working with R6 osgi annotations

vasudevaraog731
Level 3
Level 3

Hi,

We have used OOTB Email service using R6 osgi annotations.

Currently facing one issue as message gateway service coming null while sending notification using gateway method.

How ever the message Gateway Service reference object is there but not working with Gateway method ?

Couple of other projects which implemented using Felix SCR annotations is working with email service.Do we have any reference implementations using R6 osgi?

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

See this new HELPX Article that shows how to work with with MessageServiceGateway API in 6.4.

There is a video too that shows it all working. Follow this artilce -- 

https://helpx.adobe.com/experience-manager/using/message_service_gateway_api_64.html

View solution in original post

12 Replies
Arun_Patidar
Community Advisor
Community Advisor

Hi,

Check your imports, you should be using osgi annotations to use services instead of Felix.

e.g.

import org.osgi.service.component.annotations.Component;

import org.osgi.service.component.annotations.Reference;

vasudevaraog731
Level 3
Level 3

Hi Arun,

Used the Osgi annotations only R6 find the below screenshot

1577377_pastedImage_0.png

Veena_Vikram
Community Advisor
Community Advisor

Could you provide a sample of your code for testing ?

vasudevaraog731
Level 3
Level 3

Hi,

I have used the same steps as mentioned in git hub and tried below way for the delete content but still getting same gateway error and workflow aborted

Adobe Experience Manager Help | Creating custom AEM workflow steps that send email messages

I am using my Gmail as SMTP server.Do we have any issue if i use gmail ? How ever i am getting notification for Workflow abort other OOTB notifications?

Arun_Patidar
Community Advisor
Community Advisor

Hi,

I am also using gmail for sending mails in above code.

Could be issue with email configuration, check below.

Configuring Email Notification

Screen Shot 2018-09-23 at 4.06.04 PM.png

vasudevaraog731
Level 3
Level 3

SMTP configurations are correct and also i am able to get the OOTB notification for workflow abort/complete and also able to see the connection in SMTP debug mode but not picking the custom content as mentioned in bundle and also workflow aborted when the service is null? Do we have to do any other  osgi config? or what are the required pom dependencies ?

1577845_pastedImage_0.png

Arun_Patidar
Community Advisor
Community Advisor

Hi,

Message gateway services are part of uber jar, so explicit dependencies are required.

I am ot sure what could be the issue but OOTB message service worked with osgi annotations.

smacdonald2008
Level 10
Level 10

Arun - we will update this article now for AEM 6.4 and show proper use of this API using DS Annotations.

smacdonald2008
Correct answer by
Level 10
Level 10

See this new HELPX Article that shows how to work with with MessageServiceGateway API in 6.4.

There is a video too that shows it all working. Follow this artilce -- 

https://helpx.adobe.com/experience-manager/using/message_service_gateway_api_64.html

View solution in original post

vasudevaraog731
Level 3
Level 3

This Worked for me in AEM 6.3 also..Thanks !