Skip to main content

system.kanoa.cmms.addProcedureStepEvent(procedureStepEventInfo, userId)

Adds a procedure step event, recording the outcome of a single step within a procedure execution (e.g. an operator marking a step as completed, logging time spent, or leaving a comment) and links it back to the parent work order event. All procedureStepEventInfo keys are required.


Parameters

procedureStepEventInfo Dictionary

- actualMinutesInteger
- commentString
- completedBoolean
- procedureStepIdIntegerId of procedureStep
- workOrderEventIdIntegerId of workOrderEvent

userId Integer:Id of the user executing the function


Returns

procedureStepEventId Integer
message String None if success


Example

procedureStepEventInfo = {
"actualMinutes": 12,
"comment": "Bearing temperature within spec, no abnormal vibration noted.",
"completed": True,
"procedureStepId": 4501,
"workOrderEventId": 88231,
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
procedureStepEventId, message = system.kanoa.cmms.addProcedureStepEvent(procedureStepEventInfo, userId)
print procedureStepEventId, message