Skip to main content

Templates and their Properties

Template Actions are actual XML element definitions residing in Template Libraries.

All the elements that may appear in the Process Design Editor have properties, which are managed in the Properties panel of the Editor. Different element types each have a distinct set of properties, which, after the element is dragged from the Tools Palette, may be configured to define the specific requirements of an instance of the element, as it is to be applied in the Context of the Process.

Elements are also richly configurable as to how they are represented in the Process Design Editor in terms of Colour, decoration and even their associated properties. This level of configuration is normally used to signify distinctive Types of elements, which typically associate with a specific, underlying process element such as a Class. A standard set of types is pre-configured as a builtin set in Enactor Tools.

So, for example, all of the Action elements available in the Actions Menu of the Tools Palette are represented by green Icons, among which the End Process element is decorated with a red Stop Sign, by contrast with the Assign Action, which is decorated with a blue '=' sign; these being visual cues as to their function. The two elements also have different properties. Significantly, both has a Type property for which the values are 'End Process' and 'Assign', respectively, which also appears in the Icon. The Type property can in fact, be changed after selecting the element into the Editor, thus changing both the appearance and properties of the element, although this is not normally advisable, and the designer needs to be mindful that the underlying Class represented by the element is not automatically changed.

This level of configuration is not normally required for the development or customisation of actions since only a standard set of types, those builtin, is normally required. However, Customers may, for example, develop a Class that is highly reusable across a range of applications and wish to give the element that represents it in Processes a highly distinctive identity in the Tools Palette. This could be achieved by defining a new Type

However, above the level of Type configuration, a range of pre-configurations based on properties other than Type may be required, for convenience, available in the Tools Palette. Thus, a Tools Palette menu based on a Template Library may be created containing elements derived from the builtin Types but with set values applied in other properties. This is the usual purpose of Template Libraries.

Template Libraries

Template Libraries contain XML elements of the type that may be included in a Process definition by the Process Design Editor. The elements typically specify an association with some functional element such as a Class and include description of an Icon by which they may be represented in the Process Diagram. When made available to the Resource Library in a workspace the libraries appear as a Menu in the Tools Palette in which the elements they contain are represented and may be dragged into the Editor Canvas.

Template Libraries may also be useful in situations in which a Process design is being developed using elements for which the actual, underlying elements to be used at runtime are not available at design- time. Whereas other Tools Palette and Resource library elements typically represent the actual underlying elements of each category (e.g. the Classes associated with Actions) this need not be the case with Template Library elements; the workspace may contain only the element definition XML. Of course, the Process Design Editor will detect and flag errors associated with these elements but the errors will not necessarily manifest in a runtime context in which the underlying elements are available.

Using Template Libraries

Template Libraries may be imported into a workspace and added to the Resource Library to provide design-time definition of elements for use in a Process design. Template Libraries also provide a level of convenience in that they are added as enhancements to the Tools Palette and so the elements they contain become available as Tools Palette Icons, avoiding the need to search and drag them from the Resource Library.

Creating New Template Libraries

The existing Template Library (My Templates) added to a Resource Library in the sequence just described would have been created in another Enactor Tools workspace as follows. The right-mouse- menu of the Process Design Editor includes the Edit Library option, which provides access to the Create Templates facility for the creation and maintenance of Template Libraries. To create a new Template Library, use the New Library button and proceed as shown below to create 'My Templates':

Creating New Template Libraries           Creating New Template Libraries

With the New Library selected use Add Group and specify a name for the New Group as illustrated below. The Group will appear as a new Menu in the Tools Palette.

Add Group  Add Group
Add Group

Adding Components to a Template Library

We can now add components to the new library by selecting the Add Component option in the Create Templates panel. When this option is used the list of components (Process elements) available for selection depends upon the Process currently open in the Process Design Editor. These new elements will become available to drag-and-drop from the Tools Palette.

Adding Components           Adding Components

Various default settings for these elements including the Palette Icon and the colour of the element Icon in the Process Design Editor may be specified, giving these Custom elements a distinctive appearance, specific names and types etc.

Process Design Element Properties

The properties of Process Design Elements determine their appearance, identity and behaviour and although some properties are common to all elements or categories of elements the set of properties specific to a given element depends finally upon the element type in the basic Tools Palette from which it ultimately derives. Thus, all elements provide for a Name, ID (StateID/ActionID), Type, Class Name, Inputs and Comments. States universally provide for Events and a flag indicating availability to respond to View Events. They also include Outputs and a URL property that may be but is not always used to specify an associated Page Definition (e.g. Iterator States have no associated Page Definition). States that include a Page Definition also provide for a range of properties associated with it. Actions typically have Outputs and Outcomes, with exceptions such as End Process, which has no Outputs and specifies the Outcome of the Process, not the Action itself. The Call Process specifies an Execute Process ID. These properties may be pre-configured with values when dragged from the Tools Palette or the Resource Library into the Process Design Editor Canvas but are always modifiable to design-specific requirements once integrated into the Process.