Configuring Apps with the Companion File
![]() |
Note For Mosel based apps, the companion file should have the same name as the compiled main Mosel model.
|
![]() |
Note For Python based apps, the companion file should be named
application.xml.
|
The full XSD schema of the companion file XML is documented at www.fico.com/fico-xpress-optimization/docs/latest/insight/xml_reference/. Examples of companion file mark-up are provided throughout this guide.
The companion file meta-data can be used to perform a number of important configurations that control the way the system behaves for the app and views.
In the earlier, version 2, specification of the companion file, schema settings were specified by <entity> elements within the <schema> element and the enhancements were applied by the server interface when data was requested by a client. Starting from Version 3, the companion file removes this section and delegates the configuration of the schema settings to metadata (annotations or decorations) in the model.
Web Client views have a corresponding element in the companion file within the <client> element.
<model-companion xmlns="http://www.fico.com/xpress/optimization-modeler/model- companion" version="3.0"> <client> <view-group title="Main"> <html-view title="Year Plan" default="true" path="yearplan.html"/>
FICO® Xpress Workbench provides visual editing of the <client> section of the companion file.
App Names and Versions
On the Home page each app has a preset name and version. On importing an app the name is taken from the Mosel model name and the version is an optional setting in the Mosel file. For example:model "units" version 1.0.0
import xpressinsight as xi @xi.AppConfig(name="My App", version=xi.AppVersion(1, 0, 0)) class InsightApp(xi.AppBase): pass