The joy of resource scheduling and consumption
Do your business process models:
- Have variability in available resources?
- Have resources with variable costs for their usage?
- Keep track programmatically of resource availability schedules or resource consumption costs?
If you answered yes to these questions, then you should be using timetables and business calendars in the IBM Business Process Management (BPM) suite of products. IBM BPM products contain new features that make such schedule-related tasks easily manageable -- and possibly even pleasurable. But that’s for you to decide.
Timetables and business calendars are new capabilities in the SOA supporting services layer of the BPM V6.2 suite (Figure 1).
Figure 1. WebSphere Process server component layering
These new capabilities (first introduced in BPM V6.1.2) enable you to better realize separation of concerns -- in the form of your ability to specify resource availability or cost of resource consumption -- by utilizing timetable and business calendar constructs represented as XML artifacts.
Timetable and business calendar constructs are developed using IBM tooling. Upon receiving a request from a deployed user business application component, the IBM SOA supporting services layer derives the computational semantics of deployed timetable and business calendar artifacts in the form of the appropriate logic. Thus, you can “write” your logic by defining timetables and business calendars, and associate these constructs with various resources (such as human staff, physical resources, timer-driven tasks, and so on) in a “declarative” manner. The infrastructure runtime translates these declarations into runtime logic for the deployed user application components. This approach externalizes the non-continuous/non-sequential time period computation logic from the user applications by defining the timetables and business calendar artifacts, which are processed by the IBM SOA supporting services layer. By running the logic in this manner, you can:
- Achieve improved reuse by packaging common timetable and business calendar artifacts into libraries and making them visible to multiple business application components (SCA modules).
- Scale the logic for performance because the infrastructure provides for clustering.
- Improve quality of logic because the same logic runs across multiple business application components.
By separating the non-continuous and non-sequential time period computation logic from user business application components, you make your applications more robust and loosely coupled. All these advantages lead to improved flexibility and a return on investment (ROI).
Using WebSphere Business Modeler
IBM WebSphere® Business Modeler is typically used by business analysts who deal with business process models. They can use timetables in WebSphere Business Modeler to convey a resource availability schedule or a resource cost schedule in a business process model. A timetable defines available time in a business year, taking office hours and holidays into account. Business processes and human tasks use the available time in a timetable to manage time out, task expiration, task deletion, and task overdue processing. Timetables are represented by XML artifacts. Timetables represent dates as offsets of Greenwich Mean Time (GMT). Specifically, timetables in WebSphere Business Modeler help you:
- Model the availability of resources by date or time. For example, you might have a customer service professional who is available on specific days and only at certain hours.
- Model the cost variability of consuming resources by date or time. For example, you might have a customer service professional charge a different rate depending on the day and time.
- Link a timer task to a calendar. For example, you might need to be notified of a specific month-end processing task on the last day of the month.
To model resource availability or cost variability, you create a timetable, define the attributes of the timetable, and then attach the timetable to the resource using WebSphere Business Modeler. To link a timer task to a timetable, you specify the recurring period (years, days, hours, minutes, seconds) on a specific day and time in a timetable. WebSphere Business Modeler has a timetable editor that makes creating and modifying timetables easy. Timetable attributes include:
- Number of times to repeat [repeat forever]
- Repetition period [1 to 500]
- Repetition period units [years, days, hours, minutes, seconds]
- Beginning on [date, time, or date and time]
- Recurring time intervals
- Time interval [named entry such as weekday, weekend, and so on]
- Duration [days, hours, minutes, seconds, milliseconds]
- Start time [date, time, or date and time].
To model the non-availability of a resource by date or time during a timetable period, you create exception periods that you associate with a resource. The same concept applies when you model costs associated with using a resource. Exception periods are exempt from incurring costs for resource usage. To define exemption period attributes, you follow the same steps as you did to create timetable attributes. You can also nest exemptions. For example, you can define an engineer resource calendar so that:
- The engineer is available for work week between 9:00 am and 5:00 pm every day (Monday through Sunday)
- An exception to this recurring availability interval: Saturday 12.00 am through Monday 12:00 am (a period of 48 hrs)
- An exception to the this exception period: Every second weekend from Saturday 12.00 am through Monday 12:00 am (a period of 48 hrs, repeating every two weeks)
- An exception to this recurring availability interval: Saturday 12.00 am through Monday 12:00 am (a period of 48 hrs)
Given this calendar, the engineer is available every day, Monday through Friday from 9:00 am to 5:00 pm, plus every other weekend, Saturday and Sunday from 9:00 am to 5:00 pm.
The Attributes view in WebSphere Business Modeler shows the timetable details as a timeline depiction, with zoom in and zoom out capabilities. Timetable artifacts from WebSphere Business Modeler can be exported in Project Interchange format so that artifacts can be imported into IBM WebSphere Integration Developer. (Editing or modifying of timetable artifacts created in WebSphere Business Modeler and imported into WebSphere Integration Developer is not supported.) Timetables are deployed to WebSphere Process Server as Service Component Architecture (SCA) modules, and dates in timetables are represented in GMT so that actual times are unchanged if the timetable logic shifts time zones.
Figures 2 through 6 show a timetable developed in WebSphere Business Modeler.
Figure 2. Weekday schedule timetable
Figure 3. Weekday lunch schedule timetable
Figure 4. Weekend schedule timetable
Figure 5. Holiday schedule timetable
Figure 6. Timetable usage business process model example
Using WebSphere Integration Developer
Business calendars enable integration developers to model non-continuous time periods, taking into accounting weekends, holidays, and lunch duration exceptions, while performing time-based and schedule-based activities in business process modeling. Business processes and human tasks use the available time in a timetable to manage timeout, task expiration, task deletion, and task overdue processing. Thus, business calendars make it easy to define and reuse time-based and schedule-based constraints in WebSphere Integration Developer.
Business calendars enable you to build richer, semantically meaningful, single interval artifacts from multiple non-contiguous and non-sequential elapsed time intervals, defined by start/stop date and time calculations. Typically, date and time calculations in business process models require that non-working holidays and breaks (planned and scheduled) not be included in calculations. For example, if January 23 is a Friday, then one elapsed business day from this date would be Monday, January 26. In the same vein, if the current time is 2:00 pm on Friday January 23, then the elapsed time period of 6.5 hours from now would be 12:30 pm Monday, January 26 (assuming a work schedule of Monday through Friday 9:00 am to 5:00 pm).
The business calendar model is based on xCal, an XML complaint representation of the iCalendar specification RFC 2445 of the Internet Engineering Task Force (IETF). This specification enables interoperability of various calendar and scheduling systems for the Internet. xCal provides a simple one-to-one mapping of iCalendar components and properties to XML elements. You can use the business calendar editor in WebSphere Integration Developer to create or edit business calendars. Each business calendar can include or exclude several other business calendars. The final computed schedule must satisfy at least one main (and any included) business calendar constraint, and must not satisfy business calendar constraints defined in excluded calendars. Exclusion constraints (from excluded calendars) take priority over inclusion constraints (from included calendars).
Figure 7 shows a business calendar developed in WebSphere Integration Developer (one included and three excluded calendars in a hierarchy).
Figure 7. Business calendar example
Figure 8 shows a BPEL process making use of a business calendar developed in WebSphere Integration Developer with human and wait tasks.
Figure 8. Business calendar usage BPEL example
Figure 9 shows a configuration of a business calendar for a human task in a BPEL workflow application.
Figure 9. Human task usage in business calendar
Figure 10 shows a configuration of a business calendar for a wait task in a BPEL workflow application.
Figure 10. Wait task in business calendar
Using WebSphere Process Server
Timetables developed using WebSphere Business Modeler and business calendars developed using WebSphere Integration Developer are represented by XML artifacts. Both timetables and business calendars can be deployed to WebSphere Process Server as SCA modules. Modules are encapsulated into an enterprise archive file (EAR) prior to deploying onto WebSphere Process Server. Timetables and business calendars are loaded into WebSphere Process Server as SOA supporting services for the business logic that needs the timetables and business calendar information. WebSphere Process Server computes the required due date calculations based on the computer system’s current time and time zone, and delta times are derived for the visible scope timetables and calendars.
For example, on Thursday a teacher is instructed to schedule a parent-teacher meeting in two business days. If Monday and Tuesday are school holidays, the meeting task assigned to the teacher would not be overdue until Wednesday, taking into account two weekend days (Saturday and Sunday) and the two school holidays. The visible scope of a timetable or business calendar is a module. If multiple modules need the same business calendar, the business calendar should be placed in a module library, and the appropriate modules should have a reference to this library.
Business calendar schema is flexible enough to cope with both flat and hierarchically nested timetables. In a hierarchy, a top level timetable references another timetable by having it embedded (Figure 7). A flat timetable results in all dates using same GMT offset. In a hierarchical timetable, individual timetable dates could use different GMT offsets.
Timetables have security roles associated with them: owner, writer, and reader. Owner roles can modify timetables, or grant writer and reader roles to other users, based on role and associated security permissions. The business calendar manager in Business Space powered by WebSphere can be used to manage timetables and business calendars. The security manager widget of Business Space could be used to grant role privileges to users. You can use the timetable REST API to access business processes and task data.
Figures 11 and 12 show the business calendar manager in Business Space powered by WebSphere.
Figure 11. Business calendar manager summary
Figure 12. Business calendar manager detail
Figures 13 through 18 show the Business Process Choreographer (BPC) Explorer testing a BPEL workflow application that makes use of business calendar.
Figure 13. BPC Explorer business calendar testing
Figure 14. BPC Explorer business calendar testing -- Human task path
Figure 15. BPC Explorer business calendar testing -- Human task path
Figure 16. BPC Explorer business calendar testing -- Human task path
Figure 17. BPC Explorer business calendar testing -- Wait task path
Figure 18. BPC Explorer business calendar testing -- Wait task path
Timetables and business calendars enable you to model non-continuous and non-contiguous time periods in business process models by accounting for weekend, holiday, and lunch duration exceptions as part of time-based and schedule-based activity modeling. Timetables and business calendars are new in the SOA supporting services layer capabilities of the IBM BPM V6.2 suite. Hopefully, the simple set of examples in this article provided a gentle introduction to these new capabilities to help you begin simplifying your resource planning.
|Business calendar sample, Part 1||MOD-01102009-v1-BusinessCalendarModule.zip||41 KB|
|Business calendar sample, Part 2||MODWID-01102009-v1-BusinessCalendarModule.zip||220 KB|
|Business calendar sample, Part 3||WID_01102009-v2-BusinessCalendarModule.zip||71 KB|
- IBM WebSphere Business Process Management Version 6.2 information center
- IBM WebSphere Business Process Management Version 6.1.2 information center
- Comment lines: Bobby Woolf: A quick intro to WebSphere Business Process Management
- Internet Calendaring and Scheduling Core Object Specification (iCalendar) – RFC 2445
- IBM developerWorks WebSphere
Dig deeper into Business process management on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.