A NEW TODAY IS DAWNING!

Tutorial: Working with the XRI Package


Introduction

The xri package contains standard components for accessing the Developer Repository Service. Using these components you can build features to maintain your application source.

The xri package components is used to connect to a Repository Service and issue Repository Instructions. The package provides a high-level interface for issuing common Repository Instruction.

NOTE: Repository Instructions can cause serious damage to your application, including corruption and complete loss of source code. Always maintain adequate backups of your application source.


Background

BuildProfessional 8 provides access to the open Application Repository through the Repository Service. The Service allows developers to add, modify, delete, generate and cross reference application components. Using the xri components, developers can build applications to programmatically modify components.


Main Features

The xri components provides the following primary features:


Initialisation


Initialisation of variables and parameters for the common functions. Uses the XML data supplied with the Developer for basic Repository definitions (available component types etc) and user defaults.

Functions: xriInit


Connect / Login to Repository Service


Connect to a Repository by supply server, service and user credentials.

Functions: xriRemoteLogin, xriRemoteLogoff, xriConnect, xriDisconnect.


Create and Issue Request Files


Functions to create basic requests and issue them against the Repository Service.

Functions: xriCreateRI, xriRunRI


Get Component Lists and Component Properties


Simple functions to retrieve lists of components and properties for specific components. These use a similar filtering mechanism as used in the Developer.

Functions: xriGetComps, xriGetCompProps


Getting Started

The best way to become familiar with the xri components is to examine the examples. Complete the following steps to run the xri examples:

  1. Create a new, empty application.
     
  2. Import the following packages from Application / Import Component Packages. Select the "Internet" tab for the latest version of the packages.

    • The msg Package.
    • XML Access Components.
    • The xri Package.
       
  3. Regenerate the complete application.
     
  4. Run the Process rxiMain and test the examples. Before running the examples ensure that the Repository Service is running.

Building a Developer Application

 

Repository Definitions

The file xdevRepositoryDefinitions.xml in the bpxml directory contains information about component properties including what properties are used per component type. Use this file to dynamically obtain component property information. For example if a new property is introduced to a Variable component, then xdevRepositoryDefinitions will contain that information.


The rep Package


The "rep" package contains data dictionary items (including ranges and lookup tables) for all component properties. Use these dictionaries if you want to build screens that display or modify a property. For example, when displaying a data dictionary edit code, associate the dictionary repEditCode to a drop down field. The dictionary repEditCode has a lookup table with all valid edit code values. If a new edit code is introduced, you can simply update the "rep" package.