diff --git a/dhis-2/dhis-services/dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/engine/RuleActionSendMessageImplementer.java b/dhis-2/dhis-services/dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/engine/RuleActionSendMessageImplementer.java index f4aa4f588392..5453c0671a88 100644 --- a/dhis-2/dhis-services/dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/engine/RuleActionSendMessageImplementer.java +++ b/dhis-2/dhis-services/dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/engine/RuleActionSendMessageImplementer.java @@ -45,6 +45,7 @@ import org.hisp.dhis.rules.models.RuleEffect; import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; /** * @@ -86,6 +87,7 @@ public boolean accept(RuleAction ruleAction) { } @Override + @Transactional public void implement(RuleEffect ruleEffect, ProgramInstance programInstance) { NotificationValidationResult result = validate(ruleEffect, programInstance); @@ -111,6 +113,7 @@ public void implement(RuleEffect ruleEffect, ProgramInstance programInstance) { } @Override + @Transactional public void implement(RuleEffect ruleEffect, ProgramStageInstance programStageInstance) { checkNotNull(programStageInstance, "ProgramStageInstance cannot be null");