Using Attachments
Attachments are files you can associate with an app or individual scenario. They can either be provided with the initial app archive in the project_attachments folder, or created and modified by interacting with Xpress Insight itself.
Attachments can also be accessed using the standard data access functions of Mosel using the appropriate mminsight procedures, thus providing another way for a user to interact with the underlying model. One advantage of attachments over model resources (such as the folio.dat file configured in the example project) is that attachments can be updated by Xpress Insight, whereas model resources are not changeable once an app has been created.
Other powerful use-cases for attachments (and, by implication, differences between attachments and
model_resources files) include:
- They can be written to at runtime and served dynamically via the JavaScript API.
- Attachments can be easily switched or removed by users.
- They are supported by a range of included editors.
- Attachments can be associated with tags, allowing users to control what data is processed without changing the underlying model.
In the following sections, an attachment is built-in to the app while developing it, and then it is changed at runtime in Xpress Insight, to demonstrate the two way interaction with the underlying model.