Implementing Execution Models in the Model
As a minimum you must implement class methods for the LOAD and RUN execution modes and decorate them with @xi.ExecModeLoad() and @xi.ExecModeRun() respectively.
In addition, within an execution mode method you can call self.insight.exec_mode to get the name of the execution mode that invoked the job. Note that in most situations, you do not need to explicitly get the execution mode name, because each execution mode has it's own method, and within that method, you already know that this is the method of a specific execution mode.