Escolar Documentos
Profissional Documentos
Cultura Documentos
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
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
Page iii
The Business Problem Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Scope
Note
Page 1
The Business Process & Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Discover
Action
Action
• 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
Note
Page 3
Open the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Note
Page 4
Open the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Note
Page 5
Open the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Note
Page 6
Create a New Rule Set Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
OR
Page 7
Model the Rules – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Note
Page 8
Model the Rules – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Note
Note
Page 9
Model the Rules – Step 3 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Note
Page 10
Model the Rules – Step 4 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Page 11
Model the Rules – Step 5 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Page 12
Model the Rules – Step 6 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
Note
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
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.
Page 15
Identify Ambiguities Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Note
Note
Page 16
Expand the Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Action
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.
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
Page 19
Resolve Completeness Errors – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Note
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
OR
2 3
Page 22
Create a New Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Test
Action
OR
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
Page 24
Set Up the Test Scenario – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Test
Note
Action
1
Page 25
Set Up the Test Scenario – Step 3 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Test
Action
Page 26
Execute the Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Test
Page 27
Verify the Test Results Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Test
Note
Action
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
2 3
OR
Page 29
Discover New Business Rules Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Discover
Scope Discover
• 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
Note
Page 31
Edit the Vocabulary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
Action
OR
Page 32
Add an Attribute – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
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
Page 34
Save the Vocabulary Changes Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Model
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
Page 38
Resolve the Ambiguities – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Action
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
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
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
3
Action
Page 42
Collapse the Rules – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Action
Note
Page 43
Collapse the Rules – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Action
Note
Page 44
Compress the Rulesheet – Step 1 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Note
Action
Page 45
Compress the Rulesheet – Step 2 Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Action
Page 46
Check New Rules for Completeness Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze
Action
Page 47
Modify the Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Test
You must save the Rule Set Switch to the Test window. Modify the Test scenario.
before testing it.
2 3
1
Page 48
Modify the Test Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Test
Note
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
Action
Page 51
Summary Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Analyze Deploy
Page 52
Appendix A: Technical Publications Basic Tutorial for TIBCO iProcess Decisions Studio – Rule Modeling
Page 53