Skip to main content

A Look at a Production Definition

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 existing production class in your choice of IDE. This following shows a simple example of a production:

Class Demo.FloodMonitor.Production Extends Ens.Production
{

XData ProductionDefinition
{
<Production Name="Demo.FloodMonitor.Production">
  <ActorPoolSize>1</ActorPoolSize>
  <Item Name="Demo.FloodMonitor.BusinessService"
        ClassName="Demo.FloodMonitor.BusinessService"
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
  </Item>
  <Item Name="Demo.FloodMonitor.CustomBusinessProcess"
        ClassName="Demo.FloodMonitor.CustomBusinessProcess"
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
  </Item>
  <Item Name="Demo.FloodMonitor.GeneratedBusinessProcess"
        ClassName="Demo.FloodMonitor.GeneratedBusinessProcess"
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
  </Item>
  <Item Name="Demo.FloodMonitor.BusinessOperation"
        ClassName="Demo.FloodMonitor.BusinessOperation"
        PoolSize="1" Enabled="true" Foreground="false" InactivityTimeout="0">
  </Item>
</Production>
}
}

Note the following points:

  • The production is a class, specifically is a subclass of Ens.ProductionOpens in a new tab.

  • The XData ProductionDefinition block holds the configuration information for the production.

  • Each <Item> is a business host; these are also called configuration items.

  • Each business host refers to a class. ClassName specifies the class on which this host is based. This means that when the production creates an instance of this business host, it must create an instance of the specified class.

  • The Name of a business host is an arbitrary string. Sometimes, it can be convenient to use the class name for this purpose, as in this example. This convention does not work when you create a large number of business hosts that use the same class.

    It is important to establish naming conventions at an early point during development. See Best Practices for Creating Productions. An absence of naming conventions will lead to confusion.

  • The other values in the XData block are all settings. At the top, <ActorPoolSize> is a setting for the production. Within the business host definitions, PoolSize, Enabled, Foreground, and InactivityTimeout are settings for those business hosts.

FeedbackOpens in a new tab