[
https://jira.jboss.org/browse/JBPM-2814?page=com.atlassian.jira.plugin.sy...
]
Per Christian Henden commented on JBPM-2814:
--------------------------------------------
Huisheng, as you say, I would like my customized BusinessCalendar to read the xml file.
The issue is that my custom BusinessCalendar implementation that extends
BusinessCalendarImpl doesn't get the configuration from jbpm.business-calendar.cfg.xml
automatically. As a result, my BusinessCalendar implementation crashes with a
NullPointerException when it tries to read the 'days' field in the super
class's methods.
To me, the best solution appears to be that custom BC. implementations (that override
BusinessCalendarImpl) also get their configuration from the mentioned xml file. Another,
simpler solution, is to initialize 'days' (and similar fields) to a default value
meaning 'nothing' (like an empty array for days) in BusinessCalendarImpl. That
would at least remove the mentioned exception, but will also confuse people I think. They
will, like me, expect to get the configuration from the xml file, I think.
Trouble using a custom BusinessCalendar because of 'new
BusinessCalendarImpl' in BusinessDayCalendarBinding
-----------------------------------------------------------------------------------------------------------
Key: JBPM-2814
URL:
https://jira.jboss.org/browse/JBPM-2814
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Per Christian Henden
Assignee: Huisheng Xu
I've followed the howto on the JBPM webpages to replace BusinessCalendarImpl with my
own implementation. My custom BusinessCalendar.add is called, that works, but in
JBPM's BusinessDayCalendarBinding. java 'new BusinessCalendarImpl' is called
and a BusinessCalendarImpl is used throughout the class.
This is problematic when setting the 'days' field based on parsing
jbpm.business-calendar.cfg.xml. The field is written to the 'new
BusinessCalendarImpl' and not to my custom BusinessCalendar. The result is that in my
custom BusinessCalendar implementation I have no access to that information
('days' is null).
Other places in the JBPM code a processEngine.get(BusinessCalendar.class) is done to get
an instance of the (custom) BusinessCalendar.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira