Skip to content

resourceObject

A resource performs work and can service stops based on skills, roster and location. Attribute names and types are links.

id integer
Unique identifier for this resource.
type resourceParamsKey
References a previously defined resource type by key.
contract contractParamsKey
References a previously defined contract by key.
state REST | WORK | BRK | STBY | CLLD
Current operational state: REST (resting), WORK (working), BRK (on break), STBY (standby for callout), CLLD (called-out). CLLD marks "the resource has actually been called", and it is REQUIRED persistence: Spiral takes no action on it in normal running, but at startup re-seeds the CALL state onto the head STBY roster stop from it — an unmarked call would vanish across a Spiral restart. Helix acts as the host for these transitions, driving them ON TIME from the roster itself: the rest/standby status is the class of the ACTIVE roster entry, converged on every resource update and at each REST↔STBY boundary by a per-resource alarm on the event queue (only a resource already in REST or STBY is touched — WORK/BRK and the call states belong to other machinery). STBY→CLLD on receipt of the CALL (a host that stamps them first, as AA does, just gets there first), reverting to STBY if the call ends unanswered; accepting the callout rewrites the document to REST (roster + state together). The call itself always shows as CALL on the head STBY roster stop — its one valid home.
unprod stopObject default null
Additional stops the resource must fulfil (usually directly; can be overridden).
at location
Current position in topography coordinates.
atTime time
The time the current location (at) was last recorded.
base location
The resource’s normal home location.
roster [dutyKey: time]
Planned working roster — a duty key with a start time. Helix prunes EXPIRED rest/standby entries as it processes the resource (an entry ends when the next begins; the last never expires; work-classed history is never pruned), so the roster "shifts down" and the derived roster stops shift with it — no redundant stop emissions at period boundaries.
lastOff time
Last end of active work; null if unknown.
lastOn time
Last start of active work; null if unknown.
lastBreak time
Last completion of a break; null if unknown.
stopOn timeInterval
Maximum stop-on time that may be considered after the rostered finish; null is synonymous with 0.
userId integer
Deprecated — the Engineer sign-in binding now lives on the USER as `user.actsAs` (the set of resource ids a user may act as), configured in the Administration app. Retained for backward compatibility but no longer drives the Engineer view. If present, add it to the resource `ignore` list in the domain so Spiral never sees it.
currentWorkingLimit distance
The resource’s current working-area distance limit (overrides the params soft / hard limits for now).
lock bool default false
Prevents Spiral from rescheduling this resource.
skills [string: skillObject]
The resource’s base skills — a map of skill name → skillObject (not an array).