14.1 sp100_activities
On This Page:
This table records details of all activities which have been assigned to employees: each record represents one activity being carried out by one employee between specified start and end dates and times. "Activity" is used in rather a broad sense, because a record may actually represent lack of activity, e.g. annual leave or sick leave. On the Gantt chart, each bar in the body of the chart corresponds to one record in the sp100_activities
table.
An "employee" may be an individual (engineer / operative) or a crew.
Activity records are also used as a means of constructing crews: in this case, each record represents the assignment of an operative to a specified crew for a specified period of time. Constructing crews in this way (as opposed to having a separate crew membership table) has the convenient side effect of making the individuals who make up the crew unavailable to the schedulers: they are seen to be fully occupied because of the crew member activity.
A job that lasts more than one day (a "long job") is represented in this table as a single row, although this will in fact represent several site visits. The start and travel of the first part of the job, and the end of work of the last part of the job, are held.
The Standard Activities in this table are tidied by sp_dbtidy
's Global group and the Jobs are tidied by sp_dbtidy
's Job group.
Table Definition
Field | Type | Default | Nullable |
---|---|---|---|
|
|
| |
|
| ||
|
|
| |
|
|
| |
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
| clob | ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
|
| |
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
|
| |
|
| ||
rtt_travel_time | number(5) | default -1 |
|
rtt_route_id | varchar2(512) |
| |
rtt_travel_home | number(5) | default -1 |
|
manually_scheduled | number(1) | default 0 |
Keys
- Primary key (
activity_no
)
- Foreign key (
activity_type
)- References
14.1 sp105_activity_types
(activity_type
)
- References
- Foreign key (
activity_status
)- References
14.1 sp117_status_descriptions
(status
)
- References
- Foreign key (
region_no
)- References
/wiki/spaces/SCH141/pages/27068047
(region_no
)
- References
- Foreign key (
crew_no
)- References
14.1 sp210_employees
(employee_no
)
- References
- Foreign key (
resp_unit_no
)- References
/wiki/spaces/SCH141/pages/27099986
(resp_unit_no
)
- References
- Foreign key (
earmark_dispatch_type
)- References
14.1 sp290_dispatch_types
(dispatch_type
)
- References
- Foreign key (
earmark_dispatch_status
)- References
14.1 sp287_dispatch_statuses
(dispatch_status
)
- References
- Foreign key (
local_knowledge
)- References
14.1 sp272_knowledge
(local_knowledge
)
- References
- Foreign key (
travel_mode
)- References
14.1 sp099_sa_travel_modes
(mode_no
)
- References
Primary Key Referenced From
Column Descriptions
Field | Description |
---|---|
activity_no | ServiceOptimizer generated unique identifier. |
employee_no | The identifier of the employee undertaking the activity. Earlier versions of ServiceOptimizer set When an appointment is booked through the ABS, it will be nominally associated with an employee by setting this column. It is not until the job has been scheduled, or manually allocated via the Gantt interface, that it can be said for certain that the job will be carried out by the specified employee. Until that time, the job is still said to be unresourced, notwithstanding the fact that To discover whether or not a job is resourced, therefore, it is necessary to check the value of |
resp_unit_no | Interim Responsibility Unit (IRU) to which the employee is posted (for standard activities) or to which the job belongs (for resourced jobs). For unresourced jobs, resp_unit_no is set from the customer postcode, via its region, and by finding all the IRUs that cover this region. Of these IRUs the one whose resp_unit_ref is least alphabetically is chosen. The resp_unit_no of this IRU is used in this SP100 field. |
activity_type | A number indicating the type of the activity. |
crew_no | Where the activity represents crew membership, this is the identifier of the crew to which the employee belongs; otherwise, the column is NULL . |
crew_leader | Where crew_no is not NULL , this is a flag indicating whether or not the employee is to be treated as a leader of the crew: 1 indicates that the employee is a crew leader, 0 otherwise. This column should be NULL if crew_no is null. |
job_no | Where the activity relates to an appointment or fault, this is the job's unique identifier; otherwise, the column is NULL . |
expected_start | The date and time at which the activity is expected to start - uses FRU Time Zone. For a job that spans more than one operative day, this is the start of the first part job.This column is always NULL for an unresourced job. |
expected_end | The date and time at which the activity is expected to end. A NULL value indicates that the activity continues indefinitely. Uses FRU Time Zone. For a job that spans more than one operative day, this is the end of the last part job. This column is always NULL for an unresourced job. |
notes | Free text description. For a job, this is constructed from the 4 description fields supplied when the job was booked, separated by newline characters. These description fields are held separately in 14.1 sp111_jobs . If a job's notes are modified, this field is changed but the description fields in 14.1 sp111_jobs are unchanged. Note that the job's "more notes" are held in table 14.1 sp153_job_more_notes . |
overtime | The number of minutes that a job is outside of a shift. Including any time before or after the shift period. This time is not adjusted for operative efficiency. This column is always NULL for an unresourced job. |
travel_time | The amount of travel time, in seconds, which is included in the activity duration. This is used only for faults and appointments. For a job that spans more than one operative day, this is the travel to the first part job. This column is always NULL for an unresourced job. |
lunch_time | The amount of time, in seconds, included in the job duration for the employee to take a break. This is only relevant to jobs (not Standard Activities). If the job has no break included, this is set to If an All Day job (ref. It is possible to resize a job such that its break duration is zero. For a job that spans more than one operative day, this is the break duration for the first part job. This column is always |
activity_status | A number indicating the current status of a scheduled task.
|
schedule_status | A number denoting the current scheduling status of the activity, for appointments and fault fixing activities. For Standard Activities, see below. This value is a bit pattern, as follows:
Note that a job will remain unresourced until it has been automatically scheduled, or manually allocated. That is, it is unresourced if neither the Manually allocated or the Auto allocated bits are set - i.e. if For Standard Activities, this field is |
jeopardy_warnings | Flag indicating whether the activity is in some kind of jeopardy. If this value and the value of This value is treated as a bit pattern as follows:
|
time_scheduled | The date and time at which the activity was assigned to the employee by the automatic scheduler. This column will be null for activities not allocated by the scheduler. Uses the time zone of the DBMS server machine. |
postcode | Postcode of the employee's location at the time the activity is completed. |
region_no | The identifier of the region in which the activity takes place. |
unalloc_reason | Reason job is unallocated:
|
last_dispatched_eta | The ETA of the job when it was earmarked and dispatched - uses FRU Time Zone. If a job has not yet been earmarked, or when it is unearmarked this column will be null.This column is always NULL for an unresourced job. |
earmark_dispatch_status | The current delivery status of the earmark message related to this job. Corresponds to a value in 14.1 sp287_dispatch_statuses . Will be NULL if the job is not yet earmarked or when it is unearmarked. This column is always NULL for an unresourced job. |
earmark_dispatch_type | The type of earmark message to be delivered. Corresponds to 14.1 sp290_dispatch_types . Will be NULL if the job is not yet earmarked or when it is unearmarked.This column is always NULL for an unresourced job. |
jeopardy_report_marker | Flag which records a job on the Gantt's Jeopardy Report as 'marked'. Takes one of two values:
|
EOD_travel | The amount of travel time, in seconds, which is required to travel from the job location to the end-of-day location. This is only relevant to the last job of a day. This column is always |
last_dispatched | The date/time the job was earmarked and dispatched - uses FRU Time Zone.This column is always NULL for an unresourced job. |
expected_start_is_dst | Flag indicating which time the job start is in when the time is during Daylight Saving. For example, in the UK:
This column is always |
expected_end_is_dst | Flag indicating which time the job end is in when the time is during Daylight Saving. For example, in the UK:
|
jeopardy_warnings2 | An additional flag indicating further jeopardy conditions in addition to those indicated by Zero for Standard Activities. Jeopardy conditions are identified in FS020 and FS175. This value is treated as a bit pattern as follows:
|
ssr_marked | Indicates whether the marked check box on the Gantt client Same Site Report is checked or not.
|
transaction_id | See sp599_transaction_audit for details. |
local_knowledge | This is the local knowledge that this employee has to do this job. This is an output only field, i.e. the server updates it but does not rely on its value. For Standard Activities and Unresourced Jobs its value is NULL . |
expected_duration | Working time (in minutes) the job was predicted to take when it was booked, given its current position in the schedule. For a resourced job this:
For an unresourced job this is the same as its booked duration ( |
expected_overhead | Overhead time (in minutes) the job was predicted to take when it was booked, given its current position in the schedule. For a resourced job this takes account of same-site groups and does not reflect modifications to the job's duration after booking. For an unresourced job this is the same as its booked overhead ( |
scheduled_duration | Working time (in minutes) that the job was predicted to take - up to the time when the Actual Duration became known. For a resourced job this:
For an unresourced job this is the same as its normalised scheduled duration ( |
scheduled_overhead | Overhead time (in minutes) that the job was predicted to take - up to the time when the Actual Duration became known. For a resourced job this:
For an unresourced job this is the same as its normalised scheduled overhead ( |
actual_duration | Working time (in minutes) that the job actually took and hence only known after the job has been Logged Off or Cleared: until then this is |
has_been_or_is_logged_on | For a resourced job, indicates whether this job's dispatch status is currently LoggedOn or has ever been LoggedOn. Set to 1 if it has or 0 if it has not. If this flag is set to 1, then the job's ETA is the actual ETA as opposed to an estimated ETA. This field will be NULL for an unresourced job |
confirmed_state | Identifies whether arrangements for the site visit have been confirmed with the customer.
|
dispatch | Identifies whether a standard activity is dispatchable.
|
travel_mode | Specifies the travel mode for the standard activity.
|
booked_start | Original start time used with travel mode to determine the actual start time. |
last_update | The date and time the job was last updated. Uses FRU time zone. |
last_jeopardy_update | The date and time of the last update to the jeopardy conditions of the job. Uses FRU time zone. |
rtt_travel_time | The travel time to the job, in seconds, returned by the Real Time Travel Server (only used if RTT enabled with SP083 postcode_tm_lookup) |
rtt_route_id | A string which uniquely identifies the route used by the Travel Server to get the RTT Travel Time (only used if RTT enabled with SP083 postcode_tm_lookup) |
rtt_travel_home | The Real Time Traffic travel time from the job to the Employee home. Only expected to be used for the last job in the day (only used if RTT enabled with SP083 postcode_tm_lookup) |
manually_scheduled | Indicates if the job has been manually moved on the Gantt; 1 means that the job has been moved; 0 means the job has not been moved. A job is considered to have been moved when the following manual actions have been performed:
|