Event Traceability
Machine Event Traceability allows you to capture details of the event request received so that reports and detailed analysis can be performed to provide information such as the total number of events received, events received per machine/asset, success or failure rates of event, IoT event handling (record creation), and so on.
Machine Event Traceability is currently supported only on for
standard IoT events.
The sequence of actions that take place within ServiceMax when an IoT event is triggered:
• Step 1: On receiving the event request
◦ When a request for an IoT event is received by ServiceMax, the following operations are performed:
◦ If the event request received is for a standard IoT event, then an IOT Event object record is created with its Status field set as INITIATED. This is used for
machine event traceability and data analytics.
◦ If the event request received is for a custom IoT event, the creation of the IOT Event record is skipped.
• Step 2: Create a record for the received event
◦ Based on the ServiceMax IoT event request received, the corresponding
configured Apex class is invoked to create the required record. This can be a Case, Work Order, Service Request, or any other object's record (if a custom IoT event request was received).
◦ For standard IoT events, the status of the record creation is updated in the
IoT Event record created in step 1. The status can be COMPLETED or ERROR.
• Step 3: Record available for business processing
◦ Once the required records have been created, they are further processed as per your business process configurations in ServiceMax.
Machine Event Traceability is supported in ServiceMax through the managed IOT Event object. Records are created in this object whenever an IoT event request is received and updated on the completion of the event's execution. The following are the various fields of the IOT Event object:
• Alert Event - Requested event name
• Alert Payload - Request JSON payload received in event request
• Alert Source - Name of the system/platform from where the IoT event request was received. This is set to ThingsWorx by default.
• End DateTime - Date time when the event execution is completed
• Error Message - Error notification returned by the event execution on failure
• Notify Alert Source * - If set to True, the Alert Source is notified on completion of the event's execution. This is set to False by default.
• Start DateTime - Date time when the event execution was initiated
• Status - Status of the event's execution. It can INITIATED, COMPLETED, or ERROR
• Target Record - The ID of the record created on the event's successful execution
|
* Notify Alert Source is always set to False as the underlying functionality is currently not supported.
|
On record creation (when a standard IoT event request is received), all fields except Target Record and End Date Time are set with the values from the event's request payload. The Status field is set to INITIATED and the Start Date Time field is set to the current date and time.
On the completion of event execution, the End Date Time field is set to the current date and time. If the execution was successful, then the Target Record field is set to the ID of the record created by the event, and the Status field is set to COMPLETED. However, if the execution was not successful, then the Target Record field is left blank, the Error Message field is set with the error detail returned by the event's execution, and the Status field is set to ERROR.