Execution Modes
Every app must implement behavior for the two standard execution modes:
LOAD and
RUN.
The behavior for an execution mode must be implemented in a method of the application class, and that method must be decorated with one of the following decorators:
- @xi.ExecModeLoad()
- @xi.ExecModeRun()
- @xi.ExecMode(name="MY_EXEC_MODE")
The method with the LOAD mode decorator needs to initialize all input entities and the one with the RUN mode decorator needs to initialize all result entities. For more, see the Xpress Insight Python Package Reference Manual and the Insight Python examples.
A model can also define any number of additional custom execution modes-they can offer your app two additional forms of control:
- Executing different model code paths based on the execution mode selected by a user.
- Routing different kinds of Xpress Insight jobs to different worker resources configured on the server. For example, you could have a model that performs small, fast jobs as well as large, slow jobs. Using custom execution modes, you can route the two different kinds of jobs to the worker resources best equipped to serve them.
![]() |
Note If an execution mode is not available in
View Designer, recompile your model.
|