I have a workflow process that is coming up as unsatisfied due to a reference Unsatisfied
Service Name: com.day.cq.mailer.MailService. How do i get this reference to be in a satisfied state?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @RobbieRami,
Looks like your Workflow Process component is in an Unsatisfied state is because it's trying to inject a dependency (MailService) that doesn't exist or isn't available at runtime. Here’s how to fix it:
Your class probably looks like this:
@Component(service = WorkflowProcess.class,
property = { "process.label=Send Email Workflow Step" })
public class EmailWorkflowProcess implements WorkflowProcess {
@Reference
private MailService mailService;
// ...
}
And the OSGi console shows:
Unsatisfied Reference: com.day.cq.mailer.MailService
This means the MailService is not registered or available in your AEM instance.
The MailService (com.day.cq.mailer.MailService) is only available if:
You're using AEM 6.5 with Communities or other related packages
OR, the Day CQ Mailer bundle is installed and active.
Go to:http://localhost:4502/system/console/bundles
Search for com.day.cq.mailer or CQ Mailer Service.
If the bundle is not there, the service will never resolve.
If you only want to send emails and don’t specifically need MailService, you can:
Use com.adobe.acs.commons.email.EmailService
OR inject MessageGatewayService (Adobe recommends this)
Example using MessageGatewayService:
@Reference
private MessageGatewayService messageGatewayService;
If MailService is optional (e.g., only needed in some conditions), mark the reference like this:
@Reference(cardinality = ReferenceCardinality.OPTIONAL)
private MailService mailService;
Or for OSGi R7 (AEM Cloud-compatible):
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
private volatile MailService mailService;
That way your component can still activate.
Hi @RobbieRami,
Looks like your Workflow Process component is in an Unsatisfied state is because it's trying to inject a dependency (MailService) that doesn't exist or isn't available at runtime. Here’s how to fix it:
Your class probably looks like this:
@Component(service = WorkflowProcess.class,
property = { "process.label=Send Email Workflow Step" })
public class EmailWorkflowProcess implements WorkflowProcess {
@Reference
private MailService mailService;
// ...
}
And the OSGi console shows:
Unsatisfied Reference: com.day.cq.mailer.MailService
This means the MailService is not registered or available in your AEM instance.
The MailService (com.day.cq.mailer.MailService) is only available if:
You're using AEM 6.5 with Communities or other related packages
OR, the Day CQ Mailer bundle is installed and active.
Go to:http://localhost:4502/system/console/bundles
Search for com.day.cq.mailer or CQ Mailer Service.
If the bundle is not there, the service will never resolve.
If you only want to send emails and don’t specifically need MailService, you can:
Use com.adobe.acs.commons.email.EmailService
OR inject MessageGatewayService (Adobe recommends this)
Example using MessageGatewayService:
@Reference
private MessageGatewayService messageGatewayService;
If MailService is optional (e.g., only needed in some conditions), mark the reference like this:
@Reference(cardinality = ReferenceCardinality.OPTIONAL)
private MailService mailService;
Or for OSGi R7 (AEM Cloud-compatible):
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
private volatile MailService mailService;
That way your component can still activate.