Skip to main content

system.kanoa.cmms.checkWorkOrderConditions()

Evaluates all active condition-based work order triggers to determine whether any of them have been satisfied and are ready to generate a new work order event. This function is designed to be invoked on a recurring schedule (for example from a gateway timer script) rather than called ad hoc from a screen, since it sweeps the full set of configured conditions each time it runs. It takes no arguments � the conditions it checks are read from the CMMS configuration (see getWorkOrderTriggers) rather than being passed in.


Parameters


Returns

numRecordsCreated Integer Number of new work order events created


Example

# Typically wired up to a Gateway Timer Script (e.g. running every 60 seconds)
# to sweep all condition-based triggers (meter readings, sensor thresholds, etc.)
# and fire off new work orders whenever a monitored condition is met.

system.kanoa.cmms.checkWorkOrderConditions()