• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

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

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
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.
The only thing that kept the leeches off of me was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic