com.tibco.bpm.service.connector

## Class BusinessDeadlineService

- java.lang.Object
- - com.tibco.bpm.service.connector.BusinessDeadlineService

- All Implemented Interfaces:
    BusinessDeadlineService

      public class BusinessDeadlineService
      extends java.lang.Object
      implements BusinessDeadlineService

  Provides access to the BusinessDeadlineService interfaces.

  ©2011 TIBCO Software Inc.
  Since:
    1.2

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Calendar` | `calcBusinessDeadline(java.lang.String guid, java.util.Calendar startDateTime, org.apache.xmlbeans.GDuration duration)` Return a calculated Business Deadline based on working time.
    `java.util.Calendar` | `calcDeadline(com.tibco.n2.dac.api.basic.XmlCalendarLookup[] aLookups, java.util.Calendar aStartDateTime, org.apache.xmlbeans.GDuration aDuration)` Calculates the earliest date and time a deadline can be completed, given a start date/time and duration.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### calcBusinessDeadline

          public java.util.Calendar calcBusinessDeadline(java.lang.String guid,
                                                         java.util.Calendar startDateTime,
                                                         org.apache.xmlbeans.GDuration duration)
                                                  throws com.tibco.n2.dac.services.DeadlineFault,
                                                         com.tibco.n2.dac.services.SecurityFault

      Description copied from interface: `BusinessDeadlineService`
      Return a calculated Business Deadline based on working time.

      A corresponding calendar should have been created previously with entries for working time.

      Specified by:
        `calcBusinessDeadline` in interface `BusinessDeadlineService`
      Parameters:
        `guid` - The GUID of the Calendar that contains the working time entries to be used when calculating this deadline.
        `startDateTime` - The starting point for the deadline calculation.
        `duration` - The amount of time required to complete the task.
      Returns:
        Returns a `Calendar` containing the calculated end time for the task based on the start, duration and available working time as defined in the corresponding calendar.
      Throws:
        `com.tibco.n2.dac.services.DeadlineFault` - In the event that the deadline cannot be calculated.
        `com.tibco.n2.dac.services.SecurityFault` - In the event that incorrect security information is presented.

    - #### calcDeadline

          public java.util.Calendar calcDeadline(com.tibco.n2.dac.api.basic.XmlCalendarLookup[] aLookups,
                                                 java.util.Calendar aStartDateTime,
                                                 org.apache.xmlbeans.GDuration aDuration)
                                          throws com.tibco.n2.dac.services.DeadlineFault,
                                                 com.tibco.n2.dac.services.SecurityFault

      Description copied from interface: `BusinessDeadlineService`
      Calculates the earliest date and time a deadline can be completed, given a start date/time and duration. The start date/time must be specified as UTC, and the response will also be specified as UTC.

      The calculation request also includes an optional, ordered collection of identifiers from which a Calendar can be resolved. Those identifiers will consist of Calendar references and Organizational Entities, as set out in the following list, and will be applied in the given order until a Calendar can be resolved.

      1. Time Event Calendar Reference (can be defined dynamically using a variable assignment)
      2. Single, Org-Model Entity Participant
      3. Process Calendar Reference
      For the deadline calculation of a User Activity, the Organizational Entities will be derived from the participant. If a User Activity, or Timer Event, declares more than one participant, those participants should not be used to perform deadline calculation (i.e. the participant should only be passed if it identifies a single Organizational Entity).

      The Organizational Entity identifiers are used to determine what Base and Overlay Calendars are to be used for the calculation. If no Calendar can be resolved from the given identifiers, the Default Base Calendar will apply.

      Having resolved the Calendar(s), the available working hours are determined. Based on those available hours, the calculation returns earliest date and time at which the given duration of work can be completed.

      Specified by:
        `calcDeadline` in interface `BusinessDeadlineService`
      Parameters:
        `aLookups` - The identifiers for the Calendars to be used when calculating the deadline.
        `aStartDateTime` - The starting point for the deadline calculation.
        `aDuration` - The amount of time required to complete the task.
      Returns:
        Returns a `Calendar` containing the calculated end time for the task based on the start, duration and available working time as defined in the corresponding calendar.
      Throws:
        `com.tibco.n2.dac.services.DeadlineFault` - In the event that the deadline cannot be calculated.
        `com.tibco.n2.dac.services.SecurityFault` - In the event that incorrect security information is presented.

Copyright © 2018 TIBCO Software Inc. All Rights Reserved.