Connecting Extensions to Web Application

To connect extensions to Foresight Analytics Platform web application, the following installations and settings must be executed:

  1. Web application back end of Foresight Analytics Platform.

  2. Extensions of Foresight Analytics Platform.

  3. Designer of business applications back end.

How to connect extensions to Foresight Analytics Platform web application:

  1. Open the PP.xml file containing settings of Foresight Analytics Platform web application for edit.

  2. Create a new subsection with extension connection settings in the <modules> section. Description of subsections of the <modules> section and attributes and subsections that are required for the specified attributes are given below.

  3. Save changes to PP.xml file.

  4. Restart BI server which is used by web application back end.

  5. Open web application of Foresight Analytics Platform.

As a result, the extension will be connected to the Foresight Analytics Platform web application and the welcome screen will display the button to work with extension.

Subsections for Extensions Setup

Names of subsections of the <modules> section for extensions setup:

Attribute/section Description
<entryform> Interactive Data Entry Forms
<algorithm>  Calculation Algorithms
<agreement> Business Process Management

Attributes and Subsections for Extensions Setup

Set the following attributes and subsections for the subsections mentioned above:

Attribute/section Description
name Name of extension which will be displayed in the web application welcome screen.
url Path to the extension in designer of business applications back end. It is specified in the format:

url="http://<server>/DBA_App_v9.2/#/<extension>"

The following can be set as extension:

  • agreement. Business process management.

  • dataentryform. Interactive data entry forms.

  • elt. Calculation Algorithms.

If web application and designer of business application back end are located at the same server, the path can be specified starting from the DBA_App_v9.2 virtual directory, for example:

url="/DBA_App_v9.2/#/dataentryform"

visible

The attribute that extension is displayed in the web application welcome screen. Available values:

  • 0. The extension is not displayed.

  • 1. The extension is displayed in the welcome screen.

  • 2. The extension is displayed in the object navigator.

data

Extension type. Available values:

  • 2168577. Business process management.

  • 2103041. Interactive data entry forms

  • 268033. Calculation Algorithms.

classId Identifier of extension object class. Class identifier corresponds to the type given above. It is specified in the format:

classId="[<class>]"

For example:

classId="[268033]"

eventHandler

Identifier of the module, which implements the CopyCustomObject custom method for redetermining a standard method for copying extension objects. When a standard method is used, an object is copied without dependent objects, which results in the object inoperability. The use of a custom method allows for correct copying of extension objects with dependent objects.

To use a custom method, set the eventHandler attribute and the useCopyHandler attribute.   

Specify the eventHandler attribute as follows:

eventHandler="<module_identifier>"

For example:

eventHandler="UNIT_WEB_METHODS"

NOTE. To view identifier of the selected module in the desktop application, open the Object Properties dialog box.

To redetermine a standard method for copying extension in the module, implement the CopyCustomObject custom method. The developed CopyCustomObject custom method in the specified module should contain the following signature:

Public Function CopyCustomObject(SourceKey, DestFolderKey: Integer; Name: String=""; Id: String=""): Integer;

Parameters of the CopyCustomObject method:

  • SourceKey. Key of copied object.

  • DestFolderKey. Key of the folder, to which the object will be copied.

  • Name. New object name.

  • Id. New object identifier.

useCopyHandler

Indicates whether extension object should be copied using the custom method implemented in the module specified in the eventHandler attribute. When a standard method is used, the object is copied without dependent objects. The use of a custom method allows for correct copying of extension objects with dependent objects.

Available attribute values:

  • true. To copy the extension object, use the CopyCustomObject custom method.

  • false. To copy the extension object, use standard copy method.

actions

Operations available for the extension in the web application welcome screen. Available operations:

  • 0. Open an object.

  • 1. Create a new object.

NOTE. Parameter is unavailable. Reserved for future use.

  • 2. Data import.

Operations are specified in squared brackets comma-separated. For example:

actions="[0]"

<moduleUrlSettings> Determine a string:

<moduleUrlSettings sign="?"/>

Change character to specify parameters from # to ?.
This string is required in order that the Foresight Analytics Platform web application and designer of business applications web interface will be compatible.
<images>

The section with icon settings for extension. It contains the following subsections:

  • <welcomeScreenIcon>. Icon settings in the welcome screen. The icon size is 32x32 pixels.

  • <addressBarIcon>. Icon settings in address field. The icon size is 16x16 pixels.

  • <documentsIcon>. The icon settings for extension documents in the list of recent documents in the welcome screen. The icon size is 16x16 pixels.

Those sections contain the same set of attributes:

  • imageListId. Identifier of sprite with images.

  • rowIndex. Index of string in sprite containing an icon.

  • columnIndex. Index of column in sprite containing an icon.

Indexing of images in sprites contains from zero.

For icons of 32x32 pixels, the system sprite with the modules32 identifier is used. The sprite contains one string, determine the following columnIndex for extensions:

  • 8. Calculation algorithms.

  • 9. Business process management.

  • 10. Interactive Data Entry Forms.

For icons of 16x16 pixels, the system sprite with the modules16 identifier is used. The sprite contains one string, determine the following columnIndex for extensions:

  • 8. Calculation algorithms

  • 12. Business process management

  • 13. Interactive Data Entry Forms.

If you want to use your icons from your sprite, then after the <Modules> section add the <imageLists> section containing subsections with sprite settings.

Example

The example is given for the PP.xml file containing connection settings for Calculation Algorithms and Interactive Data Entry Forms extensions to the Foresight Analytics Platform web application:

<pp>

    <service url="http://localhost/FPBI_App_v9.2x64/axis2/services/PP.SOM.Som" />

    <metabase id="REPOSITORY" recentObjects="true" />

    <cultures>

        <culture cultureName="ru" />

        <culture cultureName="en" />

    </cultures>

    <modules>

        <algorithm name="Indicators calculation algorithm"

            url="/DBA_App_v9.2/#/elt"

            visible="1"

            data="268033"

            classId="[268033]"

            actions="[0]"

            eventHandler="P10002_M_CALC_SERVICE"

            useCopyHandler="true">

            <moduleUrlSettings sign="?"/>

            <images>

                <welcomeScreenIcon imageListId="modules32" rowIndex="0" columnIndex="8"/>

                <addressBarIcon imageListId="modules16" rowIndex="0" columnIndex="8" />

                <documentsIcon imageListId="modules16" rowIndex="0" columnIndex="8" />

            </images>

        </algorithm>

        <entryform name="Data entry forms"

            url="/DBA_App_v9.2/#/dataentryform"

            visible="1"

            data="2103041"

            classId="[2103041]"

            actions="[0]"

            eventHandler="UNIT_WEB_METHODS"

            useCopyHandler="true">

            <moduleUrlSettings sign="?"/>

            <images>

                <welcomeScreenIcon imageListId="modules32" rowIndex="0" columnIndex="10"/>

                <addressBarIcon imageListId="modules16" rowIndex="0" columnIndex="13" />

                <documentsIcon imageListId="modules16" rowIndex="0" columnIndex="13" />

            </images>

        </entryform>

    </modules>

</pp>

 

As a result, the web application welcome screen will contain buttons to work with extensions:

See also:

Basic Web Application Settings | Installing Foresight Analytics Platform Extensions