0% found this document useful (0 votes)
138 views42 pages

8-2-SP1 Working With Business Rules in My Webmethods

Uploaded by

King A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views42 pages

8-2-SP1 Working With Business Rules in My Webmethods

Uploaded by

King A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Title Page

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).

Document ID: MWM-WBR-82SP1-20110401


Table of Contents

About this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Documentation Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Online Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Installation and Configuration Information for My webMethods System Administrators . . . 9

2. Rules Development Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3. Understanding the User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


The Navigation Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The Workspace Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The Format of the Welcome Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The Format of the Business Rules Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The Decision Entity List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
The Decision Entity Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4. Modifying Rule Projects Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5. Working with Decision Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23


Modifying a Decision Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
About Condition Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
About Result Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
About Data Type Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Adding an Operator and a Literal Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Modifying an Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Modifying a Literal Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Adding a Condition or Result Value with the Cell Editor . . . . . . . . . . . . . . . . . . . . . . . . 29
Modifying a Condition or Result Value with the Cell Editor . . . . . . . . . . . . . . . . . . . . . 30
Clearing a Condition or Result Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Adding a Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Deleting a Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6. Working with Event Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31


Modifying an Event Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
About Result Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
About Data Type Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Adding an Operator and a Literal Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Modifying an Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Modifying a Literal Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Adding a Result Value with the Cell Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Working with Business Rules in My webMethods Version 8.2 3


Modifying a Result Value with the Cell Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Clearing a Result Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7. Global Functions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39


Opening a Decision Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Saving Changes to a Decision Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Modifying the Description of a Decision Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
About Decision Entity Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

8. Hot Deploying Rule Projects to the Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . 41


Configuring an Integration Server Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Hot Deploying a Rule Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4 Working with Business Rules in My webMethods Version 8.2


About this Guide

The Working with Business Rules in My webMethods guide is for users of My


webMethods who want to modify rule projects that were exported from Software AG
Designer to the My webMethods Server repository.
Business rules are created with the Rules Development feature in Software AG Designer;
for more information, see the webMethods Rules Development Help.
Working with Business Rules in My webMethods Help contains supporting
documentation on the following main topics:
 “Getting Started” on page 9
 “Rules Development Terminology” on page 11
 “Understanding the User Interface” on page 15
 “Modifying Rule Projects Overview” on page 21
 “Working with Decision Tables” on page 23
 “Working with Event Rules” on page 31
 “Global Functions Overview” on page 39
 “Hot Deploying Rule Projects to the Integration Server” on page 41

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.

Working with Business Rules in My webMethods Version 8.2 5


About this Guide

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.

For webMethods... The documentation is downloaded to...


6.x The installation directory of each product.
7.x A central directory named _documentation in the main
installation directory (webMethods by default).
8.x A central directory named _documentation in the main
installation directory (Software AG by default).

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.

If you want to... Go to...


Access the latest version of product Software AG Documentation Web site
documentation.
http://documentation.softwareag.com

6 Working with Business Rules in My webMethods Version 8.2


About this Guide

If you want to... Go to...


Find information about product releases and Empower Product Support Web site
tools that you can use to resolve problems.
https://empower.softwareag.com
See the Knowledge Center to:
 Read technical articles and papers.
 Download fixes and service packs.
 Learn about critical alerts.
See the Products area to:
 Download products.
 Download certified samples.
 Get information about product
availability.
 Access older versions of product
documentation.
 Submit feature/enhancement requests.
 Access additional articles, demos, and Software AG Developer Community for
tutorials. webMethods
 Obtain technical information, useful http://communities.softwareag.com/
resources, and online discussion forums,
moderated by Software AG professionals,
to help you do more with Software AG
technology.
 Use the online discussion forums to
exchange best practices and chat with
other experts.
 Expand your knowledge about product
documentation, code samples, articles,
online seminars, and tutorials.
 Link to external Web sites that discuss
open standards and many Web
technology topics.
 See how other customers are streamlining
their operations with technology from
Software AG.

Working with Business Rules in My webMethods Version 8.2 7


About this Guide

8 Working with Business Rules in My webMethods Version 8.2


1 Getting Started

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.

Installation and Configuration Information for My


webMethods System Administrators
You must install and configure several Software AG products, before you can modify
rule projects that were exported from Software AG Designer to My webMethods. For
complete information about installation, see the Software AG Installation 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.

To set up business rules user accounts in My webMethods:


 The My webMethods Server administrator must create a role for business rules users
and assign ALL access rights to this role for the Rule Projects folder.

Working with Business Rules in My webMethods Version 8.2 9


1 Getting Started

 The My webMethods Server administrator must add the My webMethods Server


user who will be accessing the rule projects to this role. For more information about
creating and managing user accounts and roles, see Administering My webMethods
Server.
 The business rules user will not see the newly exported rule project until an
administrator gives him permission to do so (see Administering My webMethods Server,
Managing Permissions in My webMethods). This has to be done once for each rule
project.

10 Working with Business Rules in My webMethods Version 8.2


2 Rules Development Terminology

The following terminology applies to the Working with Business Rules in My


webMethods guide:

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.

Working with Business Rules in My webMethods Version 8.2 11


2 Rules Development Terminology

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.

12 Working with Business Rules in My webMethods Version 8.2


2 Rules Development Terminology

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.

Working with Business Rules in My webMethods Version 8.2 13


2 Rules Development Terminology

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.

14 Working with Business Rules in My webMethods Version 8.2


3 Understanding the User Interface

To access the webMethods Business Rules functionality in My webMethods, log in to an


instance of My webMethods where the webMethods Business Rules functionality has
been installed.
The overall layout of My webMethods is described in detail in the Working with My
webMethods guide. This section contains the following main topics:
 “The Navigation Pane” on page 15
 “The Workspace Area” on page 17

The Navigation Pane


The overall layout of the navigation pane is described in detail in the Working with My
webMethods guide.
The rule projects that were exported from the Rules Development feature in Software AG
Designer can be accessed on the Navigate tab under Applications > Administration > Business
> webMethods Business Rules.

Business Rules Structure


Click webMethods Business Rules to open the entries for the business rules application
pages.

Working with Business Rules in My webMethods Version 8.2 15


3 Understanding the User Interface

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.

Rule Project Subentries


Click a rule project entry to open the subentries for this rule project. These subentries are
categorized into Decision Tables, Event Rules and Rule Sets. The Rule Sets entry is
subcategorized into the entries for the individual rule sets used in the rule project, and
the Master Rule Set.

16 Working with Business Rules in My webMethods Version 8.2


3 Understanding the User Interface

The Workspace Area


The workspace area is located on the right side of the user interface. This area contains
the content of the application pages you selected from the navigation pane. There are two
different types of business rules application pages:
 Welcome page, see “The Format of the Welcome Page” on page 17
 Business rules page, see “The Format of the Business Rules Page” on page 17

The Format of the Welcome Page


The following graphic shows the format of the Welcome page.

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.

The Format of the Business Rules Page


The following graphic shows the format of a business rules page.

A business rules page contains the following two different windows:

Working with Business Rules in My webMethods Version 8.2 17


3 Understanding the User Interface

Name of the Window Description


Decision Entity List window See “The Decision Entity List Window”
on page 18
Decision Entity Editor window See “The Decision Entity Editor Window”
on page 19

The Decision Entity List Window


The following graphic shows the format of the Decision Entity List window.

Overview
The Decision Entity List window lists the decision entities that are part of the business
rules page you selected from the navigation pane.

Decision Entities in the Decision Entity List


Selected Application Page Window
Decision tables List of all decision tables used in a rule
project
Event rules List of all event rules used in a rule project
Rule set List of all decision entities used in the rule
set
Master rule set List of all decision entities used in a rule
project (except external event rules)

The decision entity type is specified by an icon before the decision entity name:

Decision Entity Icon Decision Entity Type


Decision table
Event rule

18 Working with Business Rules in My webMethods Version 8.2


3 Understanding the User Interface

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.

Decision Entity Descriptions


Behind the decision entity name, the description entered by the rule developer is shown.
To hide the description, click the Hide Description button. To show the description, click the
Show Description button. To modify a description, see “Modifying the Description of a
Decision Entity” on page 40.

Browsing Decision Entities


You can browse through the list of decision entities with the backward and forward
arrows in the bottom part of the window. To jump to a page, type the page number in the
Go to page input field and click OK.

Filtering Decision Entities


To automatically filter the list of decision entities, type your filter text in the input field in
the upper left corner of the window. To delete the filter text, click in the input field.

The Decision Entity Editor Window


The following graphic shows the format of the Decision Entity Editor window.

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.

Decision Entity Editor Toolbar


The following buttons appear in the toolbar:

Working with Business Rules in My webMethods Version 8.2 19


3 Understanding the User Interface

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.

Decision Entity Description

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.

20 Working with Business Rules in My webMethods Version 8.2


4 Modifying Rule Projects Overview

Modifying rule projects with My webMethods involves the following stages:

Stage 1 Log in to My webMethods. Ask your My webMethods


administrator to assign the needed access privileges.
For more information, see “Getting Started” on page 9.
Stage 2 Modify the rule project.
For more information, see “Working with Decision Tables”
on page 23, “Working with Event Rules” on page 31, and
“Global Functions Overview” on page 39.
Stage 3 Hot deploy the rule project.
(optional)
For more information, see “Hot Deploying Rule Projects to
the Integration Server” on page 41.

Working with Business Rules in My webMethods Version 8.2 21


4 Modifying Rule Projects Overview

22 Working with Business Rules in My webMethods Version 8.2


5 Working with Decision Tables

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.

Decision Table Structure


In a decision table, the conditions and corresponding results are sorted into rows and
columns. A column can either represent a condition (blue color) or a result (green color)
of a rule. There can be more than one condition and more than one result. Each row in a
decision table represents one individual rule.

Decision Table in the Decision Entity Editor

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:

Working with Business Rules in My webMethods Version 8.2 23


5 Working with Decision Tables

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.

Assignment Result Value


An assignment result 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).

Action Result Value


The action result value expresses the action status. There are two types:
 (action is enabled).
 (action is disabled).
The following rules can be modeled in 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:

24 Working with Business Rules in My webMethods Version 8.2


5 Working with Decision Tables

Decision Table Example

Modifying a Decision Table


The Decision Entity Editor supports the following actions for decision tables:
 Adding and modifying condition or result values
 Clearing condition or result values

About Condition Operators


The following operators can be assigned to the different data types of decision table
conditions:

Data Type(s) Operator Definition


Boolean = (Equals; default operator)
!= (Does not equal)
Date = (Equals; default operator)
!= (Does not equal)
< (Less than)
<= (Less than or equal)
> (Greater than)
>= (Greater than or equal)
< ... <= (Less than ... less than or equal)
<= ... <= (Less than or equal ... less than or equal)
< ... < (Less than ... less than)
<= ... < (Less than or equal ... less than)

Working with Business Rules in My webMethods Version 8.2 25


5 Working with Decision Tables

Data Type(s) Operator Definition


Byte = (Equals; default operator)
Character != (Does not equal)
Double < (Less than)
Float <= (Less than or equal)
Integer > (Greater than)
Long >= (Greater than or equal)
Short < ... <= (Less than ... less than or equal)
<= ... <= (Less than or equal ... less than or equal)
< ... < (Less than ... less than)
<= ... < (Less than or equal ... less than)
String = (Equals; default operator)
!= (Does not equal)

About Result Operators


The following operators can be assigned to the different data types of decision table
assignment results:

Data Type(s) Operator Definition


Boolean = (Equals; default operator)
Date = (Equals; default operator)
Byte = (Equals; default operator)
Character
Double
Float
Integer
Long
Short
String = (Equals; default operator)

About Data Type Assignment


The following data types can be assigned to a parameter element that was specified for a
condition or result:

Data type of the


parameter element for Data type of assigned
the condition or result Literal value must be parameter element
is ... ... must be ...
Boolean Boolean Boolean
Date Date Date

26 Working with Business Rules in My webMethods Version 8.2


5 Working with Decision Tables

Data type of the


parameter element for Data type of assigned
the condition or result Literal value must be parameter element
is ... ... must be ...
String String String
Numeric Same data type or Any numeric data
(Byte, Character, numeric data type type. Numeric data
Double, Float, with a smaller types with a greater
Integer, Long, value. value are
Short) truncated.

Adding an Operator and a Literal Value

To add an operator and a literal value:


1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Click the cell you want to modify.
3 Select an operator as specified in “About Condition Operators” on page 25 or “About
Condition Operators” on page 25.

Important! Adding only an operator without entering a literal value results in a


semantically invalid cell.

4 Enter a literal value in the input field as required:

Note: The literal value must match the data type as specified in “About Data Type
Assignment” on page 26.

For this data type ... You can do this ...


Boolean Select true or false from the drop down list.
Date 1 Click the icon.
2 Select the date.
3 Enter a time of day (optional).

Note: The format and time zone of


displayed date and time values can be
configured in the My Profile settings.
The webMethods Business Rules
functionality only supports hours,
minutes and seconds.

Working with Business Rules in My webMethods Version 8.2 27


5 Working with Decision Tables

For this data type ... You can do this ...


Byte Type the literal value.
Character
Double
Float
Integer
Long
Short
String Type the literal value.

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.

Modifying a Literal Value

To modify a literal value:


1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Click the literal value you want to modify.
3 Do one of the following:
a Type a new literal value as described in “Adding an Operator and a Literal Value”
on page 27, Step 4.
b Press DEL to delete the literal value.
4 Press ENTER.

28 Working with Business Rules in My webMethods Version 8.2


5 Working with Decision Tables

Adding a Condition or Result Value with the Cell Editor

To add a condition or result value with the cell editor:


1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Click the cell you want to modify.
3 Click the (in conditions) or (in results) icon.
4 In the [Value Type] Modification dialog box, modify the value info as required:

For this field ... You can do this ...


Operator drop down list Select an operator as specified in “About
Condition Operators” on page 25 or
respectively “About Condition
Operators” on page 25.

Note: If you select a range operator, the


dialog box splits so that you can specify a
literal value or parameter element for
each side of the range.

Enter value Enter a literal value as described in


“Adding an Operator and a Literal Value”
on page 27, Step 4.

Note: The literal value must match the


data type as specified in “About Data
Type Assignment” on page 26.

Select parameter element Click a parameter element. It then


appears in the Enter value field.

Note: The data type of the parameter


element must match the data type as
specified in “About Data Type
Assignment” on page 26.

5 Click .

Working with Business Rules in My webMethods Version 8.2 29


5 Working with Decision Tables

Modifying a Condition or Result Value with the Cell Editor

To modify a condition or result value with the cell editor:


1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Click the cell you want to modify.
3 Click the (in conditions) or (in results) icon.
4 Modify the condition or result value as described in “Adding a Condition or Result
Value with the Cell Editor” on page 29.

Clearing a Condition or Result Value

To clear a condition or result value:


1 Open the decision table as described in “Opening a Decision Entity” on page 39.
2 Click the operator of the cell you want to clear.
3 Select Clear from the context menu.

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.

30 Working with Business Rules in My webMethods Version 8.2


6 Working with Event Rules

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 Rule Structure


An event rule consists of an event (blue color) and one or more results (green color).

Event Rule in the Decision Entity Editor

Event
The event consists of an event source that is specified by a parameter element and a type.
The following types are supported:

Working with Business Rules in My webMethods Version 8.2 31


6 Working with Event Rules

Event Type Description


Internal Event is changed This type triggers one or more
results whenever the event
source changes. The change
must be triggered by other event
rules or decision tables.Is
changed type event rules have
the following syntax:
WHENEVER an Event Source IS
CHANGED THEN Result.

External Event has occurred This type triggers one or more


results whenever the external
event has occurred. Has occurred
type event rules have the
following syntax:
WHENEVER an Event Source HAS
OCCURRED THEN Result.

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.

Assignment Result Value


An assignment result 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 action name).
 An operator and a constant (marked by a dotted line).

32 Working with Business Rules in My webMethods Version 8.2


6 Working with Event Rules

Action Result Value


The action result value expresses the action status. There are two types:
 (action is enabled).
 (action is disabled).
The following rule can be modeled in an event rule using an action result:

Rule WHENEVER a permitted payment method changes for a


customer, THEN this customer is notified of this by email.

Event Rule Example

Modifying an Event Result


The Decision Entity Editor supports the following actions for event rule results:
 Adding and modifying result values
 Clearing result values

About Result Operators


The following operators can be assigned to the different data types of an event rule
assignment result:

Data Type(s) Operator Definition


Boolean = (Equals; default operator)
Date = (Equals; default operator)

Working with Business Rules in My webMethods Version 8.2 33


6 Working with Event Rules

Data Type(s) Operator Definition


Byte = (Equals; default operator)
Character
Double
Float
Integer
Long
Short
String = (Equals; default operator)

About Data Type Assignment


The following data types can be assigned to a parameter element that was specified for an
event result:

Data type of the Data type of assigned


parameter element for Literal value must be parameter element
the result is ... ... must be ...
Boolean Boolean Boolean
Date Date Date
String String String
Numeric Same data type or Any numeric data
(Byte, Character, numeric data type type. Numeric data
Double, Float, with a smaller types with a greater
Integer, Long, value. value are
Short) truncated.

Adding an Operator and a Literal Value

To add an operator and a literal value:


1 Open the event rule as described in “Opening a Decision Entity” on page 39.
2 Click the cell you want to modify.
3 Select an operator as specified in “About Result Operators” on page 33.

Important! Adding only an operator without entering a literal value results in a


semantically invalid cell.

34 Working with Business Rules in My webMethods Version 8.2


6 Working with Event Rules

4 Enter a literal value in the input field as required:

Note: The literal value must match the data type as specified in “About Data Type
Assignment” on page 34.

For this data type ... You can do this ...


Boolean Select true or false from the drop down list.
Date 1 Click the icon.
2 Select the date.
3 (Optional) Enter a time of day.

Note: The format and time zone of


displayed date and time values can be
configured in the My Profile settings.
The webMethods Business Rules
functionality only supports hours,
minutes and seconds.

Byte Type the literal value.


Character
Double
Float
Integer
Long
Short
String Type the literal value.

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.

Working with Business Rules in My webMethods Version 8.2 35


6 Working with Event Rules

Modifying a Literal Value

To modify a literal value:


1 Open the event rule as described in “Opening a Decision Entity” on page 39.
2 Click the literal value you want to modify.
3 Do one of the following:
a Type a new literal value as described in “Adding an Operator and a Literal Value”
on page 34, Step 4.
b Press DEL to delete the literal value.
4 Press ENTER.

Adding a Result Value with the Cell Editor

To add a result value with the cell editor:


1 Open the event rule as described in “Opening a Decision Entity” on page 39.
2 Click the cell you want to modify.
3 Click the icon.
4 In the Result Value Modification dialog box, modify the value info as required:

For this field ... You can do this ...


Operator drop down list Select an operator as specified in “About
Result Operators” on page 33.
Enter value Enter a literal value as described in
“Adding an Operator and a Literal Value”
on page 34, Step 4.

Note: The literal value must match the


data type as specified in “About Data
Type Assignment” on page 34.

Select parameter element Click a parameter element. It then


appears in the Enter value field.

Note: The data type of the parameter


element must match the data type as
specified in “About Data Type
Assignment” on page 34.

36 Working with Business Rules in My webMethods Version 8.2


6 Working with Event Rules

5 Click .

Modifying a Result Value with the Cell Editor

To modify a result value with the cell editor:


1 Open the event rule as described in “Opening a Decision Entity” on page 39.
2 Click the cell you want to modify.
3 Click the icon.
4 Modify the result value as described in “Adding a Result Value with the Cell Editor”
on page 36, Step 4.

Clearing a Result Value

To clear a result value:


1 Open the event rule as described in “Opening a Decision Entity” on page 39.
2 Click the operator of the cell you want to clear.
3 Select Clear from the context menu.

Working with Business Rules in My webMethods Version 8.2 37


6 Working with Event Rules

38 Working with Business Rules in My webMethods Version 8.2


7 Global Functions Overview

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

Opening a Decision Entity

To open a decision entity:


1 On the Navigate tab, do one of the following:
a Click [RuleProjectName] > Decision Tables (for decision tables).
b Click [RuleProjectName] > Event Rules (for event rules).
c Click [RuleProjectName] > Rule Sets > [RuleSetName] (for all decision entities of a rule
set).
2 In the Decision Entity List window, click the decision entity name.
The decision entity opens in the Decision Entity Editor window.

Saving Changes to a Decision Entity

To save changes to 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.

Working with Business Rules in My webMethods Version 8.2 39


7 Global Functions Overview

Modifying the Description of a Decision Entity

To modify the description of a decision entity:


1 Open the decision entity as described in “Opening a Decision Entity” on page 39.

2 In the Decision Entity Editor window, click .


3 Type a new description.

4 Click .

About Decision Entity Validation


All decision entities are validated when they are opened in the Decision Entity Editor
window and after changes to a decision entity are saved. Any occurring problems appear
in the Issue field in the Decision Entity Editor window, and the respective cell of the
decision entity is marked red (error) or yellow (warning). To show the issue details, click
Show Details in the Issue field.

40 Working with Business Rules in My webMethods Version 8.2


8 Hot Deploying Rule Projects to the Integration Server

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.

Configuring an Integration Server Connection


Before you can hot deploy a rule project, you must configure the Integration Server
connection(s).
If you use a cluster or a non-clustered group of Integration Servers (Integration Servers
that share the same database components), you only need to configure the connection to
one of the Integration Servers of the group.

To configure an Integration Server connection:


1 On the Navigate tab, click Administration > My webMethods > System Settings > webMethods
Business Rules Settings.
2 In the workspace area, click Add Integration Server.
3 Modify the Integration Server info as required:

For this field ... You can do this ...


Logical Name Type a name for the Integration Server.
IS Host Type the Integration Server address.
IS Port Type the Integration Server port.
IS Username Type your Integration Server user name.
IS Password Type your Integration Server password.

Working with Business Rules in My webMethods Version 8.2 41


8 Hot Deploying Rule Projects to the Integration Server

4 Click Save.

Hot Deploying a Rule Project

To hot deploy a rule project:


1 Open any decision entity that is part of the rule project as described in “Opening a
Decision Entity” on page 39.

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.

42 Working with Business Rules in My webMethods Version 8.2

You might also like