Skip to content

Commit

Permalink
107258:Added logs and corrected actor userId in wfNotification object
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisaurav-tarento authored and saipradeep_ravipati committed Nov 4, 2023
1 parent 6f5c7ca commit 17dc511
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public Response enrolBPWorkFlow(String rootOrg, String org, WfRequest wfRequest)

@Override
public Response updateBPWorkFlow(String rootOrg, String org, WfRequest wfRequest,String userId,String role) {
logger.info("Workflow request Body received: " + wfRequest);
Response response = new Response();
Map<String, Object> batchDetailsMap = new HashMap<>();
WfNotification wfNotification = getWorkFlowNotificationRequest(wfRequest);
Expand Down Expand Up @@ -1027,7 +1028,7 @@ private WfNotification getWorkFlowNotificationRequest(WfRequest wfRequest) {
wfNotification.setComment(wfRequest.getComment());
wfNotification.setWfId(wfRequest.getWfId());
wfNotification.setServiceName(wfRequest.getServiceName());
wfNotification.setActorUserId(wfNotification.getActorUserId());
wfNotification.setActorUserId(wfRequest.getActorUserId());
wfNotification.setCourseId(wfRequest.getCourseId());
wfNotification.setUpdateFieldValues(wfRequest.getUpdateFieldValues());
wfNotification.setRootOrgId(wfRequest.getRootOrgId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,15 @@ public void sendNotification(Map<String, Object> request) {
StringBuilder builder = new StringBuilder();
builder.append(configuration.getNotifyServiceHost()).append(configuration.getNotifyServicePath());
try {
requestService.fetchResultUsingPost(builder, request, Map.class, null);
Object response = requestService.fetchResultUsingPost(builder, request, Map.class, null);
logger.info("Notification sent successfully, response is: " + response);
} catch (Exception e) {
logger.error("Exception while posting the data in notification service: ", e);
}
}

private void sendNotificationEmail(Map<String, Object> mailNotificationDetails){
logger.info("Mail Notification Details: " + mailNotificationDetails);
Map<String, Object> params = new HashMap<>();
NotificationRequest request = new NotificationRequest();
List<String> emailList = (List<String>) mailNotificationDetails.get("emailList");
Expand Down

0 comments on commit 17dc511

Please sign in to comment.