IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Designing process interactions for business users > Enabling task management

Setting the due date and work schedule for a BPD

The due date for a process instance is the expected date and time that all activities related to a process instance should be completed. At run time, this due date is used to calculate whether a process instance is on track for a timely completion. The due date is affected by the work schedules of the users who receive the tasks involved in the process.

By default, each instance of a business process definition (BPD) is due 14 days after it is started. The actual due date for an instance is affected by the work schedule specified for the BPD.

The default work schedule for all BPDs is specified in the 99Local.xml configuration file in the following directory, where server_type is either process-server or process-center: PROFILE_HOME\config\cells\ cell_name\nodes\ node_name\servers\ server_name\ server_type\config\system.

If you do not specify a work schedule for a BPD, or if you leave the settings at use default, date calculations for instances of the BPD are based on the <default-work-schedule> in the configuration file.

You can specify your own due date and work schedule for each BPD.


Procedure

  1. In the Overview tab for the BPD, specify a value in the Due in field that reflects how long the entire process instance is expected to take to complete.

  2. In the Work Schedule section, specify the working hours that users are available to complete work.

    • The Time Schedule specifies the normal business hours that work can be completed.

      For example, if you expect the users completing the task to be available Monday through Friday, 9 AM to 5 PM, you can select this schedule from the list.

    • Timezone specifies the timezone that you want to apply to running instances of the current BPD. All standard time zones are available.

    • The Holiday Schedule is a list of dates that are exceptions to the normal time schedule.

    If you expect some activities to be completed by users with a specific work schedule, you can specify a different work schedule for that activity in the Properties view for that activity. For all of the Work Schedule values, you can use a JavaScript expression with predefined variables. You can enter either a String (or String-generated JavaScript) or JavaScript that returns a TWTimeSchedule or TWHolidaySchedule variable.

    If you use a String, then IBM BPM looks up the schedule by name according to those rules. If you use one of the TWSchedule variables, then IBM BPM assumes that the schedule is filled in appropriately. To view the parameters of the TWTimeSchedule or TWHolidaySchedule variables, open them from the System Data toolkit.

    You can also write an IBM BPM service to dynamically set the overall work schedule for a BPD and store the entire work schedule in the TWWorkSchedule variable. The TWWorkSchedule variable includes parameters for timeSchedule, timeZone, and holidaySchedule. To view the parameters of the TWWorkSchedule variable, open it from the System Data toolkit.

Enabling task management


Related tasks:
Developing using the JavaScript API
Manage IBM BPM configuration settings


Manage time and holiday schedules

You can manage time and holiday schedules by using the JavaScript API. You can set time and holiday schedules for activities on the Implementation tab. After you add a new time or holiday schedule, it immediately becomes available in the time or holiday schedule list in the authoring environment.

Avoid removing the default holiday or time schedules. The default schedules are specified in the 99Local.xml configuration file. Changes to the default schedules require changes to the 99Local.xml file.

To create a holiday schedule. Use similar steps to create a time schedule.


Procedure

  1. Create an integration service by using a server script similar to the following script:
    var holidaySchedule = new tw.object.TWHolidaySchedule();
              holidaySchedule.name = "holidaySchedule" + new Date().getTime();
              holidaySchedule.dates = new tw.object.arrayOf.Date();
              holidaySchedule.dates[0] = new tw.object.Date();
              holidaySchedule.dates[0].parse("20100101", "yyyyMMdd");
              holidaySchedule.dates[1] = new tw.object.Date();
              holidaySchedule.dates[1].parse("20100223", "yyyyMMdd");
              holidaySchedule.dates[2] = new tw.object.Date();
              holidaySchedule.dates[2].parse("20100308", "yyyyMMdd");
              holidaySchedule.dates[3] = new tw.object.Date();
              holidaySchedule.dates[3].parse("20100501", "yyyyMMdd");
              holidaySchedule.dates[4] = new tw.object.Date();
              holidaySchedule.dates[4].parse("20100824", "yyyyMMdd");
              holidaySchedule.dates[5] = new tw.object.Date();
              holidaySchedule.dates[5].parse("20091231", "yyyyMMdd");
    		  tw.system.addHolidaySchedule(holidaySchedule). 
  2. Save and run the integration service.

  3. Create a business process definition (BPD), and add an activity with a default service.
  4. Link the activity in a start-end flow.

  5. On the Implementation tab of the activity, select the holiday schedule created, and then set the time schedule to 7AM-7PM Every Day.
  6. Save the BPD.

  7. Run the BPD, and then open the Process Inspector tab to verify the due date calculation.


Results

You can view the newly added holiday schedule in the administrative console, which is listed in the Holiday Schedules list.

You can use Edit or Delete to update or remove the holiday schedule from the list.