Starting COGNITUM for Development

Starting the Server

Starting the COGNITUM Server

Starting the COGNITUM Console

Preferences & Tools in the COGNITUM Console

Installation of COGNITUM is a prerequisite for this chapter. For more information, see the COGNITUM Installation Guide.

Starting the Server

As a J2EE-compliant solution, starting COGNITUM consists in starting the development application server—Tomcat.

The built-in Agent application and the custom-designed applications are started automatically. The Agent application enables communications between the COGNITUM Console and the applications designed.

Figure: Communication flows between the COGNITUM Console and COGNITUM applications

Checking the COGNITUM server

When the COGNITUM server is running, the COGNITUM Console status bar reads COGNITUM Agent is running. All the designed applications must be listed in the COGNITUM Console tree.

Figure: COGNITUM Agent status in the COGNITUM Console

When the COGNITUM server is down, the COGNITUM Console status bar reads COGNITUM Agent is not running. The Agent application cannot be executed because the application server is stopped or because the Agent application has been shut down.

The COGNITUM Console can be started (see “Starting the COGNITUM Console”) only when the application server is up and running: the Agent application is launched and the COGNITUM Console can be accessed.

NOTE
The COGNITUM application server status can be checked in the Services window too.

Starting the COGNITUM Server

Even though the COGNITUM server can be started in a regular installation process and set in automatic startup mode, it may prove necessary to start, stop or check it subsequently.

The COGNITUM Console is live-linked to the applications through the Agent application. Because the Agent application is a built-in application that is started automatically, its being stopped often means that the application server is stopped too.

The application server must be restarted before the Agent application is started to allow:

  • communication with the other applications then listed in the COGNITUM Console, or
  • access to the COGNITUM Console when not already open.

The COGNITUM application server can be started in the Services window.

NOTE
The Agent application must not be stopped in the application server manager. The Agent application always starts automatically together with the application server.

To start the Application Server

  1. Select Start => Control Panel.
  2. Select Services panel.
  3. The COGNITUM 7.8 service should be started. If does not start, select Action => Start command.
  4. Close the Services panel.

Starting the COGNITUM Console

The COGNITUM Console is launched with a click on the Start button and the Programs => ITConcepts Software => COGNITUM => 7.8 => COGNITUM Console command.

NOTE
The COGNITUM application server must be running before accessing the COGNITUM Console, as documented in “Starting the COGNITUM server”.

To start the COGNITUM Console

  1. In Start, select choose Programs.
  2. In ITConcepts Software, choose COGNITUM and 7.8.
  3. Select COGNITUM Console.

Logging on to the COGNITUM Console

When the COGNITUM Console is launched, a dialog box is displayed to choose the COGNITUM Console language dialog box.

To log on to the COGNITUM Console

  1. Start the COGNITUM Console.
  2. In the COGNITUM Console dialog box, click in the Language drop-down list to change the language of the COGNITUM Console.
  3. Click OK. The COGNITUM Console is launched and gives you access to the authorized functions.

A new functionality, Language Chooser Pop Up has been introduced in cognitum 7.8 Which enables user to get rid of COGNITUM Console language dialog box every time he/she starts (Studio/Console). It‘s explained in the document Application with new Features and Improvements in COGNITUM 7.8.

Introduction to the COGNITUM Console interface

The COGNITUM Console is a tree window divided into a number of areas:

  • Tree
  • Property view
  • Menu bar
  • Toolbar
  • Status bar
NOTE
The COGNITUM Console interface (toolbar, menus, and tree) complies with the implicit distinctions between the elements of an application:

The COGNITUM Console window is opened when the COGNITUM Console program is started. The menus in the menu bar contain commands that are specific to the application, or to the property view in use. The COGNITUM Console window can be moved or resized:

  • To move the COGNITUM Console window, click on the title bar. Then, while keeping the mouse button pressed down, drag the cursor to the new position desired.
  • If the window display is too big or too small, resize it by pointing with the mouse on one of the edges. The cursor changes to a double arrow. Then press the left mouse button, and while keeping it pressed down, drag the cursor until the display size is reached. To reset the COGNITUM Console size, choose View => Default Size.

Title bar & Menu bar

The title bar of the COGNITUM Console makes it possible to control the window display features as in any other Windows application:

  • Restoring the window size
  • Moving the window on the screen
  • Resizing the window
  • Minimizing the window
  • Maximizing the window
  • Closing the application window The menu bar is positioned under the title bar and contains the menus available for the window. When one of these menus is chosen, the list of associated commands is displayed:
  • The File menu contains commands to create COGNITUM objects (such as data sources, views, and so on), and to import and export COGNITUM applications. It also contains the Exit command to close the application window.
  • The Edit menu contains standard commands to handle items in the tree: Cut, Copy, Paste, Delete.
  • The View menu contains commands to arrange the display mode of the COGNITUM Console.
  • The Tools menu gives access to the Java Console window if errors occur in the COGNITUM Console, to the Replace Text in SQL Definition command and to the Preferences one.
  • The Help menu enables to access the online documentation and read information about the software release.

Toolbar

The toolbar consists of a number of buttons that provide quick access to some of the most commonly used functions of the COGNITUM Console. Click any button to access the corresponding function.

To know which function a button stands for, leave the cursor on the button. The contextual button description is displayed.

Status bar

The status bar of the COGNITUM Console gives information about the activity of the Agent application.

Tree

The tree presents a hierarchical view of the objects of the COGNITUM applications.

NOTE
When the COGNITUM Console is started, the Applications tree item is expanded to provide a quick overall view of the applications available.

Each item is represented either as a leaf or a node.

  • A leaf is the lowest level of the hierarchy. It has itself no node or leaf.
  • A node can be either closed or open. A node is closed when it contains other items below it in the hierarchy but these are not displayed. To open a node, click on the plus sign + to the left of the icon to reveal the items at lower levels in the hierarchy. Conversely, with an open node, click on the minus sign - to the left of an open node to change the node back to a closed node.

The items in the tree are provided with context menus.

In the COGNITUM Console, context menus are necessary to perform operations on and with the tree items. To open a context menu, highlight an item and click the right mouse button. To choose a command, click the left button.

NOTE
To switch from a tree item to another one at the same level, the UP and DOWN keys can be used. The LEFT and RIGHT keys can be pressed to move downward and upward in the tree hierarchy.

Each item in the tree displays a set of parameters tabs on the opposite property view.

Property view

Whenever an object in the tree is clicked, its associated parameters are automatically displayed in the property view. When the information and/or entry boxes cannot be displayed in a single view, they are divided into a number of tabs.

Tabs are frequently used to enter new data or modify existing data in the COGNITUM Console. It is through tabs and dialog boxes that new data is entered, options are chosen, and elements from lists are selected. To switch from a tab to another one, simply click on its thumbnail.

Information boxes

There are some boxes whose sole function is to inform of a particular event or prompt to confirm the selection before switching tabs or executing a command.

A confirmation box prompts to confirm an entry change or a selected command. This is especially useful if and when wrong data has been entered or a command has been chosen by mistake because it allows to cancel the process before executing the modification or the command. It may also inform that a command may have results that are not directly or immediately visible. When the process is critical, this may be a warning box notifying possible data damage.

WARNING
To switch from a tab where parameters have been entered/modified to another tab or a tree item, a confirmation box may open and ask to validate or cancel the tab parameters if they have not already been saved with the Apply button.

A message box tells that the requested process has been properly executed. It may also inform that something is preventing the operation to be performed properly.

Managing columns

The COGNITUM Console also offers many possibilities for managing views, that is resizing, rearranging, and sorting areas of the screen. It is designed to view data with maximum visual comfort.

To this end, displaying and organizing the data is facilitated with a number of functions:

  • The vertical and horizontal scroll bars enable to view data outside the current window frame. The horizontal scroll bar displays table columns further to the right.
  • The tree and property views can be resized by adjusting their width according to the amount space the data takes up in it. A column with infrequently-used data can be also reduced or hidden.
  • The content of a column can be sorted in increasing or decreasing alphanumerical order with a click or shift-click on the column title.

Preferences & Tools in the COGNITUM Console

Some display and configuration facilities can be set and used generically in the COGNITUM Console:

  • Editor
  • File options
  • JAR Libraries
  • JDBC Driver Manager
  • System objects display
  • SQL definition editor

Java Code Editor

Some elements in property views or dialog boxes require Java code. When available, a click on the Edit button displays the system editor, for example to modify a Java class in the Java Library tab of an application.

Figure: Editor

In COGNITUM Console, to select the preferred editor in the COGNITUM Console

  1. Select Tools ==> Preferences ==> Editor
  2. Under the Editor panel, select:
    1. Editor of the system associated to the file type for the editor set in the operating system file configuration, or
    2. Choose an editor for a custom editor the path of which must be specified with the torch button
  3. Click Apply button

Figure Choosing the editor in the COGNITUM Console

Whereas in COGNITUM Studio, the editor can also be changed with the Tools menu. Select Tools ==> Editor Preferences...

TIP
A right-click on an application in the COGNITUM Console tree gives access to the Tools => Compile All Java Classes command. This function updates all the Java classes entered during the design of the application.

Files Options

Application elements can be duplicated or deleted safely in the COGNITUM Console. When they are associated with files and libraries, security can be set on duplicating or deleting them too.

The dialog box is accessible with Tools Preferences File Options.

Action: This column lists the actions on the COGNITUM Console elements. A line in this column must be selected to access the options in the facing column.

Figure: COGNITUM files management options

  • Behavior: When an action is selected, the corresponding Behavior cell can be clicked to select one of the following options:
  • Ask me: Whenever the selected action is triggered, a message box pops up and asks whether the files going with the target element should be considered as well.
  • Always action associated files: With this option, the files going with the element are processed too. For instance, when a resource is duplicated, the associated triggers, jsp, and so on, are duplicated too.
  • Never action associated files: Only the selected COGNITUM Console element is considered, that is description and configuration in the COGNITUM Console. The associated files are not processed altogether. For instance, it may proved useful to leave apart associated files which may run erratically if moved, or which are not located in the right folder. The associated files must be specified subsequently.

A click on OK validates the files options for the current COGNITUM Console session.

To select the files options in the COGNITUM Console

  1. In the COGNITUM Console, choose the Tools => Preferences => Files Options command.
  2. In the dialog box, select:

  3. Ask me for the editor supplied by default, or

  4. Always action associated files for the editor set in the operating system file configuration.
  5. Never action associated files for a custom editor the path of which must be specified with the torch button

  6. Click OK.

JDBC Driver Manager

Using this preference, JDBC Driver can be configured in COGNITUM and can be used in COGNITUM application as Data Source (Adding new JDBC Driver Manager Datasource).

To manage JDBC Driver manager Functionality

  1. Select Tools => Preferences…
  2. Preferences dialog box is displayed.
  3. Select JDBC Driver Manager from Left Tree.

Figure: JDBC Driver Manager Panel

The JDBC Driver Manager Panel consist of List of JDBC Drivers on left side and JDBC Driver Configuration of selected JDBC Driver.

Adding and Configuring JDBC Driver

Add new JDBC Driver

Click Add button, the JDBC Driver with name [New Driver] is then added to the JDBC Driver List.

Figure: Adding New JDBC Driver

Configuring JDBC Driver

  1. Select the JDBC Driver to be Configured from the JDBC Driver List.
  2. Enter the user defined name in Driver Name in the text box. The Driver Name must not be empty and should be unique in JDBC Driver list.
  3. Select Driver Installation tab.
  4. Click the Torch icon to select the Driver jar file.
  5. Enter the Driver Classname.

If the driver class is present in the selected jar file, the driver version gets displayed automatically.

Figure: Driver Installation tab

  1. Select Connection Configuration tab.
  2. Enter JDBC Url Template and click Add button, the JDBC url template is then added to the template list.
  3. To add connection properties, click Add button near Default Connection Properties lable. Enter name and value of the property.
  4. The Resoved JDBC Url is then formed by using JDBC Url template and default connection properties.

JDBC Url Template syntax:

JDBC Driver manager Functionality supports two placeholder syntaxes to build a JDBC connection URL from a template string and a list of properties.

Supported placeholder syntaxes:

1. "<property>":

gets replaced by the according value of this property

2. "[<$property>=<$value>|separator]":

the remaining properties are appended with the pattern "<$property>=<$value>"

separated by the separator (usually this is a single character)

Example:

template string: "jdbc:odbc:<DataSource>;[<$property>=<$value>|;]"

properties: DataSource=myDataSource, uid=myUid, password=myPassword

result: "jdbc:odbc:myDataSource;uid=myUid;password=myPassword"

The "<DataSource>" placeholder syntax should be replaced by the value of the according property.

All remaining properties (uid, password) are appended as the result of the "[<$property>=<$value>|;]"

placeholder.

Figure: Conncetion Configuration tab.

  1. Click Apply button to save the changes.

Deleting JDBC Driver

  1. Select the JDBC Driver from the list that you want to delete
  2. Click the Delete button, the selected JDBC Driver is then deleted from the list.
  3. Click Apply button to save the changes.

Restore Default Configuration

  1. Click Restore Defaults button to Restore default JDBC Driver Manager Configrations. This will Remove all the newly added JDBC Drivers and restores default configuations.
  2. Click Apply button to save the changes.

JAR Libraries

Using this preference, custom libraries can be added to the COGNITUM application dynamically through Console. After adding the Jar library and associating it with the application, its underlying java classes are available for that application immediately. These underlying classes can be used in the custom code written for different components in COGNITUM Console e.g. Library, Custom Resource, Computed Attribute, Resource Trigger, Variable, Services and Web Service Function. The java classes from custom Jar library can also be used inside the COGNITUM Studio for custom code on different components in FRM and WAF Forms.

To manage Jar Libraries,

  1. Select Tools => Preferences…
  2. Preferences dialog box is displayed.
  3. Select JAR Libraries from Left Tree.

Figure: JAR Libraries

Add Custom jar

  1. Select application from Applications list.
  2. Click Add button in Jar Libraries panel.
  3. Select Jar files from file chooser dialog
  4. Click Apply.

Remove Custom jar

  1. Select application from Applications list.
  2. Select jar file to be delete.
  3. Click Remove button in Jar Libraries panel.
  4. Click Apply.

Replace Custom jar

  1. Select application from Applications list.
  2. Select jar file to be replace.
  3. Click Replace button in Jar Libraries panel.
  4. Select Jar files from file chooser dialog from replacement
  5. Click Apply.

Load and Unload Custom jars

  1. Select application from Applications list.
  2. Check or Uncheck jar file to load and unload respectively.
  3. Click Apply.

Managing priority of Loading

Below are the steps to be followed to change loading priority of custom jar

  1. Select application from Applications list.
  2. Select jar file. Priority can be changed with up and down arrows.
  3. Click Apply.

System Objects Display

When a COGNITUM package is imported in an application, dedicated system objects are distributed in the COGNITUM Console tree. They are necessary to run the package.

The Display System Objects command from the View menu makes it possible to display/hide the package elements when it is selected/deselected.

Figure: Displaying system objects in the COGNITUM tree

When the Display System Objects command is chosen, the system objects are displayed in red so that they can be made out from the application own objects.

SQL Definition Editor

When a relational database is used, it may be necessary to replace a pattern (column prefix) in SQL requests, for example to import a package in an application connected to a specific SQL table.

The Replace Text in SQL Definition dialog box makes it possible to replace the pattern in the SQL requests for an application, one or more selected resources, or one or more dynamic roles.

NOTE
To replace the pattern in the SQL requests several resources or dynamic roles, the ctrl or alt key must be pressed down while select the tree elements.
NOTE
For more information, see “Applications”, “Resources”, or “

Roles

”. |

The Replace Text in SQL Definition dialog box is accessible:

  • with the Replace Text in SQL Definition command from the Tools menu, or
  • with the Tools => Replace SQL Definition command from the context menu of a selected application, or with the Replace SQL Definition command from the context menu of:
  • a resource when one or more RDBMS-based resources are selected, or
  • a dynamic role when one or more RDBMS-based dynamic roles are selected.

Figure: Editing SQL definition in the COGNITUM Console

Replace SQL names used by following items: The options selected define the scope of the replace function:

  • All resources and their attributes: This option is available at the application level to modify all the SQL definitions used in the resources and in the attributes of the application.
  • All dynamic roles: With this option, all the SQL definitions used by the dynamic roles of the selected application are modified.
  • The selected Resources and their Attributes: One or more resources in an application can be selected so that their SQL definitions are modified in bulk. The Search box automatically retrieves the prefix text to change.
  • Deselect the option when the change must occur only in the resource from which the Replace SQL Definition command has been selected.
  • The selected Dynamic Roles: One or more dynamic roles in an application can be selected so that their SQL definitions are modified in bulk. Deselect the option when the change must occur only in the dynamic role from which the Replace SQL Definition command has been selected.

Application: This list box is available at the application level. It makes it possible to change the scope of the function for another application.

Search: In this box, the prefix of the current SQL definitions must be entered. When one or more resources are selected, this box is automatically filled in.

Replace: The replacement text must be entered in this box. To replace the text with a blank value, enter a single space.

A click on OK triggers the changes and closes the dialog box.

To replace text in an SQL definition

  1. Select:

  2. an application, or — one or more resources, or — one or more dynamic roles.

  3. Open the Replace Text in SQL Definition dialog box with,

  4. Replace Text in SQL Definition from the Tools menu of the COGNITUM Console menu bar, or

  5. Replace SQL Definition from the Tools menu of the context menu of the selected application, or
  6. Replace SQL Definition from the context menu of one of the selected applications or dynamic roles.

  7. Choose the scope option(s) of the change when available:

  8. Choose the All resources and their attributes option to apply the change in all the resources of the selected application.

  9. Choose the All dynamic roles option to apply the change in all the dynamic roles of the selected application.
  10. Choose the The selected Resources and their Attributes option to apply the change in all the selected resources you have selected. Deselect it to apply the change only in the resource you have selected last before choosing the Replace SQL Definition command.
  11. Choose the The selected Dynamic Roles option to apply the change in all the selected dynamic roles you have selected. Deselect it to apply the change only in the dynamic role you have selected last before choosing the Replace SQL Definition command.

  12. For an application, you can change the application in the Application list box.

  13. In the Search box, enter the text you want to change.
  14. In the Replace box, enter the new text.
  15. Click OK.

results matching ""

    No results matching ""