JBoss Community

Re: Business Calendar - Saturday Working Day

created by Alejandro Guizar in jBPM - View the full discussion

1) Is the method of including Saturday as a working day specified above incorrect?

The configuration is correct, the placement might be wrong.

2) In what manner can the above be accomplished?

jbpm.businesscalendar.cfg.xml is only read if your jbpm.cfg.xml file imports it explicitly. If your jbpm.cfg.xml resource does import jbpm.businesscalendar.cfg.xml, it is possible that the default resource in jbpm-pvm.jar precedes the custom resource in the classpath and thus hides your custom configuration. To avoid this problem, there are two choices.

  1. Rename your custom resource to a different name such as my.calendar.cfg.xml. Import my.calendar.cfg.xml from your jbpm.cfg.xml.
  2. Place your business calendar configuration directly in jbpm.cfg.xml and remove the jbpm.businesscalendar.cfg.xml import, if any. This is the approach taken in the CustomBusinessCalendarCfgTest, which reads the following configuration.

 

<jbpm-configuration>
  <import resource="jbpm.default.cfg.xml" />
  <import resource="jbpm.tx.hibernate.cfg.xml" />
  <import resource="jbpm.jpdl.cfg.xml" />
  <import resource="jbpm.identity.cfg.xml" />

  <process-engine-context>
    <business-calendar>
      <monday    hours="9:00-18:00"/>
      <tuesday   hours="9:00-18:00"/>
      <wednesday hours="9:00-18:00"/>
      <thursday  hours="9:00-18:00"/>
      <friday    hours="9:00-18:00"/>
      <saturday  hours="9:00-18:00"/>
    </business-calendar>
  </process-engine-context>
 </jbpm-configuration>

Reply to this message by going to Community

Start a new discussion in jBPM at Community