You are on page 1of 57

TIBCO iProcess™ Decisions

Studio
Basic Tutorial
Software Release 4.1.1
December 2007
Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR
BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED
ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED
SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR ANY
OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A
LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE AGREEMENT,
OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER LICENSE AGREEMENT
WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE SOFTWARE (AND WHICH IS
DUPLICATED IN TIBCO IPROCESS DECISIONS STUDIO INSTALLATION GUIDE) OR IF THERE IS NO SUCH
SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S)
LOCATED IN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE
TERMS AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN
AGREEMENT TO BE BOUND BY THE SAME.
This document contains confidential information that is subject to U.S. and international copyright laws and treaties. No part
of this document may be reproduced in any form without the written authorization of TIBCO Software Inc.
TIB, TIBCO, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, TIBCO iProcess are either
registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.
EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems,
Inc. in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of their respective owners and
are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL
OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME
TIME. SEE THE README.TXT FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC
OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES
ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED
IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR
CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR
INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING BUT
NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright © 2000-2007 Corticon Technologies, Inc. and TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
About this Guide Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Note

The Rule Sets that you build using Studio may be


deployed as executable, standards-based Decision
Services that can be used by other software applications
The Basic Rule Modeling Tutorial provides an introduction to the via Java Messaging or XML Web Services. Rule Sets
iProcess Decisions Studio, the easiest way to manage and automate are in use today across the globe, automating many
your business rules. high-volume decision-intensive processes.

You will learn how to capture rules from business specifications, See the Tutorial for iProcess Decisions Server –
model the rules, analyze them for logical errors, and test the Deploying Web Services for instructions on how to
execution of your rules; all without programming. deploy and test as Decision Services the Rule Sets you
build here.
Your goal is to create a Rule Set: A group of rules that captures the
logic of a single decision-making step completely and
unambiguously. In one sense, a Rule Set is a business-friendly Note
model of your rules (i.e., your decision-making logic). In another
sense, a Rule Set is a very powerful asset, allowing you to automate
those rules in order to process business transactions. This Tutorial is designed for hands-on use. We
recommend that you type along with the instructions and
illustrations presented.
Screenshots in this Tutorial will be cleanest and
sharpest when printed using a Postscript printer driver
(usually identified by “PS” in the printer name).

Page ii
Table of Contents Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

The Business Problem Page 1 The Business Process & Rules Page 2 Start Corticon Studio Page 3
The Business Problem Page 1 The Business Process & Rules Page 2 Start Corticon Studio Page 3
Open the Vocabulary Page 4
Discover New Rules Page 30 Open the Vocabulary Page 4
Discover New Rules Page 30 Create a New Rule Set Page 7
Create a New Rule Set Page 7
Model the Rules Page 8
Model the Rules Page 8
Scope Discover Add New Rule Statements Page 31
Add New Rule Statements Page 31
Edit the Vocabulary Page 32
Edit the Vocabulary Page 32
Add an Attribute Page 33
Add an Attribute Page 33
Save the Vocabulary Changes Page 35
Save the Vocabulary Changes Page 35
Test Model Model the New Rules
Model the New Rules
Page 36
Page 36

Create a New Test Page 23


Create a New Test Page 23
Set Up the Test Scenario Page 24
Set Up the Test Scenario Page 24
Execute the Test Page 27
Execute the Test Page 27 Analyze Deploy
Verify the Test Results Page 28
Verify the Test Results Page 28
Save the Test Page 29
Save the Test Page 29
See the Tutorial for iProcess
Check for Ambiguities Page 15 See the Tutorial for iProcess
Modify the Test Page 48 Check for Ambiguities Page 15 Decisions Server – Deploying Web
Modify the Test Page 48 Decisions Server – Deploying Web
Resolve Ambiguity Errors Page 18 Services and the Server Integration
Test the New Rules Page 50 Resolve Ambiguity Errors Page 18 Services and the Server Integration
Test the New Rules Page 50 & Deployment Guide
Check for Completeness Page 19 & Deployment Guide
Verify the New Test Results Page 51 Check for Completeness Page 19
Verify the New Test Results Page 51 Resolve Completeness Errors Page 20
Resolve Completeness Errors Page 20
Save the Rule Set Page 22 Summary Page 52
Save the Rule Set Page 22 Summary Page 52

Check New Rules for Ambiguities Page 37


Check New Rules for Ambiguities Page 37
Compress the Rulesheet Page 45
Compress the Rulesheet Page 45
Check New Rules for Completeness Page 47
Check New Rules for Completeness Page 47

Page iii
The Business Problem Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Scope

Note

The example used in this Tutorial was developed from a business


problem in which an air cargo company loads cargo of various
sizes and weights onto its fleet of aircraft prior to shipment.

To operate safely, the company must ensure that an aircraft is


never loaded with cargo that exceeds an aircraft’s capabilities.
Flight plans are created by the company that assign specific
cargo shipments to specific aircraft. Part of the flight plan
creation process involves verifying that no plan violates any
safety or operational rule.

The air cargo company desires to improve the quality and


efficiency of the flight plan verification process by modeling and
automating business rules using TIBCO iProcess Decisions
software.

Page 1
The Business Process & Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Discover
Action

First, define your business process as


a sequence of activities or steps:

Collect Package Ship


Cargo Cargo Cargo

Action

Next, determine which process steps involve decisions. Any


step that makes a decision is a candidate for automation using
Corticon.
For any decision-making step, ask: “How do we make this Note
decision?” For this case, we ask “How do we package a
cargo?” The answer will be determined by a set of business
These are the business rules that will
rules.
be implemented in this Tutorial

• Cargo weighing between 150,000 and 200,000 pounds must be packaged in a container
• Cargo with a total volume less than 300 cubic yards must be packaged on a pallet

Page 2
Start Corticon Studio Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Open iProcess Decisions


Studio

Double click on the


iProcess Decisions
Studio icon on your
desktop.
OR
Note
Choose Programs Æ
You first need to install the software. TIBCO Æ iProcess
Refer to the Studio Installation Guide Decisions Studio
for detailed instructions. This guide from the Start menu.
assumes that you have selected the Rule
Modeler role type during installation.

Note

For further details and reference information not


presented here, you can choose Help Æ Contents and
Index from the Studio menubar or click the icon on
the Studio toolbar.

Page 3
Open the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Open an existing Vocabulary

Note

Click on the Open When opening a file for the


icon on the Corticon first time, this is the folder that
Studio toolbar. appears in the Look In drop-
down menu. Open the
OR Examples folder in the folder
list. Continue opening
Choose File Æ subsequent folders as shown.
Open from the
Studio menubar.

1. Navigate to the directory where the Vocabulary (.cvj) file is located.


2. Highlight the file name, Cargo.cvj
3. Choose Open.

Page 4
Open the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Note

Your screen should appear similar to this. The Vocabulary is


displayed in the left-hand side of the Studio screen, and includes all
the terms (and relationships between terms) necessary to build
your business rules. For example, if your business rule includes
the term “aircraft”, then your Vocabulary must also include it. It
may be helpful to think of the Vocabulary as the raw materials, or
building blocks, for constructing business rules in Studio.
The Vocabulary is divided into two sections. The top section
contains the Business Vocabulary (terms that represent things in
the business and which typically hold values). The bottom section
contains the Operator Vocabulary (functions and operations that
manipulate the business terms).

Page 5
Open the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Take a moment to explore the Vocabulary by expanding


nodes in the Business and Operator sections.

Note

Business Vocabulary: The things referenced in our business rules (such


as ‘aircraft’ and ‘flight plan’) are already present in our model. Using
Studio, you can define or edit models, or import models from UML tools.
In this case, we opened an existing model created in Studio. Later in the
Tutorial, we will edit the model.
Operator Vocabulary: contains a rich set of operators and functions for
manipulating data. Programmers can add new operators through a Java
API (e.g., to perform a new statistical function). See the Rule Language
Guide for more information.

Page 6
Create a New Rule Set Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Create a new Rule Set

Click on the New


Rule Set icon on the
Studio toolbar.

OR

Choose File Æ New


Æ Rule Set from the
Studio menubar.

Page 7
Model the Rules – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model
Action

Model the first rule:


Enter the plain-language business rule in
the Rule Statements section of the • A flight plan containing a cargo weighing between 150,000 and 200,000 lbs must be
rulesheet as shown: packaged in a container

Note

Rulesheets contain sections or


“panes” for specific parts or types of
rules, so it’s important to use the right
pane for the right type of rule.

Page 8
Model the Rules – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model
Action

Now, model the rule. Drag the appropriate


term from the Vocabulary and drop it in
row 1 of the Conditions pane as shown.

Note
Note

Our first rule evaluates a condition and


We’ll use an orange dotted line to
takes an action if and only if the condition
indicate dragging and dropping. Drag
is satisfied. Therefore, we will use the
from the orange circle, and drop on the
Conditions and Actions panes to model
orange diamond.
the rule.

Page 9
Model the Rules – Step 3 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Next we define all possible values for cargo weight, broken


into a set of ranges. Because our first rule applies to the
range “between 150,000 and 200,000 lbs”, we break the
ranges into the following set.
In the Values field, type in the relevant ranges as shown.
Separate multiple values with commas. It is not necessary
to type the curly brackets { } as Studio will insert them for
you automatically.

Note

In order to ensure the logical correctness of your


rules, it is imperative that you define a complete
set of possible values for each Condition’s value
set. Any values not defined in the set are
assumed to be invalid. For example, in this case,
we left out cargo weight values above 200,000,
which will be assumed invalid.

A detailed discussion of complete value sets and


other types of constraints may be found in the
Rule Modeling Guide.

Page 10
Model the Rules – Step 4 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Now drag the appropriate term from the


Vocabulary and drop it in row 1 of the Actions
pane. Enter the value set as shown. Single
quotes will automatically be inserted because Note
Studio knows packaging is a string.

Even though rule 1 deals only with


Containers, we also enter the Pallet value
because we know it will be used in the next
rule.
As before, you need only enter the values
themselves separated by commas. Studio
will enter the curly brackets and single
quotes (when needed) automatically.

Page 11
Model the Rules – Step 5 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Now, “connect” rule 1’s condition with


its action by choosing the appropriate
value from the drop-down box that
appears when you click in the first
Conditions row of column (rule) 1.
Do the same for the first Action row in
column 1, too.

Page 12
Model the Rules – Step 6 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Finally, select the Rule Statements ID from


the drop-down box as shown below. This
connects the Rule Statement to the model in
the corresponding column.

Note

ID numbers logically link rows in the


Rule Statements pane to columns in the
Conditions and Actions panes – notice
how clicking on Rule Statement ID 1
causes column 1 to highlight. The
highlighting reminds you that column 1 is
the model of the rule (expressed in plain-
language) in Rule Statement ID 1.

Page 13
Model the Rules – Step 7 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model
Model the second rule in column 2 of the decision table as shown below:
Cargo with a total volume less than 300 cubic yards must be packaged on a pallet
Note

A dash means this


condition is ignored.
Here, when rule 1 is
executed, the condition
in row 2 will be ignored.
Therefore, the rule’s
actions are dependent
only on the condition in
row 1.
If you leave a cell
empty, Studio will
automatically enter a
dash when the Rule Set
is saved.

Note Note

The post operator provides an audit trail during rule execution by The conditions and actions for rule 1 are “stacked”
“posting” the Rule Statement to the transaction when the rule fires. vertically in column 1. The rule therefore reads:
This will be useful during testing. Either type the operator as “cargo weighing between 150,000 and 200,000
shown, or drag and drop it from the Entity folder of the Operator pounds, ignoring volume, must be packaged in a
Vocabulary. Refer to the Rule Language Guide for details. Container.”

Page 14
Check for Ambiguities Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Now that we have finished modeling our rules, it is time to analyze our rules for logical errors. Very often, initial
business rule specifications are incomplete or ambiguous. By incomplete, we mean that the rules fail to address
all possible scenarios. By ambiguous, we mean that the rules address certain scenarios in conflicting ways.
In order to automate your rules, you must first eliminate logical errors. Studio provides unique and powerful features
to help you get your rules right. These features will be explored in the Analyze phase of rule management.

Click on the Check


for Ambiguities icon
on the Studio toolbar.
Action
OR
Check for Ambiguities.
Choose Rule Set Æ
Rulesheet Æ Check
for Ambiguities from
the Studio menubar.

Page 15
Identify Ambiguities Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze
Note

Columns containing ambiguities are shaded in pink. This


indicates that one or more ambiguities exist between the
pink rules. Tool tips, indicating where the ambiguities
exist, appear when you hover over an ambiguous column
with your mouse.

Note

Tool tips help explain the


ambiguity.

Page 16
Expand the Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze
Action

Expand the Rules to reveal sub-rules (rules


without dashes) inside the general rules
(rules with at least one dash value). This
helps you more accurately pinpoint the
source of the ambiguity.

Note
Click on the Expand
Rules icon on the
Studio toolbar. Above, General Rule 1 says “A flight plan
containing cargo weighing between 150,000 and
200,000 lbs (ignoring volume), must be assigned
OR
to a Container.” Because there are only two
possibilities for cargo volume (<300 and >= 300),
Choose Rule Set Æ Studio expands Rule 1 to two possible scenarios
Rulesheet Æ Expand (or sub-rules).
from the Studio
menubar.
When the rules are expanded, the source of the
ambiguity becomes obvious. In scenarios with
cargo weight between 150,000 and 200,000 and
cargo volume less than 300, our rules are in
conflict, defining mutually exclusive actions
(assigning both a Container and a Pallet).
To get your rules right, this scenario must be
addressed!

Page 17
Resolve Ambiguity Errors Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Action
Analyze
To resolve the ambiguity, you can either change
your original rules, or decide that one rule should Override Rule 2.2 with Rule 1.1.
override the other. Let’s implement the override.
In the Overrides row, from the overriding rule, select
the number of the rule to be overridden. Multiple
selections can be made by holding the CTRL key.

Note In large Rulesheets, use the


Ambiguity Filter to display ONLY
those rules that contain conflicts.
With the new override, Rule 2 now
means “Flight plans with cargo volume When finished with Ambiguity
<300 are assigned to a Pallet, except Checking, click on the Collapse
when they have cargo weight between Rules icon on the Studio toolbar to
150,000..200,000, in which case they return the columns to their original
are assigned to a Container.” general form.

Page 18
Check for Completeness Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action
Click on the Check
Check for logical errors in the for Completeness
Rulesheet. icon on the Studio
1 toolbar.

OR

Choose Rule Set Æ


Rulesheet Æ
Check for
Completeness
from the Studio
Action menubar.

This message window informs


us that an additional column
has been added to the
Rulesheet. Click OK to
dismiss the window.
2

Page 19
Resolve Completeness Errors – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

The Completeness Checking


algorithm calculates the set of all
possible mathematical
combinations of all values in all
conditions. The algorithm then
compares this set of possible
combinations to those already
specified in the Rulesheet and
automatically inserts missing
combinations of conditions as
new columns. These new
columns are shaded in green.

Note

The Completeness Check adds condition


sets, but does not specify actions – that’s
the rule modeler’s job. Here, we’ve
selected Pallet and Info as the two actions
for the missing rule.

Page 20
Resolve Completeness Errors – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Note
Don’t forget to add a new Rule Statement for
each new column added by the
Completeness Check. Select the Rule In this example, incompleteness was
Statement ID from the drop-down box to link resolved by specifying actions for column 3,
it with the corresponding column. along with adding a new rule statement.
Once resolved, remove the green highlighting
by clicking

Page 21
Save the Rule Set Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action
1

You must save the Rule Set


before testing it.

Click on the Save icon


on the Studio toolbar.

OR
2 3

Choose File Æ Save


from the Studio
menubar.

1. Navigate to the directory where you want to save the


Rule Set (.ccj file).
2. Type the desired file name in the space provided.
WARNING: don’t use spaces or other forbidden
characters. See Studio Quick Reference Guide for
details.
3. Click Save.

Page 22
Create a New Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Action

Create a new Test.

Click on the New Test


icon on the Studio
toolbar.

OR

Choose File Æ New


Æ Test from the
Studio menubar.

Page 23
Set Up the Test Scenario – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Action
Note
Associate the Test with any open Rule
Set. This ensures that your Test
If you only have one Rule
scenario will be tested by the
Set open, your new Test will
appropriate rules.
automatically be associated
1 with it.

Action

Drag and drop the Cargo entity


from the Vocabulary and drop it
anywhere on the Test’s input
sheet, as shown. Cargo [1] on
the Input Testsheet represents
an ‘instance’ or ‘example’ of the
Cargo Entity.
2

Page 24
Set Up the Test Scenario – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Note

Here, test data will be created from


scratch.
XML test data can also be directly
imported to Studio. See Studio Quick
Reference Guide for more details.

Action
1

Add test data to the Input Testsheet.

1. Double-click on the desired term to open a


data entry box. The data entry box can also
be opened using the Tab key to select the
attribute and pressing Enter to open the
entry box.
2. Type test data in the entry box and then
press Enter to close it.

Page 25
Set Up the Test Scenario – Step 3 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Action

Enter the remaining test data to


complete the Input Testsheet. Notice
that two independent test scenarios Note
are shown in the example.

Unused attributes may be removed by


selecting them and pressing the Delete
key. Shift-click and Ctrl-click are also
supported for multi-selecting contiguous
and non-contiguous attributes, respectively.
Here, the manifestNumber attributes of both
Cargos have been removed.
Attributes whose values are created by
rules may also be removed in the Input
Testsheet – if needed, they will be created
by the rules during execution.

Page 26
Execute the Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Click on the Execute


Action Test icon on the
Studio toolbar.
Execute the Test.
OR
Executing the test sends the data
on the Input Testsheet to the Choose Test Æ
Server included with Studio. The Execute Test from
Server fires the appropriate rules the Studio menubar.
and produces a Results
Testsheet to display the rule
outcomes.

Page 27
Verify the Test Results Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Note
Action

Running the test produces a Results Testsheet


Check the outcome of your test with a red “stop sign” icon, indicating termination
in the Results Testsheet. of the test. It also gives the Input Testsheet a
green “start” icon.

Note

All terms and values in the Messages shown in the table are produced by using
Results Testsheet are the post operator in your rules:
displayed in italic type style.
Severity indicates whether a message contains
All terms altered by rules, information, warnings or violations. In Tester,
including all parent entities, severity levels are also color-coded.
are shown in blue.
Message contains the Rule Statement text.
Entity shows the Entity (in the Input Testsheet) to
which this message is bound or linked.

Page 28
Save the Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Action

Save the Test for future use.

Click on the Save icon


on the Studio toolbar.

2 3
OR

Choose File Æ Save


from the Studio
menubar.
1. Navigate to the directory where you want to store the
Test (.ctj file).
2. Type the desired file name in the space provided.
3. Choose Save.

Page 29
Discover New Business Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Discover
Scope Discover

When the time comes to change your rules, you’ll be


glad you decided to manage them in iProcess Test Model
Decisions Studio.

Let’s go through another development lifecycle, starting


with the discovery of our business requirements. Analyze Deploy

Collect Package Ship


Cargo Cargo Cargo

• Cargo weighing between 150,000 and 200,000 pounds must be packaged in a container
• Cargo with a total volume less than 300 cubic yards must be packaged on a pallet
• Fragile cargo must be packaged in a container
• Non-fragile cargo must be packaged on a pallet

Page 30
Add New Rule Statements Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Switch back to your Rule Set and add two


new rules to assign packaging conditions
based upon whether a Cargo is marked
Fragile or not.

Note

Since the current Vocabulary does not


include a term for fragility, we’ll need to
modify the Vocabulary to support these
two new rules.

Page 31
Edit the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Action

Edit the Vocabulary using iProcess


Decisions Studio’s Vocabulary Editor.

To open the Vocabulary


Editor,

Click on the Vocabulary


Editor icon on the Studio
toolbar

OR

Click on the Project Panel‘s Choose Vocabulary Æ


title bar to activate the Project Edit from the Studio
window. Then click the menubar.
Vocabulary tab to bring this
panel into focus.

Page 32
Add an Attribute – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Right click on the


Action Action
Action
Cargo entity and
choose Add
Attribute from the
Add a new attribute. popup menu.

OR

Choose Vocabulary
Æ Add Attribute from
the Studio menubar.

Page 33
Add an Attribute – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model
Action

Change the attribute name to isFragile and


set the data type to Boolean.

Double click on the attribute


name to type over its initial
default value. Choose the datatype Boolean
as shown in the pull-down
menu above

Page 34
Save the Vocabulary Changes Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

Click on the Save icon


on the Studio toolbar.
Action
OR

Save the Vocabulary and exit the


Vocabulary Editor. Choose File Æ Save
from the Studio
menubar.

Click on the Stop


Vocabulary Editing
icon on the Studio
toolbar.

OR

Choose Vocabulary
Æ Edit from the
Studio menu.

Page 35
Model the New Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Model

New rules:
Action
• Cargo marked fragile must be packaged in a container
• Non-fragile cargo must be packaged on a pallet
Now that the Vocabulary contains the
Attributes required by the two new rules,
complete their models as shown below.

Page 36
Check New Rules for Ambiguities Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action
Action

Check for logical errors in Rule analysis is an iterative process. Here, we repeat the analysis
the Rulesheet. steps because the rules have changed since we first modeled
them. This time, we will remove the override in rule 1 and
resolve ambiguities by assigning different action values for each
ambiguous rule pair. Remove the override by selecting the empty
To review this procedure, cell from the Overrides drop-down box.
refer to page 15.

Page 37
Check New Rules for Ambiguities Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze
Action
Note

Check for logic errors in the Rulesheet.


Rulesheets in the following illustrations have
1. Check for Ambiguities been filtered using the Ambiguity Filter to
show just the ambiguous sub-rules. In
2. Expand the Rulesheet filtered mode, all the sub-rules within
ambiguous general rules are shown side-by-
3. Resolve the contradictions side for easier viewing. Tool tips indicate
which sub-rules are ambiguous.

Page 38
Resolve the Ambiguities – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze
Action

Resolve the first ambiguity.

Action
Action
You can resolve this contradiction in several ways. One method is to specify an
override as illustrated on page 18. A second
Again,method – the
resolve theone we’ll use hereby
contradiction – is to
change the original rules so that actions are the same for the same set
making a business decision to set of conditions.
In this example, choose Container from the value list. This introduces a redundancy
in the Rulesheet, which will be removedidentical actions for the
later by compressing same set
the sub-rules intoofnew
general rules. conditions.

Page 39
Resolve the Ambiguities – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action
Action

Notice how the previous ambiguity in 2.3 has


turned a lighter shade of pink. A tool tip also As before, resolve contradictions by setting
indicates that 2.3 has been modified. identical actions for the same set of conditions.

1 3

2 4
Action Action

Set the action for column 2.4 to Container and Set the action for column 5.3 to Container.
continue ambiguity checking by clicking

Page 40
Resolve the Ambiguities – Step 3 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze
Action

Resolve contradictions by setting identical sets of


actions for identical sets of conditions.
2

1 3
Action Action

Set the action for column 5.4 to Container and continue Set the action for column 2.1 to Container and continue
ambiguity checking by clicking ambiguity checking by clicking

Page 41
Resolve the Ambiguities – Step 4 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze
Action

Resolve contradictions by setting identical


Action actions for the same set of conditions.
2
Identify the next ambiguity.

3
Action

Set the action for column 3.1 to Container. The


icon in the Studio toolbar should now be dimmed or
grayed out, indicating no more ambiguities exist in this
Rulesheet.

Page 42
Collapse the Rules – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action

Disable the Ambiguity Filter by clicking


and then collapse the Rulesheet by
clicking

Note

Studio notifies you that it cannot completely collapse


the Rulesheet into its original general form. That’s
because, by changing many of the actions in
component rules, we have altered the original
general rules.
These changes have also caused our linked rule
statements to become “out of sync” with the
columns in the Rulesheet.

Page 43
Collapse the Rules – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action

Save the Rule Set to force the


columns to renumber.
Click YES to allow the renumber.

Note

The columns and rule statements


have been renumbered. Studio
does its best to keep the rule
statements synched, but you
should always review to make
sure.

Page 44
Compress the Rulesheet – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Note

These 9 rules have redundancies


– look at columns 1 and 9, for
example. Other redundancies are
harder to detect because they
consist of redundant sub-rules,
which are hidden when the
columns are collapsed.

Action

Compress the Rulesheet to


remove redundancies. Click OK
when this window displays:

Page 45
Compress the Rulesheet – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action

Now that the rules have been


compressed, update the rule statements Note
to reflect the new conditions and actions
in each column of the Rulesheet. The
order of columns in your example may You may notice that compression reveals
vary slightly from the one shown. Condition row 2 to be irrelevant in our rules!
This Condition could be removed entirely!

Page 46
Check New Rules for Completeness Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Analyze

Action

Check for Completeness again

Page 47
Modify the Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Action Action Action


Action

You must save the Rule Set Switch to the Test window. Modify the Test scenario.
before testing it.
2 3
1

Click on the Input


Testsheet tab to bring it
into focus.

Drag and drop the


isFragile attribute onto
the Input Testsheet as
shown.

Enter a value for the


isFragile attribute.

Page 48
Modify the Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Note

Your test data may look something like this.

Page 49
Test the New Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Action
Click on the Execute
Test the modified Rule Set: Test icon on the
Studio toolbar.

OR

Choose Test Æ
Execute Test from the
Studio menubar.

Page 50
Verify the New Test Results Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Test

Action

The outcome of your test is


displayed in blue italics on the
Results tab.

Action

Remember to save the updated


Test for future use.

Page 51
Summary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Congratulations! You have now completed two full iterations of the


iProcess Decisions development lifecycle, and understand the basic
concepts of rule modeling, analysis, and testing in Studio.

Add New Rule Statements


Add New Rule Statements
Edit the Vocabulary
Edit the Vocabulary
Add an Attribute
Add an Attribute
Scope Discover Save the Vocabulary
Save the Vocabulary
Model the New Rules
Model the New Rules

Begin the cycle


Modify the Test
Modify the Test Test Model again to continue
Test the New Rules rules development.
Test the New Rules
Verify the New Test Results
Verify the New Test Results

Analyze Deploy

Check New Rules for Ambiguities


Check New Rules for Ambiguities
Collapse and Renumber the Rulesheet
Collapse and Renumber the Rulesheet
Compress the Rulesheet
Compress the Rulesheet
Check New Rules for Completeness
Check New Rules for Completeness

Page 52
Appendix A: Technical Publications Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling

Page 53

You might also like