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
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.