Persistate

Common operations

Hide Navigation Pane

Common operations

Previous topic Next topic No directory for this topic  

Common operations

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function Mail us feedback on this topic!  

The Persistate Generator and the Persistate Configurator applications both expose the operations listed in this topic.  This is because these operations are equally relevant to the application developer and system administrator.  For operations that are available only in the Generator application, see Generator only operations.  All of the operations listed here take only the default Execution parameter.

Domain operation group

This operation group concerns operations which are performed on a Domain target object.  The operations can be found in the Domain main menu and right click context menu.  These will be available if the Domain Form or the Domain Tree is selected.  All these operations are also executed by the New operation when applied to the appropriate collection.

Create database

This operation creates a new Persistate database, and adds it to the Domain.Databases collection.  Persistate displays the New Database Form in a modal dialogue.  Enter a Name for the new database, select the DBMS you want to use in the Database Type, enter a Connection String and click Ok.  This string should contain credentials sufficient to create a database in the server it addresses.

Persistate creates the database, along with a minimum set of infrastructure database objects.  However, you still can't store objects on this database.  You must first add the Database object to the Package.TargetDatabases collection of every Package whose objects you want to store in the database.  See the Installing and running the Persistate Server walkthrough for an example of doing this.

Create server

This operation creates a new Persistate Server object corresponding to a particular computer.  This does not install the Persistate Server on the computer.  Follow the sequence shown in the Installing and running the Persistate Server walkthrough for details of doing this.  When you first run Configurator and create a root database, this also creates a Server object for the computer on which you do this.  In all other circumstances, you should use this operation to create a Server object for each Persistate server you want to run.

When you execute this operation, Persistate displays the New Server Form.  Enter the host name of the new server.  This name should be correspond through normal name resolution protocols to a computer on which you have installed, or will install, the Persistate Server software.  At this point you can also add particular packages to service, though this can be done at a later stage.  Click Ok.  The new server should now appear on the Server Grid.

Persistate now attempts to check the state of the Persistate service on the new server.  If the server is not the local machine, this will depend on you having sufficient privileges to interrogate service statuses on remote machines.  All being well, you should see the service status of Stopped alongside the server name on the Server Grid.  If there is a problem, for example if the service is not installed or you cannot access the service state, you will see the status of Unavailable, together with a message indicating the problem. See Start service below for details on how to start the service on the server.

Create environment

This operation creates a new Environment object in the local Domain.  When you execute this operation, Persistate display the New Environment Form.  Enter a name for the new Environment, select the database that is to hold it, and click Ok.  The holding database will by default also hold persistent trees for all packages that are created,  imported or made available in the environment.  You can't change the database later.

In order to store the new Environment object in the holding database, the database needs to be able to store objects for the Persistate system package.  If it is not yet set up to do this, Persistate will ask for confirmation to set this up.  If you give it, this is done, the new Environment object is stored in the database and added to the Domain.Environments collection.

Environment operation group

This environment group has only a single operation which is common to both Generator and Configurator.  There are more operations in this group which are not enabled in the Configurator - see Generator only operations.  The operations can be found in the Environment main menu and right click context menu.  These will be available if the Environment Form or the Environment Grid is selected.

Import package

This operation imports a package into an Environment.ProductPackages collection.  It is important to understand the distinction between the ProductPackages and AvailablePackages collections.  The former is a contained collection so the packages in there 'belong' to the environment.  New packages can be created in this collection only by creating or recreating the package using Generator, or by importing a package with this operation.

The AvailablePackages collection is an associated collection.  A package can appear in this collection in any number of environments.  Packages in this collection can be 'used' by other packages in the environment, and also have a persistent tree in the environment.  By default, all packages in an environment's ProductPackages collection are also added to the environment's AvailablePackages collection.

To import a package you need its deployed serialised file.  This file is called <package name>_Deploy.ser, and is created in the solution folder by the Deploy operation.  The file contains all the code modules for the package along with all the metadata (object classes, layouts, etc) and all configurative data in the development tree at the time of deployment.

When you execute this operation, Persistate displays a standard open file dialogue box.  Select the _deploy.ser file that you want to import and click Open.  Persistate deserialises the package from the file and adds it to the collection.  This will also create the necessary tables, indexes and other database objects in the environment's holding database.

Layout style operation group

This operation group concerns operations which are performed on a LayoutStyle target object.  The operations can be found in the Layout Style main menu and right click context menu.  These will be available if the Layout Style Form or the Layout Style Grid is selected.

Copy style

This operation creates a copy of the target LayoutStyle object and adds it to the Domain.LayoutStyle collection.  The name of the copy will be the name of the original with (2) appended, or (3) etc. if necessary.  Use this as an alternative to creating a new LayoutStyle, when an existing one is close to what you want.

Apply style

This operation applies the target LayoutStyle to the current window.  Don't confuse this with the Apply Style standard operation (See Standard Persistate operations) which does not require a target object and puts up a dialogue giving you a choice of layout styles.  This operation does not put up a dialogue, but applies the target style immediately.

This operation executes in the user interface module.  This means that in Viewer-Server configurations, it executes in the viewer.

Service operation group

This operation group concerns operations which are performed on a Server target object.  The operations can be found as operation columns on the Server Grid and on the right click context menus of the Server Grid and Server Form.

Start service

This operation starts the Persistate service for the target Server object.  However, before you can start the service on a server, you must add at least one serviced package.  To do this, display the Server Form, or highlight the server in the Server Grid, and its Serviced Packages Grid should appear below.  To add serviced packages, simply use the New operation to add a new row, and select the Environment and Package you want the server to service.

When you execute this operation, the service should start promptly, and display a Service State of Running within a second or two.  If there is a problem, Persistate will display a state of Unavailable, together with a message detailing the problem.

You should always be able to start the service on the computer running Generator or Configurator.  If you have sufficient permissions to start services remotely, you should also be able to start the service on other computers.

Caution

You must always use Generator or Configurator to start the service.  If you attempt to start it by other means, then the service will start, but will not service any packages.

Stop service

This operation stops the Persistate service for the target Server object.  The service usually takes fifteen to thirty seconds to shut down.  If there are any Viewer sessions active, then the user will be shown a warning popup message and the sessions will be terminated immediately.

You should always be able to stop the service on the computer running Generator or Configurator.  If you have sufficient permissions to stop services remotely, you should also be able to stop the service on other computers.