• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Basically this code can run to send email & sms notification to customer. I need to do some changes.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm stuck to make some changes on this coding, to ensure no emails sent via bpaNotificationService if email in object (in the CustomerOrder class) is null, so it doesn't throw error logs? And also to include an info logger to say that "not sending email because no email is given".

This is only if it's email notification only, which is checking whether email notification key is not null.

Generally in the list, we have . Thus, my idea is to:

Use the to get the specific object from .
Once I got the specific object, check whether got email to send the notifications.

 
Ranch Hand
Posts: 595
6
jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can always use class diagram that reflects the sample view of your existing project. Its easier to understand the problem.

you can start with breaking down your requirement and code for each step.

taking your code snippet for reference with this crude mock up:


Also try to segregate the workflow into multiple methods, with each one doing a single action. so each step here would ideally go into a function.

do get back if you have more queries on this.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic