[jboss-user] [jBPM] - Re: Issue with timer and calendar
srikant vege
do-not-reply at jboss.com
Thu Jun 21 10:11:50 EDT 2012
srikant vege [https://community.jboss.org/people/srikanthvege1] created the discussion
"Re: Issue with timer and calendar"
To view the discussion, visit: https://community.jboss.org/message/743391#743391
--------------------------------------------------------------
Hi,
Thanks for you help. Now I got another issue.
I have 2 rules (mentioned below). 1st rule should be executed on weekdays and the next rule should be executed on Holidays.
*rule "week days rule"*
* ruleflow-group "os-cron-service"*
* calendars "weekDayCalendar"*
* timer (int:0 5s)*
* when*
* Alarm()*
* then*
* System.out.println("Week Days rule executed..");*
*end*
*rule "holiday rule"*
* ruleflow-group "os-cron-service"*
* calendars "holidayCalendar"*
* timer (int:0 5s)*
* when*
* Alarm()*
* then*
* System.out.println("Holidays rule executed..");*
*end*
I have created two calendar objects (one is for weekdays & another for holidays) and set them to ksession. below is the code.
*WeeklyCalendar weekCalendar = new WeeklyCalendar();*
*Calendar weekDaysCalendar= QuartzHelper.quartzCalendarAdapter(weekCalendar);*
*ksession.getCalendars().set("weekDayCalendar", weekDaysCalendar);*
*HolidayCalendar holidayCalendar = new HolidayCalendar();*
*Calendar holidayCal = QuartzHelper.quartzCalendarAdapter(holidayCalendar);*
*ksession.getCalendars().set("holidayCalendar", holidayCal);*
When I execute the rules, both the rules are getting executed and it seems like it is not considering the calendar objects. I even tried with CronCalendar also by giving the cron expression. But no luck.
Please let me know the mistake that I am doing here. I am using drools 5.3 and jbpm 5.2
Thanks
Srikant.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/743391#743391]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120621/59b8c743/attachment.html
More information about the jboss-user
mailing list