Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components
Close Print View
Designing: Incorporating Business Rules
 

Classic Java CAPS

Developing Java CAPS Projects

Using SOAP Message Handlers

Creating a Runtime Environment

Designing Business Processes in the Sun Business Process Manager

Business Process Model Overview

Business Process Components

Java CAPS Components

Editing Business Processes

The Business Process Designer

Business Process Activities

The Business Rule Designer

The Business Rule Editor

Building a Business Process Model

Adding a Business Process to a Project

Creating the Business Process Components

Incorporating Business Rules

Validating a Business Process Model

Saving a Business Process Model

Incorporating Sub-processes Into Business Models

Creating a Sub-process

Adding the Sub-Process to the Main Business Process

Using Predicates with Repeating Nodes

Creating a New Predicate

Editing a Predicate

Deleting a Predicate

Predicate Example

Customizing the Business Process Display

Changing Link Styles

Changing Grid Properties

Aligning and Distributing Modeling Elements

Automatically Arranging Modeling Elements

Generating Business Process Reports

To generate a BP report

Working with TCP/IP HL7 Collaborations

Developing Sun Master Indexes (Repository)

Developing Sun Master Patient Indexes

Developing OTDs for Application Adapters

Developing OTDs for Communication Adapters

Developing OTDs for Database Adapters

Developing OTDs for Web Server Adapters

Designing with Application Adapters

Designing with Communication Adapters

Designing with Web Server Adapters

SWIFT Integration Projects

Java EE Based Components

Designing with Sun JCA Adapters

About the TCP/IP JCA Adapter

Defining Constants and Variables

Using Database Operations

Developing Sun Master Indexes

Using the JMS JCA Wizard

Using the JAXB Wizard and Code-Seeder Pallete

Incorporating Business Rules

You can configure logic in a business rule activity or add a business rule to a link. Business rules are defined using the Business Rule Designer, which appears when you click the Display Business Rule Designer icon or double-click a business rule activity or a business rule icon on a link. It is active when you add or select a link with a business rule and when you add or select a business rule activity. The Business Rules Editor, available from the Business Rule Designer, allows you to further modify business rules.

Adding Business Rules Activities

A business rule activity allows you to map and manipulate data in an activity in the Business Rule Designer.

To add a business rule activity
  1. From the Business Process Designer toolbar, click Business Rule Activity and drag it to the Business Process Designer canvas.
  2. On the Business Process Designer toolbar, click Display Business Rule Designer.

    The Business Rule Designer appears in the lower part of the Business Process Designer.

  3. Define the business rules for the activity as described in Defining Business Rules.
Adding a Business Rule to a Link

You can add a business rule to a link in order to map and manipulate data between activities using the Business Rule Designer.

To add a business rule to a link
  1. Right-click a link in the BP, and then click Add Business Rule.
  2. On the toolbar, click Display Business Rule Designer.

    The Business Rule Designer appears in the lower part of the Business Process Designer.

  3. Define the business rules for the activity as described in Defining Business Rules.
Defining Business Rules

A business rule can be a direct mapping of data, or can include multiple methods to manipulate data during the mapping.

To define a business rule
  1. In the Business Process Designer, double-click the business rule activity or link you want to edit.

    The Business Rule Designer appears.

  2. Expand the trees in the right and left panels until the nodes you want to map are visible.
  3. Do any of the following:
    • Drag a direct link between nodes in the right and left panels.

    • Select a method from the Method Palette. You can populate the method parameters and return values by linking them to nodes in the left and right panels, by linking them with additional methods, or by creating literal values.

      Note - See Using the Method Palette for more information about each method available in the Method Palette.

  4. When you are done creating business rules, click Save in the Enterprise Designer toolbar.
Editing Business Rules

Once you create business rules, you can modify them in the Business Rule Designer. You can also use the Business Rules Editor, provided with the Business Rule Designer, The editor provides an advanced view of the business rules for your BP

To edit business rules
  1. In the BP, double-click the business rule activity or business rule you want to modify.
  2. Do any of the following:
    • Add new mappings.
    • Incorporate new methods into the rules.
    • Delete an existing link by clicking the link and then pressing the Delete key (this cannot be undone).
  3. To modify rules in the Business Rules Editor, click the bottom gray triangle to the left of the Business Rule Designer title bar.

    The Business Rules Editor appears.

  4. By default, the rules are in read-only mode. Click Show Single Mapping to place the editor in edit mode.
  5. Do any of the following in the Business Rules Editor.
    • To delete a rule or set of rules, right-click the node and then click Delete. Use caution when deleting rules. This can result in modeling elements being removed from the BP and cannot be undone.

    • To activate the reset destination feature for a rule, right-click the rule, and then click Reset Destination (for more information about this feature, see Reset Destination).

      When you right-click the node again, Reset Destination appears with a check mark.

    • To deactivate the reset destination feature for a rule, right-click the rule, and then click Reset Destination.

      When you right-click the node again, Reset Destination no longer appears with the check mark.

    • To expand the tree nodes, right-click a node, and then click Expand, or click Expand All to expand all nodes.

    • To collapse a tree node, right-click the node, and then click Collapse.

    • To change the order of the rules, select the rule you want to move and then click either the down or up arrows in the toolbar until the rule is where you want it. You can only move a node if there a multiple nodes at the same level.

  6. To close the Business Rules Editor, click the top gray triangle to the left of the Business Rule Designer title bar.
  7. When you are done making changes, click Save in the Enterprise Designer toolbar.