I have a Cuba 6 project imported in Cuba 7.
Also I used a RemaiderMailCheckBean that worked in Cuba 6 but now is not working anymore.
I made no changes only import project.
In JMX Console I tested emailer and is ok but if I (force) execute a schedule task nothing happens.
Also I cannot see log.info status.
Is there any changes in Cuba 7 related to (Service)Beans?
I have one Bean_Interface and a ReminderMailCheckBean class placed under modules/core/src/com/company/core.
You should attach a debugger from your IDE to a locally running application
and put a breakpoint to your ReminderMailCheckBean bean’s method.
Then you will be able to go along with your code flow, view variables and method results and understand why the code isn’t working as intended.
Is inactive because I want to test it (Execute Button).
Even if I activate it doesn’t work. Mail history is empty.
I know how to debug in Cuba. The problem is if I put a breakpoint or use a logger and (manually) execute the bean, nothing happens. The bean is not triggered.
However my question is if it’s ok to use Bean under core directory or in Cuba 7 is mandatory to have a Service?
However my question is if it’s ok to use Bean under core directory or in Cuba 7 is mandatory to have a Service?
Having interface is not mandatory. A lot of Spring beans in Platform itself do not implement interfaces. However there are some corner cases (e.g. for beans which are exposed to JMX).
Have you tried to change your ReminderMailCheckBean to implement an interface, would it make it work?
is if I put a breakpoint or use a logger and (manually) execute the bean, nothing happens. The bean is not triggered.
Manual Execute button (in scheduled task browser) calls this method:
com.haulmont.cuba.core.app.scheduling.SchedulingServiceBean#runOnce
You can put breakpoint there and see why code execution does not reach your bean’s code.