I have an EntityBrowse screen with attribute Date.
@Temporal(TemporalType.DATE)
@Column(name = "DATE_")
protected Date date;
If the date is (let say) 7 days overdue I need the application send an email and/or mark (color line, underline) those overdue date line(s).
What is the best way to do that?
Can you give me a suitable method in order to access “date” attribute from Controller Entity?
I focused to send emails. Everything works fine ( I can send emails like in your example from controller, Sending Emails - CUBA Platform. Developer’s Manual, JMX Emailer) but when I pot the logic in Managed Bean, under core, unfortunately after schedule, the email(s) stay in queue not send (email history). What could it be?
Hi @neutrino
Haven’t you thought about putting a breakpoint to com.haulmont.cuba.core.app.Emailer#processQueuedEmails
and debugging the code?
The logic there is very straightforward, it should not be a problem to understand the reason why the scheduler doesn’t work for you.
It’s the open source for a reason.
To be honest I don’t know where I can set a breakpoint. I just have a chronological scheduler that extract some data (jpql query) and put it in the email queue.
I ve set a breakpoint in processQueuedEmails method everything seems to work well.
Moreover a sendByEmail method works fine from controller. The emails are sent.
The problem is some configuration in Managed Bean I think.
Unfortunately do not get in loadEmailsToSend, after build the list with data, catch a TargetException in AopUtils.java and end in pending (blocked) stage RunnerBean.java.