Initializing help system before first use

Command-Line Tool Options and Arguments

The --base option is shared by all actions and is used to specify the root directory of the Workbench project (i.e. the parent of the source or python_source folder). If this is omitted, then the current working directory will be used as the base. Other file path arguments will be relative to this base directory.

Each action requires the argument specifying the path to the main Mosel file that contains the model directive or the Python source code that defines the Insight app class. For Python projects, the main file will be python_source/application.py. Other possibilities may be added in future.

build action

The build action will create an app zip file suitable for uploading to Insight. This will be created in the project root folder, overwriting any previous zip file. By default, the code will be compiled for production deployment with debugging disabled.

Options:
  • --base dir : (optional) the project root directory, defaults to working directory (see above).
  • path/to/main/file : (required) the main file, see above.
  • -g or -G : pass the given debugging level flag to the Mosel compiler
This is an example:
xpwinsightcmd build [--base path/to/project] [-g | -G] path/to/main/file

publish action

The publish action will create or update an app on the Insight server. Any Mosel code will be compiled for debugging rather than production use. The publish action is not intended to publish apps to production directly (see the build action for creating an app for production) as this is not recommended from a development environment.

By default, the action assumes the target Insight is version 5 or later and will acquire credentials from the OS as described in Equipping Workbench with Credentials to Publish. If the Insight server is version 4.x, then this will need to be specified using the --insight-4 option, and the credentials passed in the command-line.

Options:
  • --base dir: (optional) the project root directory, defaults to working directory (see above)
  • path/to/main/file: (required) the main file, see above
  • --to URL: (required) the root URL of the Insight server
  • --app-name name: (optional) the name of the app to create/update (see --create-if-missing)
  • --app-id id: (optional) the UUID of the app to update
  • --create-if-missing: (optional) when used with --app-name, then will update any existing app of that name; otherwise will create a new app
  • --full: (optional) perform a full rather than partial publish
  • --exec-env name: (optional, Insight 5.8 and later only) update the name of the app's Execution Environment.
  • --insight-4 --user user --pw pw: (optional) specify Insight version as 4.x and supply userid and password
This is an example:
xpwinsightcmd publish [--base path/to/project] path/to/main/file --to URL
                 [--app-name app-name] [--app-id app-id] [--create-if-missing]  [--full]
                 [--exec-env name]
                 [--insight-4 --user userid --pw pw]

Specifying an existing app (if any)

If only the required arguments are used, a new app will be created each publish. To specify an existing app, the simplest method is to use the --app-name option. If this is combined with the --create-if-missing option, then the app will be created if it does not already exist. The two options can be used together so the first publish will create the app, and subsequent ones will update it in-place.

Note: If the name of the app as specified by the model source or companion file does not match the supplied name, then upon publish the name of the app on the server will be updated to match it. This means subsequent publishes will then be able to find the app by name.

Alternatively, the user can also identify the app to update by app id. The app id is immutable and provides a stable reference when the name may have changed (for instance via Insight's auto-rename to avoid a name collision).

To obtain the id of the app, open the app in the Insight web client (so the URL looks something like <server>/insight/#eyJwc… ), open the Developer tools on the web browser, and enter the following at the Console:
console.log(JSON.parse(atob(location.hash.substring(1))).project)
This will print out the app id.

Full vs partial publish

By default, xpwinsightcmd will behave like the Workbench UI and use its last known publish timestamp to determine what to compile and what to include in the publish payload. If you specify the --full option, then everything will be recompiled, and all resources will be re-published.

Insight Execution Environment

This can be specified via the --exec-env argument. See Configuring the Execution Environment for details about Insight Execution Environments.

© 2001-2024 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.