User Interface: Business Rule
A business rule is a collection of component sets or business rule components that can be used to incorporate logic or to add, change, or remove data or print parameters after a print request is submitted but before printing occurs. Business rules are similar to rules, but provide more robust functionality. Business rules can be designed using the Configurator or programmed using XML.
You can create and edit business rules in Application Design

The following characters are permitted in the name: letters, numbers, parentheses, square brackets, ampersands, plus signs, commas, semi-colons, and tildes. Additionally, the following characters are permitted but cannot begin or end the name: spaces, double quotation marks, single quotation marks, hyphens, underscores, periods, and grave accents. For letters, the case that you specify is displayed, but case is ignored when Loftware Enterprise SP interprets a name. If you will be installing the Loftware Enterprise SP application on a computer running Windows Server, and transferring data between Loftware Enterprise SP instances, see the "Transferring Data in a Compressed File" section of the Loftware Enterprise SP Data Transfer Guide.
The following ribbon tabs and panes are displayed when a business rule is created or opened in Application Design
Ribbon
When a business rule is opened in Application Design

Button |
Command |
Description |
---|---|---|
|
New |
Create a new form, application, or business rule. |
|
Open |
Open an existing form, application, or business rule. |
|
Save |
Save the displayed object. |
|
Undo |
Undo the most recent change that you made. |
|
Redo |
Redo the most recent change. |

Command |
Description |
---|---|
Close |
Close the current object. |
Close All |
Close all objects that you have open in Application Design |
Save |
Save the displayed object. |
Save As |
Save a copy of the displayed object under a different name. |
Import |
Import an object that was previously exported to a separate file outside of Loftware Enterprise SP. |
Export |
Export an object to a separate file outside of Loftware Enterprise SP. Tip: You can use this capability to transfer an object from one instance of Loftware Enterprise SP to another. |
Version Control
The following commands are available only for objects that are version controlled The following types of objects are version controlled when saved in a version-controlled folder: label templates, forms, images, layer objects, layouts, reusable objects, field data catalogs, applications, business rules, processes, workflow templates, and data services. Images do not support minor versions..
Command |
Description |
---|---|
Check In |
Save the current version of the object and make this the object available for publishing or for others to check out. Checking in creates a version that can no longer be altered. Available only to the user who checked out or has taken control of the object. |
Check Out |
Create a new, editable version of the object, incrementing the minor version number. Other users cannot change the object or view the version that you have created until it is checked in. Available only for an object that is checked in. |
Undo Check Out |
Undo any changes made since the object was most recently checked out, and then check it in. The checked out version is discarded and the version number is decremented to that of the previous version. If you took control of the object from the user who checked it out, changes made by the other user since it was last checked out are discarded. Available only to the user who checked out or has taken control of the object. |
Publish |
Check in and create a new published version of the object, incrementing the major version number and setting the minor version number to zero. Available only to users with Publish (PB) permission for |
Undo Publish |
Delete the published version WARNING: If you have already initiated a print job using the published version or have used or link to that version, you may get unexpected results. Available only to users with Publish (PB) permission for |
Take Control |
Seize control of an object that is checked out to another user. The object becomes checked out to you instead. Any changes saved by the user who checked out the object are retained. Changes that were not saved are discarded. Available only to users with Admin (A) and Write (W) permissions for the object type. |

The following command is available to allow you to test the currently selected component block.
Button |
Command |
Description |
---|---|---|
|
Run |
Run the business rule using the currently selected trigger event to test it. No process is used. Important! When you test a business rule, that business rule is run and can affect the Loftware Enterprise SP environment. For example, testing a business rule that is designed to alter a label template, to change a value in a database, to submit a job, or to cancel a job actually performs those actions. The Business Rule Test Results dialog is displayed, along with the Display User Event Log button. Clicking the Display User Event Log button displays the contents of the user-rules.log files. |
Additionally, selection of commonly used component blocks are displayed on the Home tab. They are available for insertion into the currently displayed component set after you have added at least one trigger to the business rule. For additional types of component blocks, click the Insert tab.
For information about the different types of component blocks, see Business Rule Configurator Reference.

All available types of component blocks are displayed on the Insert tab. They are available for insertion into the currently displayed component set after you have added at least one trigger to the business rule. You can insert a new component block into the component set by dragging the button for the type of component block from the ribbon to a Drop block here marker in the Configurator pane.
For information about the different types of component blocks, see Business Rule Configurator Reference.
Additionally, the following command is available to allow you to test the currently selected component block.
Button |
Command |
Description |
---|---|---|
|
Run |
Run the business rule using the currently selected trigger event to test it. No process is used. Important! When you test a business rule, that business rule is run and can affect the Loftware Enterprise SP environment. For example, testing a business rule that is designed to alter a label template, to change a value in a database, to submit a job, or to cancel a job actually performs those actions. The Business Rule Test Results dialog is displayed, along with the Display User Event Log button. The Display User Event Log button displays the contents of the user-rules.log files. |

Button |
Command |
Description |
---|---|---|
|
Properties |
Open the Properties pane and display the properties of the business rule. |
|
Tags |
Add or change the tags assigned to the business rule. For more information, see Categorize a Process, Business Rule, or Workflow Template. |
|
Configurator |
Display the business rule in the Configurator. |
|
XML |
Display the business rule in the XML Editor. Clicking the Enable XML Editor button allows you to edit the XML of the business rule, but permanently disables the ability to edit the business rule in the Configurator. |
Panes
When a business rule is opened in Application Design

The Triggers pane allows you to add triggers to the business rule by clicking the button and selecting a trigger event. This pane is part of the Configurator view for a business rule and is hidden if the XML Editor view is displayed.
Tip: The name of a Custom trigger must match the name of a Custom event.
Warning! Clicking in a trigger will delete that trigger and all component blocks in its associated component set.
For information about the different types of triggers, see Triggers in the Configurator.

The Configurator pane allows you to edit the component set associated with the trigger selected in the Triggers pane. You can add component blocks by dragging them from the Insert tab and dropping them onto a Drop block here marker. You can drag and drop component blocks within the component set to change the order in which they run. This pane is part of the Configurator view for a business rule and is hidden if the XML Editor view is displayed.
Warning! Clicking in a component block will delete the component block.
For information about the different types of component blocks, see Component Blocks.

The XML Editor pane allows you to view and edit the XML of the entire business rule. This pane is part of the XML Editor view for a business rule and is hidden if the Configurator view is displayed.
For information about XML business rule syntax, see Business Rule Reference.
Commands
Command |
Description |
---|---|
Enable XML Editor |
By default, the XML Editor is disabled when you create a business rule, and you can configure the business rule by using the Configurator. If you enable the XML Editor, the Configurator can no longer be used to modify the business rule, and you must use the XML Editor instead. Note: This command is displayed only if the business rule was created by using Configurator and the XML Editor has not been enabled. |
Format XML |
Neaten the indentation and spacing of the XML of the business rule. Note: This command is displayed only if the XML Editor has been enabled for the business rule or if the business rule was created prior to Spectrum 3.0. |
Validate |
Perform validation of the business rule syntax and formatting. Note: This command is displayed only if the XML Editor has been enabled for the business rule or if the business rule was created prior to Spectrum 3.0. |
Test |
Specify trigger events and run the business rule to test it. No process is used. Important! When you test a business rule, that business rule is run and can affect the Loftware Enterprise SP environment. For example, testing a business rule that is designed to alter a label template, to change a value in a database, to submit a job, or to cancel a job actually performs those actions. Note: This command is displayed only if the XML Editor has been enabled for the business rule or if the business rule was created prior to Spectrum 3.0. |

The Properties pane displays the name of the business rule and allows you to describe the business rule. You can also view information about when and by whom the business rule was created and most recently modified.