Developing Ensemble Productions
[Home] [Back] [Next]
InterSystems: The power behind what matters   

This chapter introduces the process of developing productions. It contains the following topics:

For an introduction to Ensemble concepts and options, see Introducing Ensemble. For information on how Ensemble processing works, see the first chapter in Monitoring Ensemble.
Environmental Considerations
You can use Ensemble only within an Ensemble-enabled namespace that has a specific web application. When you create classes, you should avoid using reserved package names. The following subsections give the details.
Ensemble-enabled Namespaces
An Ensemble-enabled namespace is a namespace that has global mappings, routine mappings, and package mappings that make the Ensemble system classes and data available to it. For general information on mappings, see Configuring Namespaces in the chapter “Configuring Caché” in the Caché System Administration Guide. (You can use the information in that section to see the actual mappings in any Ensemble-enabled namespace; the details may vary from release to release, but no work is necessary on your part.)
Of the system-provided namespaces, only ENSEMBLE and ENSDEMO are Ensemble-enabled.
Once you have successfully installed Ensemble, any new namespace that you create is by default Ensemble-enabled. If you clear the Make this an Ensemble namespace check box when creating a namespace, Ensemble creates the namespace with Ensemble disabled.
Except for the ENSEMBLE and USER namespaces, all system-provided namespaces are overwritten upon reinstallation or upgrade. For this reason, InterSystems recommends that customers always work in the ENSEMBLE namespace, the USER namespace (not suitable for Ensemble use), or in a new namespace that you create. For information on creating a new namespace, see Configuring Data in the chapter “Configuring Caché” in the Caché System Administration Guide.
Web Application Requirement
Also, you can use Ensemble in a namespace only if that namespace has an associated web application that is named /csp/namespace, where namespace is the namespace name. (This is the default web application name for a namespace.) For information on defining web applications, see “Applications” in the Caché Security Administration Guide.
Reserved Package Names
In any Ensemble-enabled namespace, avoid using the following package names: Demo, Ens, EnsLib, EnsPortal, or CSPX. These packages are completely replaced during the upgrade process. If you define classes in these packages, you would need to export the classes before upgrading and then import them after upgrading.
Also, InterSystems recommends that you avoid using any package names that start with Ens (case-sensitive). There are two reasons for this recommendation:
A Look at a Production Definition
Although you create and configure productions in the Management Portal, it is instructive to get started by looking at the definition of a production in Studio. This following shows a simple example of a production that is defined in the ENSDEMO namespace:
Class Demo.FloodMonitor.Production Extends Ens.Production

XData ProductionDefinition
<Production Name="Demo.FloodMonitor.Production">
  <Item Name="Demo.FloodMonitor.BusinessService" 
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
  <Item Name="Demo.FloodMonitor.CustomBusinessProcess" 
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
  <Item Name="Demo.FloodMonitor.GeneratedBusinessProcess" 
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
  <Item Name="Demo.FloodMonitor.BusinessOperation" 
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
Note the following points:
Development Tools and Tasks
Ensemble productions consist primarily of class definitions and some supporting entities. The process of creating a production can require a small amount of programming or possibly a large amount, depending on your needs. As noted earlier, Ensemble provides graphical tools that enable nontechnical users to create business logic visually. These tools generate class definitions as needed.
While you develop a production, you use both the Management Portal and Studio as follows.
Portal Tasks
In the Management Portal, you use wizards to define and compile the following:
You also use the Management Portal for the following additional tasks:
Studio Tasks
In Studio, you define and compile the following classes:
Also see other topics in the chapter Less Common Tasks.”
Available Specialized Classes
Ensemble provides many specialized adapter and business host classes that can reduce your development and testing time. For a summary of the most common options, see Overview of Ensemble Options in Introducing Ensemble. Rather than listing the specific classes, that chapter describes scenarios for which Ensemble provides tools. It provides references to the applicable books.
Using Studio in Ensemble
This section briefly discusses additional Studio features and notes that apply when you are creating an Ensemble production. It contains the following sections:
Ensemble Features in Studio
The Ensemble features of Studio become active whenever Studio is connected to an Ensemble-enabled namespace. These features are as follows:
Production Tab
For an Ensemble-enabled namespace, the Workspace window includes the Production tab. This tab lists classes related to Ensemble productions. This has the following folders:
Folder All classes in this folder are subclasses of...
Adapters Ens.Adapter, including inbound and outbound adapters
Business Operations Ens.BusinessOperation.
Business Processes Ens.BusinessProcess.
Business Services Ens.BusinessService.
Data Transformations Ens.DataTransform.
Messages Ens.Request or Ens.Response.
Productions Ens.Production.
Additional Items in Other
The Other folder in the Workspace window can contain additional items that may be unfamiliar to you. These include the following:
Option to Create a Project from a Production
Ensemble makes it easy to create a Studio project from a production, so that you can easily export a production from one system and import it into another. Use the following procedure:
  1. In the Workspace window, right-click a production.
  2. Enter a project name and click OK. A project file is saved in the current namespace. The project includes all the detectable items for this production. This includes:
Exporting and Importing Productions
You can either use the management portal or Studio to export and import a production. The management portal makes it easier to include all required components in the export. For information on using the management portal to export and import a production, see Deploying a Production.
To export a production and then export it into another namespace or instance, do the following in Studio.
  1. Create a project from the production. See the previous topic.
  2. Export the project as an XML file.
  3. Import the XML file into another namespace or instance.
For information on importing and exporting projects, see Using Studio.
If the production requires data that is stored directly in globals, see Managing Globals in Using Caché Globals; this provides information on exporting and importing globals.
You can also export productions from the Management Portal. See Configuring Ensemble Productions.
Notes on Editing the Production Class
It is generally best to edit the production class within the Management Portal. By doing so, you can avoid introducing syntax errors and you take advantage of the type validation that the portal provides.
There are a couple of reasons, however, in which you might want to edit the class in Studio:
The order of <Item> elements in the XData block controls one of the sorting options on the Production Configuration page. On this page, when you sort by number, the items are displayed in the order they are listed in the XData block, which is (initially) the order in which they were added to the production.

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA