Initializing help system before first use

App

Information about a app, its members and the model's schema.
Example
// to fetch the current App
var entity = insight
     .getView()
     .getApp();

Method summary

name description
createAttachment Create a new app attachment.
createFolder Create a new folder as a child of parent.
createScenario Create a new scenario inside the current app.
getAttachmentTagNames Get the list of attachment tag names defined by the app.
getAttachmentTags Get the list of attachment tags defined by the app.
getExecutionModes Returns the app's execution modes, indexed by name
getExecutionResourceGroups Returns the app's execution resource groups, indexed by name
getId The app's id.
getModelSchema The schema of the model used by this app.
getName The name of this app.
getUsers Get a list of users associated with the app.
getVisualization Obtains the AppVisualization containing the Visualization status and configuration for the app. This will return a Promise that will resolve when the AppVisualization status is ONLINE or if visualization is DISABLED for the app.

Methods

createAttachment ( options ) → {Promise}

Create a new app attachment.

Parameters:
Name Type Argument Description
options NewAttachmentOptions optional 
Returns:
Type Description
Promise Resolves when user closes the editor or if attachment create fails
Example
app.createAttachment({filename: 'my_file.xml', tag: 'atag'})
       .then(function(data) {
           console.log(data.attachment);
       });
Back to Top
createFolder ( parent, name ) → {Promise.<Object>}
Parameters:
Name Type Argument Description
parent Folder optional  the parent node to create the folder on
name string the name of the folder to create
Returns:
Type Description
Promise.<Object>
Example
// creates a new folder on a specified parent
app.createFolder(parentObj, 'my new folder');

// creates a new folder on the current app
app.createFolder('my new folder');
Back to Top
createScenario ( parent, name, type ) → {Promise.<Object>}
Parameters:
Name Type Argument Description
parent Folder | App optional  the parent node to create the scenario on
name string the name of the scenario to create
type string optional  the type of scenario to create
Returns:
Type Description
Promise.<Object>
Example
app.createScenario(parentObj, 'my new scenario', null);
Back to Top
getAttachmentTagNames ( ) → {Promise.<Array.<string>>}

Get the list of attachment tag names defined by the app.

Returns:
Type Description
Promise.<Array.<string>> Promise containing an array of strings or an empty array if no attachment tag names found.
Example
var attachmentTagNames = app.getAttachmentTagNames();
Back to Top
getAttachmentTags ( ) → {Promise.<Array.<AttachmentTag>>}

Get the list of attachment tags defined by the app.

Returns:
Type Description
Promise.<Array.<AttachmentTag>> Promise containing an array of AttachmentTag objects or an empty array if no attachment tags found.
Example
var attachmentTags = app.getAttachmentTags();
Back to Top
getExecutionModes ( ) → {Object.<string, ExecutionMode>}

Returns the app's execution modes, indexed by name

Returns:
Type Description
Object.<string, ExecutionMode>
Back to Top
getExecutionResourceGroups ( ) → {Object.<string, ExecutionResourceGroup>}

Returns the app's execution resource groups, indexed by name

Returns:
Type Description
Object.<string, ExecutionResourceGroup>
Back to Top
getId ( ) → {string}

The app's id.

Returns:
Type Description
string The app's Id
Example
var id = app.getId();
Back to Top
getModelSchema ( ) → {ModelSchema}

The schema of the model used by this app.

Returns:
Type Description
ModelSchema The schema of the model used by this app
Example
var modelSchema = app.getModelSchema();
Back to Top
getName ( ) → {string}

The name of this app.

Returns:
Type Description
string The name of this app
Example
var name = app.getName();
Back to Top
getUsers ( options ) → {Promise.<Array.<User>>}

Get a list of users associated with the app. Optionally filter the result by a custom authority.

Parameters:
Name Type Argument Description
options object optional  fetch parameters
Properties
Name Type Argument Description
authorityFilter string optional  custom authority to filter user list by
Returns:
Type Description
Promise.<Array.<User>> Promise containing an array of User objects or an empty array if no items found. The User objects will only contain custom authorities and not authority groups.
Example
app.getUsers().then(function (appUsers) {
    appUsers.forEach(function (user) {
        // app user
    });
});
Back to Top
getVisualization ( onUpdate ) → {Promise.<AppVisualization>}

Obtains the AppVisualization containing the Visualization status and configuration for the app. This will return a Promise that will resolve when the AppVisualization status is ONLINE or if visualization is DISABLED for the app.

Parameters:
Name Type Argument Description
onUpdate function optional  A function that will be called with the AppVisualization every time it is polled. This provides the status and configuration as it transitions to ONLINE prior to Promise resolution.
Returns:
Type Description
Promise.<AppVisualization> Promise that will resolve with the AppVisualization once ONLINE, or if DISABLED for the app
Example
app.getVisualization()
       .then((appVisualization) => console.log(appVisualization.configuration));

function handleCurrentStatus(appVisualization) {
    console.log(`Current status is ${appVisualization.status}, statusMessage: ${statusMessage}`);
}

app.getVisualization(handleCurrentStatus)
       .then((appVisualization) => console.log(appVisualization.configuration));
Back to Top

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