Re: [jboss-user] [jBPM] - Custom BusinessCalendar
by Marco Baroetto
Marco Baroetto [http://community.jboss.org/people/H4rLoCk] replied to the discussion
"Custom BusinessCalendar"
To view the discussion, visit: http://community.jboss.org/message/559563#559563
--------------------------------------------------------------
I think the jBPM Develpers Guide is not correct in 2.1.2 Business Calendar:
For example:
public class CustomBusinessCalendar implements BusinessCalendar {
public Date add(Date date, String duration) {
if ("my next birthday".equals(duration)) {
GregorianCalendar gregorianCalendar = new GregorianCalendar();
gregorianCalendar.set(Calendar.MONTH, Calendar.JULY);
gregorianCalendar.set(Calendar.DAY_OF_MONTH, 21);
return gregorianCalendar.getTime();
}
return null;
}
}
To configure the jBPM engine to use this custom business calendar, just add the following line to your jbpm.cfg.xml:
<process-engine-context>
<object class="org.jbpm.test.custombusinesscalendarimpl.CustomBusinessCalendar"
/>
</process-engine-context>
Take a look at the
org.jbpm.test.custombusinesscalendarimpl.CustomBusinessCalendarImplTest for more information.
1) org.jbpm.test.custombusinesscalendarimpl.CustomBusinessCalendarImplTest doesn't exist
2) To add your EL expression in timers (at least for task's duedate) you have to:
- Write my.own.MyNextBirthday extends Date (or Calendar,GregorianCalendar...) and is equals to the date you want.
- Add to your cfg the following:
<object name="myNextBirthday" class="my.own.MyNextBirthday" />
3) Write your jpdl as follows:
<task name="TaskTransaction2_step1" duedate="#{myNextBirthday} +3 days" candidate-groups="user">
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/559563#559563]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 7 months
Re: [jboss-user] [Beginner's Corner] - Error while booting Jboss 5.0.1. Can anybody help?
by Wolfgang Knauf
Wolfgang Knauf [http://community.jboss.org/people/WolfgangKnauf] replied to the discussion
"Error while booting Jboss 5.0.1. Can anybody help?"
To view the discussion, visit: http://community.jboss.org/message/559557#559557
--------------------------------------------------------------
Hi,
you have an ear file "1.ear", which contains a whole lot of EJB jars, one for each bean, I assume?
It seems you have some kind of dependency beetween the beans, but JBoss cannot detect the correct deploy order, because they are split beetween jar files.
Why this? You can place all EJBs in one single EJB jar file, and this will avoid this dependency problem.
If this is not possible, you might take a look at the JBoss specific "@Depends" annotation, but I fear this one will not work cyclic dependencies.
Best regards
Wolfgang
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/559557#559557]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 7 months