Tasks

A Task is an element of a Job which has one more Workload with a common StartDate and Duration. Tasks can be constrained by Links.

A Task has the following elements:

  • ID is a unique string that identifies the Taks
  • Name is a textual short string used for display purposes
  • Description is a longer HTML string that can be used to hold a description of the Task
  • Attributes is an optional array of Job Attributes indexes, if not defined the parent Job Attributes will be used
  • StartDate is the current Task start time
  • Duration is the total duration of the Task (and thus, that of its Workloads)
  • SetupDuration is an optional duration, inferior to Duration, that expresses a setup portion of the Task Duration
  • Workloads is an array of Workloads, it should not be empty
  • Lock is an optional textual string indicating whether the Task is locked.
  • Error is an optional textual string indicating whether the Task is in an erroneous state.

If the Lock string is defined and not empty, the Task cannot be moved manually, the string can be used to explicit why the Task is locked (for instance because it has already been completed).

The following SmartRules are also supported:

  • API provides an optional URL for the TaskAPI that apply to this task.
  • DurationRule provides an optional Expression name to adjust the Duration when the task is moved.
  • SetupDurationRule provides an optional Expression name to adjust the SetupDuration when the task is moved.

Note that if SetupDurationRule is defined but not DurationRule, then Duration will be adjusted automatically.
API is invoked after all the other rules have been evaluated.

Example

{
   "ID": "OF082-120",
   "Name": "Redress",
   "Attributes": ["Alpha],
   "
Lock": "",
   "
SetupDuration": 0,
   "
Duration": 932,
   "
StartDate": 18839,
   "
Description": "task description goes here",
   "
Workloads": [{
      "
Resource": "R1-10",
      "
Aptitude": "Milling",
      "
Capacity": 1
   }]
}