Reltio Identity 360

 View Only
  • 1.  Facing issue in sending Email notificaion on Change Request Reject

    Reltio Partner
    Posted 01-09-2024 09:01

    Hi Team,

    We are trying to send a email notification to a list of users in case change request is rejected. 

    On customization part we are adding some line of code in out of the box java class

    Below is the sample test code where we have added few lines of code(In red) to send email. Build of the code  is successful, when tested locally, we are getting NullPointerException because  NotificationSenderService notificationSenderService variable is initialized to null and hence throws exception when method  [this.notificationSenderService.sendNotification(notification) ] is called. 

    Can anyone please let me know if the approach is corect? If yes, what is the issue in code.

    The BPMN file used for this is the out of the box DCR BPMN.

    package com.reltio.workflow.custom.notifications;

    import com.fasterxml.jackson.databind.ObjectMapper;
    import com.reltio.workflow.activiti.service.ChangeRequestAction;
    import com.reltio.workflow.api.Utility;
    import com.reltio.workflow.api.WorkflowService;
    import com.reltio.workflow.api.actions.Execution;
    import com.reltio.workflow.api.actions.WorkflowAction;
    import com.reltio.workflow.custom.Notification;
    import com.reltio.workflow.custom.NotificationSenderService;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;

     * Reject data change request
    public class ChangeRequestReject extends ChangeRequestAction implements WorkflowAction {
        public static final Logger logger = LoggerFactory.getLogger(ChangeRequestReject.class);
        // Injectected service
        private ReltioApi reltioApi;
        NotificationSenderService notificationSenderService;

        public void execute(Execution execution) throws Exception {
  "In ChangeRequestReject class");
            String accessToken = execution.getAccessToken();
            String environmentUrl = execution.getEnvironmentUrl();
            String tenantId = execution.getTenantId();
            String changeRequestUri = getChangeRequestUri(execution);
            String processInstanceId = execution.getProcessInstanceId();
            Notification notification = new Notification(execution.getTenantId());

            notification.setSubject("Your task is Rejected");
                    "<table style=\"width:500px\">" +
                            "<tbody>" +getClass()+
                            "<tr>" +
                            "<td>" +
                            "<img src=\"cid:overdue\" style=\"height:64px; width:64px\" />" +
                            "</td>" +
                            "<td>" +
                            "<p>REMINDER</p>" +
                            "<p>The task created is Rejected. Please take action.</p>" +
                            "</td>" +
                            "</tr>" +
                            "</tbody>" +

            //Get Email address of requester


            //Reltio Call
            String url = Utility.generateTenantUrl(environmentUrl, tenantId) + "/" + changeRequestUri + "/_reject";
            String responseJson = reltioApi.invokeApi(accessToken, url, ReltioConstants.POST, "");
            ObjectMapper objectMapper = new ObjectMapper();
            Response reltioResponse = objectMapper.readValue(responseJson, ReltioResponse.class);
            if (reltioResponse.getStatus() == null || !reltioResponse.getStatus().equals(ReltioConstants.SUCCESS)) {
                throw new ReltioException(responseJson);



    Sanjay Kumar

  • 2.  RE: Facing issue in sending Email notificaion on Change Request Reject

    Reltio Employee
    Posted 01-09-2024 09:31


    I moved this to another community to receive answers. This space is only for I360 discussions.

    Link :

    Abhradeep Sengupta