Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wli.worklist.api.taskplan
Interface TaskPlan

All Superinterfaces:
  EventSource, Serializable

    public interface TaskPlan

extends EventSource, Serializable

Represents metadata common to a set of tasks. The task plan defines a set of steps through which all tasks of this type will pass. Each step defines a number of actions which may be taken by a human user in order to cause a task to progress to a subsequent step.

Nested Class Summary
`static interface` | `TaskPlan.Event` Property names for the PropertyChangeEvents that can be produced by edits on a object of this type.

Method Summary
`BusinessDateTime` | `createCompletionDueBusinessDate()` Create and set the completion due business date for tasks of this type.
`TaskOwnerDefinition` | `createOwnerDefinition()` Create and set a blank definition for how the owner for tasks of this type will be calculated.
`RuleBindings` | `createRuleBindings()`
`Interval` | `createTerminalTaskRetentionTime()` Create and set the amount of time tasks of this type should be retained in the runtime store after they have reached a terminal administrative state (completed or aborted).
`Interval` | `createTimeEstimate()` Create and set the Interval instance representing the estimated time it will take to complete this task.
`void` | `destroyCompletionDueBusinessDate()` Destroy and unset the completion due business date for this task plan.
`void` | `destroyOwnerDefinition()` Destroy and unset the TaskOwnerDefinition for this task plan.
`void` | `destroyRuleBindings()`
`void` | `destroyTerminalTaskRetentionTime()` Destroy and unset the terminal task retention time for this task plan.
`void` | `destroyTimeEstimate()` Destroy and unset the time estimate for this task plan.
`BusinessDateTime` | `getCompletionDueBusinessDate()` Business date and time by which this task must be completed.
`ConstructorContainer` | `getConstructorContainer()` Get the container that holds all constructors defined for this task plan.
`long` | `getDefaultStepTimeEstimateInMinutes()` Get the default time estimate for steps in minutes.
`String` | `getDescription()` A description of the purpose for this task plan, or null if none was set.
`String` | `getHostApplicationId()` Get the name of the application that hosts this task plan.
`TaskPlanId` | `getId()` Get the server-wide unique identifier for this task plan.
`int` | `getLoadBalancingAvailabilityCheckThresholdPriority()` An integer value that indicates a threshold task priority, above which availability checking will automatically be enabled.
`TaskOwnerDefinition` | `getOwnerDefinition()` Get information about how the owner for tasks of this type will be defined.
`TaskPlanPath` | `getPath()` Get a path representing the location of this task plan in an abstract hierarchy.
`Property` | `getProperty(String name)` Get a Property by name.
`NamedObjectContainer<Property>` | `getPropertyContainer()` Get a reference to the container object that holds properties for this task plan.
`String[]` | `getPropertyNames()` An array of names for the user-defined properties defined on this task type.
`RuleBindings` | `getRuleBindings()` Get an object representing the bindings of rules to this task plan.
`Step` | `getStep(String name)`
`NamedObjectContainer<Step>` | `getStepContainer()` Get a reference to the container object that holds steps for this task plan.
`String[]` | `getStepNames()` An array of names for the steps defined on this task plan.
`Property[]` | `getSystemProperties()` Get all the system defined properties.
`Property` | `getSystemProperty(SystemProperty sysProp)` Get a system defined property.
`Interval` | `getTerminalTaskRetentionTime()` An amount of time tasks of this type should be retained in the runtime store after they have reached a terminal administrative state (completed or aborted).
`Interval` | `getTimeEstimate()` Get the time estimate for this task plan.
`float` | `getVersion()` The version of this task plan in major.minor format.
`void` | `initializeFromDescriptorStream(InputStream descriptorStream)` Parse the XML content from the given InputStream into this TaskPlan, replacing any state that may exist in this object.
`void` | `initializeFromDescriptorStream(InputStream descriptorStream, ClassLoader loader)` Parse the XML content from the given InputStream into this TaskPlan, replacing any state that may exist in this object, and using the given ClassLoader.
`boolean` | `isLayoutManualAllowed()` Is the view allowed to use bounds information to layout the figures in this task plan? This property fires no events.
`boolean` | `isLayoutManualDesired()` Should the view try to lay out the figures in this task plan manually with help from the user and stored bounds information? Changing this property fires a LAYOUT event.
`void` | `setCompletionDueBusinessDate(BusinessDateTime dateTime)` Set the completion due business date for tasks of this type.
`void` | `setDescription(String description)` Set the description for this task plan.
`void` | `setLayoutManualAllowed(boolean newValue)`
`void` | `setLayoutManualDesired(boolean newValue)`
`void` | `setLoadBalancingAvailabilityCheckThresholdPriority(int threshold)`
`void` | `setOwnerDefinition(TaskOwnerDefinition owner)` Set the definition for how the owner for tasks of this type will be calculated.
`void` | `setPath(TaskPlanPath path)` Set the path to this task plan.
`void` | `setTerminalTaskRetentionTime(Interval time)` Set the amount of time tasks of this type should be retained in the runtime store after they have reached a terminal administrative state (completed or aborted).
`void` | `setTimeEstimate(Interval estimate)` An estimate of the time it will take to complete this task.
`void` | `setVersion(float version)`
`void` | `writeToDescriptorStream(OutputStream descriptorStream, String encoding)` Write this TaskPlan out as XML content into the given OutputStream.

Methods inherited from interface com.bea.wli.worklist.api.taskplan.EventSource
`addPropertyChangeListener, addPropertyChangeListener, clearDirty, dispose, getParent, isComplete, isDirty, isInitializing, isStarted, markDirty, removePropertyChangeListener, removePropertyChangeListener, startProducing`

Method Detail

### getId

    TaskPlanId getId()

  Get the server-wide unique identifier for this task plan. This id is generated from the folder, name and version of this task plan. This value will never be null.

### getPath

    TaskPlanPath getPath()

  Get a path representing the location of this task plan in an abstract hierarchy. This hierarchy is used to establish relationships between task plans. For example, if TaskPlan A and TaskPlan B are both created and maintained by Group X, they may both have a path like '/GroupX'. This common path allows the task plan registry to retrieve them together via a call to getTaskPlansInFolder().

  Returns:
    The path to this task plan. Will never be null.
  See Also:
    `TaskPlanRegistry.getTaskPlansInFolder(com.bea.wli.path.FolderPath)`

### setPath

    void setPath(TaskPlanPath path)

  Set the path to this task plan. Must not be null.

  Parameters:
    `path` - The new path to this task plan. Must not be null.

### getVersion

    float getVersion()

  The version of this task plan in major.minor format.

### setVersion

    void setVersion(float version)

### getHostApplicationId

    String getHostApplicationId()

  Get the name of the application that hosts this task plan.

  Returns:
    The host application id. This may be null when editing a new task plan, but will never be null for a deployed, server-side TaskPlan instance. Note, this id is not the same as the id returned from TaskPlan.ID.getWorklistHostApplicationId(). The latter represents the Worklist host application that registers the deployed task plan, whereas the host application id returned from this method indicates which application hosted the task type descriptor before it was deployed.

### getDescription

    String getDescription()

  A description of the purpose for this task plan, or null if none was set.

### setDescription

    void setDescription(String description)

  Set the description for this task plan.

  Parameters:
    `description` -

### getCompletionDueBusinessDate

    BusinessDateTime getCompletionDueBusinessDate()

  Business date and time by which this task must be completed. This is specified as a time interval, and a business calendar name. The time interval will be added to the creation date for the task to arrive at an absolute date. The business calendar is used to calculate the absolute date by which the task must be completed.

  Returns:
    BusinessDate or null if none was set.
  See Also:
    `createCompletionDueBusinessDate()`, `setCompletionDueBusinessDate(BusinessDateTime)`, `destroyCompletionDueBusinessDate()`

### setCompletionDueBusinessDate

    void setCompletionDueBusinessDate(BusinessDateTime dateTime)

  Set the completion due business date for tasks of this type. Instances of BusinessDateTime may be created via TaskPlanFactory. For most users, you should use createCompletionDueBusinessDate to take the place of creating the instance and the call to this method.

  See Also:
    `createCompletionDueBusinessDate()`, `TaskPlanFactory.createBusinessDateTime()`

### createCompletionDueBusinessDate

    BusinessDateTime createCompletionDueBusinessDate()

  Create and set the completion due business date for tasks of this type. The returned BusinessDate instance is 'live' and may be modified using its setters to configure the completion due business date for this task type.

### destroyCompletionDueBusinessDate

    void destroyCompletionDueBusinessDate()

  Destroy and unset the completion due business date for this task plan.

### getTimeEstimate

    Interval getTimeEstimate()

  Get the time estimate for this task plan.

  Returns:
    An Interval instance representing the estimated time needed to complete this task. If no estimate has been set, this method will return null.
  See Also:
    `setTimeEstimate(Interval estimate)`

### setTimeEstimate

    void setTimeEstimate(Interval estimate)

  An estimate of the time it will take to complete this task. This value is optional. The time estimate is used by the default worklist assignment handler (and may be used by custom assignment handlers) for load balancing. If specified it will be used as a default value for the TimeEstimate setting on the steps this task contains. The default value will be calculated as the number of minutes represented in the TimeEstimate, divided by the number of steps defined in this task plan (excluding any complete or end steps). This is a string value in the format of a BusinessDate interval (for example '0min0hour0day' or '10 years 5 hours 3 seconds'). Note that the estimate will be converted to minutes using the assumption that a month = 30 days, and a year = 365 days (e.g. no business calendar calculations will be performed).

  Instances of Interval may be created via TaskPlanFactory. For most users, you should use createTimeEstimate to take the place of creating the instance and the call to this method.

  Parameters:
    `estimate` - An Interval instance representing the estimated time needed to complete this task. If no estimate has been set, this method will return null.
  See Also:
    `createTimeEstimate()`, `destroyTimeEstimate()`, `TaskPlanFactory.createInterval(String)`

### createTimeEstimate

    Interval createTimeEstimate()

  Create and set the Interval instance representing the estimated time it will take to complete this task. The returned Interval instance is 'live' and may be modified via its setters to configure the time estimate for this task plan.

  See Also:
    `getTimeEstimate()`, `destroyTimeEstimate()`

### destroyTimeEstimate

    void destroyTimeEstimate()

  Destroy and unset the time estimate for this task plan.

### getDefaultStepTimeEstimateInMinutes

    long getDefaultStepTimeEstimateInMinutes()

  Get the default time estimate for steps in minutes. This default will be derived from the TimeEstimate property if it is set (isZero() returns false), or will be a hard-coded default value of 10 minutes. If the TimeEstimate property is set, the default step time estimate is calculated as the number of minutes in the task estimate divided by the number of non-terminal steps in the task. This default time estimate is used only when the step does not itself provide a time estimate.

  Returns:
    The default time estimate value to use for steps within tasks of this type.

### getOwnerDefinition

    TaskOwnerDefinition getOwnerDefinition()

  Get information about how the owner for tasks of this type will be defined. This definition can specify the owner name directly, or specify the name of a rule binding to be used to calculate the owner's name at runtime. The returned object is 'live' and can be updated via its setters to change the owner definition for this task.

  Returns:
    TaskOwnerDefinition or null if none was set.
  See Also:
    `setOwnerDefinition(TaskOwnerDefinition)`, `createOwnerDefinition()`, `destroyOwnerDefinition()`

### setOwnerDefinition

    void setOwnerDefinition(TaskOwnerDefinition owner)

  Set the definition for how the owner for tasks of this type will be calculated. Instances of TaskOwnerDefinition may be created via TaskPlanFactory. For most users, you should use createOwnerDefinition to take the place of creating the instance and the call to this method.

  See Also:
    `createOwnerDefinition()`, `TaskPlanFactory.createTaskOwnerDefinition()`

### createOwnerDefinition

    TaskOwnerDefinition createOwnerDefinition()

  Create and set a blank definition for how the owner for tasks of this type will be calculated. You should call setters on the returned TaskOwnerDefinition instance to configure it.

### destroyOwnerDefinition

    void destroyOwnerDefinition()

  Destroy and unset the TaskOwnerDefinition for this task plan.

### getLoadBalancingAvailabilityCheckThresholdPriority

    int getLoadBalancingAvailabilityCheckThresholdPriority()

  An integer value that indicates a threshold task priority, above which availability checking will automatically be enabled. If a task of this type has a priority greater than the threshold priority, availability checking will be enabled during assignment (if candidate list handling is set to LOAD_BALANCING). If this threshold is set to 0, it has no effect.

  Returns:
    The priority above which tasks of this type should use a candidate users availability when making an assignment decision. Default value is 0.

### setLoadBalancingAvailabilityCheckThresholdPriority

    void setLoadBalancingAvailabilityCheckThresholdPriority(int threshold)

### getTerminalTaskRetentionTime

    Interval getTerminalTaskRetentionTime()

  An amount of time tasks of this type should be retained in the runtime store after they have reached a terminal administrative state (completed or aborted). If this value is not set (via a prior call to createTerminalTaskRetentionTime) this method will return null, and Worklist will assume a system default value for the retention time. The returned Interval is 'live' and can be modified via its setters to set the retention time for this task plan.

  See Also:
    `createTerminalTaskRetentionTime()`, `setTerminalTaskRetentionTime(Interval)`

### setTerminalTaskRetentionTime

    void setTerminalTaskRetentionTime(Interval time)

  Set the amount of time tasks of this type should be retained in the runtime store after they have reached a terminal administrative state (completed or aborted). If this value is not set (via this method or a call to createTerminalTaskRetentionTime) Worklist will assume a system default value for the retention time. A value of 0 seconds can be used to indicate that tasks based on this task plan can be purged immediately after they move to a terminal state. Instances of Interval may be created via TaskPlanFactory. For most users, you should use createTerminalTaskRetentionTime to take the place of creating the instance and the call to this method.

  See Also:
    `createTerminalTaskRetentionTime()`, `TaskPlanFactory.createInterval(String)`

### createTerminalTaskRetentionTime

    Interval createTerminalTaskRetentionTime()

  Create and set the amount of time tasks of this type should be retained in the runtime store after they have reached a terminal administrative state (completed or aborted).

### destroyTerminalTaskRetentionTime

    void destroyTerminalTaskRetentionTime()

  Destroy and unset the terminal task retention time for this task plan.

### getRuleBindings

    RuleBindings getRuleBindings()

  Get an object representing the bindings of rules to this task plan.

  Returns:
    The RuleBindings instance for this task plan or null if no rules have been bound to it.

### createRuleBindings

    RuleBindings createRuleBindings()

### destroyRuleBindings

    void destroyRuleBindings()

### getPropertyContainer

    NamedObjectContainer<Property> getPropertyContainer()

  Get a reference to the container object that holds properties for this task plan. This container is used to rename, and remove, and re-add properties.

### getSystemProperties

    Property[] getSystemProperties()

  Get all the system defined properties. The returned array will be the same for all TaskPlan instances, and is provided here for convenience. Any attempt to modify the returned Property instances will result in a runtime IllegalStateException exception.

### getSystemProperty

    Property getSystemProperty(SystemProperty sysProp)

  Get a system defined property. The returned Property will be the same for all TaskPlan instances, and is provided here for convenience. Any attempt to modify the returned Property instance will result in a runtime IllegalStateException exception.

### getPropertyNames

    String[] getPropertyNames()

  An array of names for the user-defined properties defined on this task type. If no properties have been defined, an empty array is returned. Note, if you want to get all the system properties, you can use SystemProperty.values() and call getProperty(SystemProperty.values()[i].getDisplayName()) in a loop to get all the Property instances for system properties.

### getProperty

    Property getProperty(String name)
                         throws UnknownObjectException

  Get a Property by name. Note that name can be the name of a system property (e.g. sys:Comment). In this case, a system-defined Property instance is returned.

  Throws:
    `UnknownObjectException`

### getConstructorContainer

    ConstructorContainer getConstructorContainer()

  Get the container that holds all constructors defined for this task plan.

  Returns:
    The ConstructorContainer instance for this task plan. This will never be null.

### getStepContainer

    NamedObjectContainer<Step> getStepContainer()

  Get a reference to the container object that holds steps for this task plan. This container is used to rename, and remove, and re-add steps.

### getStepNames

    String[] getStepNames()

  An array of names for the steps defined on this task plan. If no steps have been defined, an empty array is returned.

### getStep

    Step getStep(String name)
                 throws UnknownObjectException

  Throws:
    `UnknownObjectException`

### initializeFromDescriptorStream

    void initializeFromDescriptorStream(InputStream descriptorStream)
                                        throws ParseException,
                                               IOException

  Parse the XML content from the given InputStream into this TaskPlan, replacing any state that may exist in this object. You should ensure that content comes from a location in the host app that corresponds to the TaskPlanPath for this TaskPlan (but this is not checked).

  Parameters:
    `descriptorStream` - The InputStream to read from.
  Throws:
    `ParseException` - If any syntactical or validation error occurs.
    `IOException` - If any error occurs while reading content from the InputStream.

### initializeFromDescriptorStream

    void initializeFromDescriptorStream(InputStream descriptorStream,
                                        ClassLoader loader)
                                        throws ParseException,
                                               IOException

  Parse the XML content from the given InputStream into this TaskPlan, replacing any state that may exist in this object, and using the given ClassLoader. You should ensure that content comes from a location in the host app that corresponds to the TaskPlanPath for this TaskPlan (but this is not checked).

  Parameters:
    `descriptorStream` - The InputStream to read from.
    `loader` - The ClassLoader to use when finding the binding file (META-INF/binding-file.ser) the defines the mapping from the XML in the descriptor to the implementation classes for TaskPlan.
  Throws:
    `ParseException` - If any syntactical or validation error occurs.
    `IOException` - If any error occurs while reading content from the InputStream.

### writeToDescriptorStream

    void writeToDescriptorStream(OutputStream descriptorStream,
                                 String encoding)
                                 throws IOException

  Write this TaskPlan out as XML content into the given OutputStream. You should ensure that this OutputStream places this content into the host app at a location that corresponds to the TaskPlanPath for this TaskPlan (but this is not checked). This method requires you to specify a character encoding because a great number of problems occur if you use default encodings across descriptors and (for example) new String(byte[]). BEA recommends the use of the UTF-8 encoding unless you have a specific desire to use a different encoding.

  Parameters:
    `descriptorStream` - The OutputStream to read from.
    `encoding` - The character encoding (as a valid Java charset name) to use when generating the XML content for the plan. If null, a system-defined default encoding is used (though this is not recommended).
  Throws:
    `IOException` - If any error occurs while reading content from the InputStream.

### isLayoutManualDesired

    boolean isLayoutManualDesired()

  Should the view try to lay out the figures in this task plan manually with help from the user and stored bounds information? Changing this property fires a LAYOUT event.

### setLayoutManualDesired

    void setLayoutManualDesired(boolean newValue)

### isLayoutManualAllowed

    boolean isLayoutManualAllowed()

  Is the view allowed to use bounds information to layout the figures in this task plan? This property fires no events.

### setLayoutManualAllowed

    void setLayoutManualAllowed(boolean newValue)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD