8-2-SP1 Working With Business Rules in My Webmethods
8-2-SP1 Working With Business Rules in My Webmethods
Version 8.2
April 2010
Copyright
& Docu-
ment ID
This document applies to webMethods Business Rules 8.2 and to all subsequent releases.
Specifications contained herein are subject to change and these changes will be reported in subsequent release notes or new editions.
Copyright © 2010-2011 Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or
their licensors.
Detailed information on trademarks and patents owned by Software AG and/or its subsidiaries is located at
http://documentation.softwareag.com/legal/.
Use of this software is subject to adherence to Software AG's licensing conditions and terms. These terms are part of the product
documentation, located at http://documentation.softwareag.com/legal/ and/or in the root installation directory of the licensed product(s).
This software may include portions of third-party products. For third-party copyright notices and license terms, please refer to “License
Texts, Copyright Notices and Disclaimers of Third-Party Products”. This document is part of the product documentation, located at
http://documentation.softwareag.com/legal/and/or in the root installation directory of the licensed product(s).
1. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Installation and Configuration Information for My webMethods System Administrators . . . 9
Document Conventions
Convention Description
Bold Identifies elements on a screen.
Narrowfont Identifies storage locations for services on webMethods Integration
Server, using the convention folder.subfolder:service.
UPPERCASE Identifies keyboard keys. Keys you must press simultaneously are
joined with a plus sign (+).
Italic Identifies variables for which you must supply values specific to
your own situation or environment. Identifies new terms the first
time they occur in the text.
Monospace font Identifies text you must type or messages displayed by the system.
{} Indicates a set of choices from which you must choose one. Type
only the information inside the curly braces. Do not type the { }
symbols.
Convention Description
| Separates two mutually exclusive choices in a syntax line. Type one
of these choices. Do not type the | symbol.
[] Indicates one or more options. Type only the information inside the
square brackets. Do not type the [ ] symbols.
... Indicates that you can type multiple options of the same type. Type
only the information. Do not type the ellipsis (...).
Documentation Installation
You can download the product documentation using the Software AG Installer.
Depending on the release of the webMethods product suite, the location of the
downloaded documentation will be as shown in the table below.
Online Information
You can find additional information about Software AG products at the locations listed
below.
Note: The Empower Product Support Web site and the Software AG Documentation Web
site replace Software AG ServLine24 and webMethods Advantage.
Before you can get started, you must have a My webMethods user account, with full
permissions (read and write) for the application page you want to modify.
My webMethods provides an extremely flexible framework for granting or restricting
user access to virtually every aspect of the My webMethods interface. Administrators
assign permissions known as access privileges and functional privileges. Access
privileges define the application pages you can display. Functional privileges define the
actions you can perform in My webMethods. If this guide lists pages or menu items that
you cannot access, it is likely because you do not have the access privileges to view the
page. If this guide lists user interface controls (e.g. buttons) that are greyed out, it is likely
because you do not have the functional privileges to perform the actions associated with
the user interface controls. If you have any questions about your access privileges,
consult with your My webMethods administrator.
For information about permissions management and customizing the tools, see the
Administering My webMethods Server guide.
To exchange rule projects with the Rules Development feature of Software AG Designer:
The Rules package must be installed on the My webMethods Server. This creates the
folder in which the rule projects are stored (My webMethods
Applications/webMethods Application Data/Rule Projects).
There must exist at least one My webMethods Server user (other than “sysadmin”)
with full write access to this folder. The permissions for the folder can be set by the
“sysadmin” user using the tools in the folder view.
Term Explanation
Business Rule A business rule is a rule that defines or
constrains an aspect of your business. It is
intended to create a business structure or
to influence the behavior of the business.
Condition A condition is the left hand side part of a
rule: IF Condition THEN Result.
Condition Value A condition value determines a condition.
It can consist of:
An operator and a literal value.
An operator and a parameter element.
An operator and an action that
delivers an output value.
An operator and a constant.
Data Model Business rules must be able to interact
with application data from other systems.
This external application data is mapped
to a data model, which is then stored in
your workspace as part of the rule project.
Data Model Element A data model element is an entity of a
data model. For example, a Customer data
model can contain the data model
elements Name and Age.
Decision Entity A decision entity is a way to display one
or more rules. Decision tables, event rules,
etc. are different decision entities, even
though they can contain the very same
rule. Some decision entities are more
suited for displaying certain kinds of
rules than others.
Term Explanation
Decision Table A decision table is a decision entity. In the
decision table, the conditions and
corresponding results are sorted into
rows and columns. A column can either
represent a condition (the IF part) or a
result (the THEN part) of a rule. Each row
in a decision table represents one
individual rule.
Event Model Event rules can operate on the basis of
pre-defined event types. This event type
is mapped to an event model, which is
then stored in your workspace as part of
the rule project.
Event Rule An event rule is a decision entity that
specifies the reaction to an event. There
are two types of events:
Internal Events.
External Events.
Internal events are triggered by other
event rules and decision tables during
rule execution. External events are pre-
defined event types that were created
with the webMethods Event Type Editor,
see webMethods Event-Driven Architecture
Help.
New Data Action A new data action is an action that was
mapped from a data model. It creates a
new instance of this data model in the
rules engine. In this way, a new output
parameter that was mapped from this
data model is introduced to the rules
engine. It can then trigger other decision
entities within one rule set that use this
output parameter as an input.
Parameter A parameter is an instance of a data
model or an event model.
Parameter Element A parameter element is an entity of a
parameter.
Term Explanation
Process Action A process action is an action that was
mapped from an existing process and can
be used in a decision entity to:
Start a new process instance.
Join a running process instance.
Suspend one or more running process
instance(s).
Cancel one or more running process
instance(s).
Fail one or more running process
instance(s).
Resume one or more suspended
process instance(s).
Invoke a user task.
Result A result is the right hand side part of a
rule: IF Condition THEN Result. There are
two types of results:
Assignment Result. This result type is
applied, whenever you want to assign
a value to a result.
Action Result. This result type is
applied, whenever you want to
execute an action from a decision
entity.
Term Explanation
Result Value A result value determines a result. There
are two types:
Assignment result values.
Action result values.
An assignment result value can consist of:
An operator and a literal value.
An operator and a parameter element.
An operator and an action that
delivers an output value.
An operator and a constant.
An action result value determines the
action status:
Active.
Inactive.
Rule A rule is a single element that specifies a
decision in a IF Condition THEN Result
syntax.
Rule Set A rule set is a grouping of logically
related decision entities. Every rule set
belongs to a rule project.
Rule Project A rule project is used as a container for
different rule sets and other elements,
such as data models, event models,
decision entities, actions, etc. In a rule
project, these different elements can be
defined and used by all parts of the rule
project.
Service Action A service action is an action that was
mapped from an existing Integration
Server service (IS service). Then you can
execute this service from a decision entity,
or use an output value from the service in
a decision entity.
Note: You can only see the application pages you have permission for, see “Getting
Started” on page 9.
The first entry is the entry for the Welcome page. Below, there are the entries for the rule
project application pages. The entry for the application page that is currently displayed in
the workspace area is highlighted.
The Welcome window provides a button to update the entries for the business rules
application pages on the Navigate tab.
Note: You can only see the application pages you have permission for, see “Getting
Started” on page 9.
Overview
The Decision Entity List window lists the decision entities that are part of the business
rules page you selected from the navigation pane.
The decision entity type is specified by an icon before the decision entity name:
Clicking a decision entity name opens the decision entity in the Decision Entity Editor
window where it can be modified as described in “Modifying a Decision Table” on
page 25 and “Modifying an Event Result” on page 33.
Overview
The Decision Entity Editor window shows the decision entity that you selected from the
Decision Entity List window. You can modify this decision entity as described in
“Modifying a Decision Table” on page 25 and “Modifying an Event Result” on page 33.
Button Description
Inserts a new rule after the last rule in a
decision table, see “Adding a Rule” on
page 30.
Deletes the selected row(s) of a decision
table, see “Deleting a Rule” on page 30.
Hot deploys the rule project the displayed
decision entity is part of, see “Hot
Deploying a Rule Project” on page 42.
Saves the changes to the decision entity,
see “Saving Changes to a Decision Entity”
on page 39.
Discards the changes to the decision
entity.
Clicking the button opens the description field that shows the description entered by
the rule developer. To modify a description, see “Modifying the Description of a Decision
Entity” on page 40.
A decision table is a decision entity. It is a compact way to depict a complex set of rules in
a IF Condition THEN Result syntax.
Condition
A condition is specified by a parameter element.
Condition Value
A condition value can consist of:
An operator and a literal value.
An operator and a parameter element (marked by a dotted line).
An operator and an action that delivers an output value (marked by a dotted line and
() behind the name).
An operator and a constant (marked by a dotted line).
Result
There are two types of results:
Result Description
Assignment Result An assignment result is specified
by a parameter element. This
result type is applied, whenever
you want to assign a value to a
result.
Action Result An action result is specified by an
action. This result type is applied,
whenever you want to execute an
action from a decision table.
Rule 1: IF a customer has a good credit history and the annual order
value is equal to or larger than $ 5,000, THEN this customer
is a VIP customer.
Rule 2: IF a customer is a VIP customer, THEN he/she will receive a
bonus at the end of a year and will be notified of this by
email.
The corresponding decision table uses two conditions, two assignment results and one
action result:
Note: The literal value must match the data type as specified in “About Data Type
Assignment” on page 26.
4 Press ENTER, or click anywhere in the Decision Entity Editor window to remove the
focus from the cell.
Modifying an Operator
To modify an operator:
1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Click the operator you want to modify.
3 Select a new operator as specified in “About Condition Operators” on page 25 or
“About Condition Operators” on page 25.
5 Click .
Adding a Rule
To add a rule:
1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Click in the upper left corner of the Decision Entity Editor window.
The new rule is inserted after the last rule.
Deleting a Rule
To delete a rule:
1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Select the rules you want to delete by clicking the row number. To deselect a rule,
click the row number again.
3 Click in the upper left corner of the Decision Entity Editor window.
Note: If you delete the only rule of a decision table, an empty rule is automatically
inserted.
An event rule is a decision entity that specifies the results triggered by an event. There are
two types of events:
Internal Events.
External Events.
Internal events are triggered by other event rules and decision tables during rule
execution. External events are pre-defined event types that were created with the
webMethods Event Type Editor, see webMethods Event-Driven Architecture Help.
Event
The event consists of an event source that is specified by a parameter element and a type.
The following types are supported:
Results
There are two types of results:
Result Description
Assignment Result An assignment result is specified
by a parameter element. This
result type is applied, whenever
you want to assign a value to a
result.
Action Result An action result is specified by
an action. This result type is
applied, whenever you want to
execute an action from an event
rule.
Note: The literal value must match the data type as specified in “About Data Type
Assignment” on page 34.
4 Press ENTER, or click anywhere in the Decision Entity Editor window to remove the
focus from the cell.
Modifying an Operator
To modify an operator:
1 Open the event rule as described in “Opening a Decision Entity” on page 39.
2 Click the operator you want to modify.
3 Select a new operator as specified in “About Result Operators” on page 33.
5 Click .
My webMethods supports the following functions that apply to all decision entities:
Opening a decision entity
Saving changes to a decision entity
Modifying the description of a decision entity
1 Click in the upper right corner of the Decision Entity Editor window.
Note: You cannot save a decision entity that contains errors. In this case, an error
message is displayed, and the decision entity is not saved until you fix the error and
press the button again.
4 Click .
The Software AG rules engine executes the rules that were created with the Rules
Development feature in Software AG Designer. The rules engine exists on the Integration
Server as part of the WmBusinessRules package.
You can deploy your modified rules to the Integration Server, which is used as a target
runtime environment. There these rules can be accessed and used by multiple business
processes or from a flow service.
My webMethods supports the deployment of rule projects to a single or multiple
Integration Servers using the hot deploy command as described in “Hot Deploying a
Rule Project” on page 42.
Before you can hot deploy a rule project, you must be connected to the Integration
Server(s). To configure an Integration Server connection, follow the instructions as
described in “Configuring an Integration Server Connection” on page 41.
4 Click Save.
2 Click in the upper right corner of the Decision Entity Editor window.
Note: You cannot hot deploy a decision entity that contains unsaved changes. You
cannot hot deploy a decision entity that contains errors. In this case, the Hot Deploy
button is disabled.
3 In the Hot Deployment Confirmation dialog box, click to deploy the decision
entity and all other components of the rule project to the Integration Server runtime.
The Hot Deployment Results dialog box lists the results of the operation. To see a detailed
list of successfully and unsuccessfully deployed rule projects, click See Details.