Module 42-43 Siebel Business Rules

Preview:

Citation preview

1 of 28Siebel Business Rules

Siebel 8.0 Essentials

Module 41: Siebel Business Rules

3 of 28Siebel Business Rules

Module Objectives

• To know the process of automating business decisions and logic in Siebel applications using Haley Authority

• To describe Siebel Business Rules architecture• To understand how to create business rules and deploy them

4 of 28Siebel Business Rules

Implementing Business Logic in Siebel Applications

• Can often be done using declarative configuration such as:– Properties in business components and fields– Siebel workflows– Siebel state models– Occasionally requires custom scripting

• Custom scripting can result in:– Business logic that is distributed throughout the application– Difficult to understand the complete set of implemented logic– Business logic that is represented in multiple ways with different syntax

• Difficult to modify to meet new requirements• The need to compile and deploy a new Siebel repository file (SRF)

5 of 28Siebel Business Rules

Business Challenge

• Companies want a more unified way to implement business logic– Centralized store of business rules or logic that can be easily modified to

incorporate changing business processes– Reviewable by non-implementers such as business analysts– Deployable without recompiling the SRF file• Allows updating of business logic at run time

6 of 28Siebel Business Rules

Solution: Siebel Business Rules

• Provides the ability for companies to create and enforce rules that capture their business policies

– Rules are expressed in “natural English” rather than a script or SQL statements

– Rules can be specified and reviewed by business experts

– Rules are centrally developed and administered

– Rules are enforced globally throughout the Siebel application

• Uses client-side configuration rather than repository-based configuration and compilation

– Allows rules to be created, updated, and deployed during run time

• Groups of rules, or modules, for different purposes and applications can be developed and deployed separately:

– Versioned objects help to easily revert to previous versions.

– Access levels to modules can be used to define who may modify particular rules and modules

7 of 28Siebel Business Rules

Examples of Uses of Siebel Business Rules

• Perform validation of data• Provide default values for fields in records• Provide default child records• Update records• Implement dynamic read-only/required behavior• Compute values of parameters to be used in decision steps in workflow

process and UI tasks• Perform business calculations

– Determine if a warranty applies– Determine if a customer is eligible for a discount or offer and explain why

8 of 28Siebel Business Rules

Siebel Business Rule• Is the familiar connotation for well-defined business processes.• Logical statements constructed that capture and implement business

processes in Siebel applications. • Is a conditional or qualified statement about business entities and

characteristics that apply in a business environment– Is written using the rules of English grammar

• Are created using HaleyAuthority• Are executed in the Siebel client using a run-time inference engine

9 of 28Siebel Business Rules

Concepts

• Are nouns that represent the entities and their characteristics

– Are used to build rule statements

– Play roles in relations

– May include nouns or noun phrasings, including adjectives• Correspond to business components and fields in the Siebel data

model

10 of 28Siebel Business Rules

HaleyAuthority

• To implement natural language business rules to automate decisions declaratively

• Is a separate third-party application used to examine and develop Siebel business rules

– Is installed as part of a Siebel Tools installation– Is invoked from the Siebel Tools program group

• Imports relevant object definitions from the Siebel development repository

• Generates the corresponding Haley concepts• Is used to author the rule statements based on the generated concepts• Stores concepts and statements in a separate database referred to as a

knowledge base• Deploys rules to a set of tables in the Siebel run-time client

11 of 28Siebel Business Rules

Run-Time Inference Engine

• Is a third-party rules engine used to evaluate and execute business rules at run time

• Is installed automatically in the Siebel client during a standard client installation

• Is accessed by calling the Business Rules Service business service– Serves as the interface to the inference engine

• Can be invoked using:– Runtime events– Siebel workflows– Siebel Task-based UI– Business services

• The same business logic (rule module) can be reused in any of these contexts.

• Allows you to simulate rules execution before deployment

12 of 28Siebel Business Rules

Exploring Rules

• Use HaleyAuthority to examine rules– Click the Modules & Statements tab to display rule statements

13 of 28Siebel Business Rules

Structure of Rules• Rules are written using English grammar (“natural English”)• A given rule can be expressed in several ways• Common practice is to create statements followed by qualifiers that

determine if the statement applies– If: statement applies when at least one if qualifier is true– Unless: statement does not apply when unless qualifier is true– Only if: statement applies when all only if qualifiers are true

14 of 28Siebel Business Rules

Rule Statements• A statement can be either a:

– Statement of fact• Example: An expense report is a valid expense report

– Statement of action• Set “Reimbursable Flag” of an expense item to false

• Siebel-specific actions consist of three action types– Actions: Produce output or modify data in the Siebel application• Set a field value, invalidate with reason

–Invalidate with reason raises an error but does not stop evaluation of rules– Functions: Return a value from the Siebel application• Get profile attribute, get active view name

– Predicates: Return a Boolean value• User in task mode, currency is equal to

15 of 28Siebel Business Rules

Concepts• Concepts are generated

automatically using the Siebel Object Importer in HaleyAuthority

– Entities correspond to Siebel objects

– Values correspond to single-value fields of objects

• Click the Concepts tab in HaleyAuthority to display the concepts

– Entity: Describes entities (things) in the business model

• Value: Describes characteristics of entities in the business model

• Rules developers must not:– Modify the underlying concepts

– Create additional concepts manually

16 of 28Siebel Business Rules

Entities

• Expand Entity to display the entities– Represent the business components imported from the Siebel repository

Expense and Expense Item are Business Components imported

for these rules

17 of 28Siebel Business Rules

Value

• Expand Value and its children types to display the values• Represent business component fields imported from the Siebel

repository– Are grouped by the type of the field

18 of 28Siebel Business Rules

Phrasings

• Consist of short expressions that capture a relationship between concepts

– Typically represent the relationship between a business component and one of its fields or a child business component

• Are used to build rule statements

19 of 28Siebel Business Rules

Developing Rules

• 1. Create a New Knowledge Base• 2. Import Siebel Object Definitions• 3. Create a Rule Module• 4. Deploy the Rule Module

20 of 28Siebel Business Rules

1. Create a New Knowledge Base

• Start HaleyAuthority from the Siebel Tools program group• Select the ODBC connection string for the new knowledge base

21 of 28Siebel Business Rules

2. Import Siebel Object Definitions

• Invoke the Siebel object importer– In HaleyAuthority, select File > Import > Siebel Object

• Provide the connection information for:– Master repository data source (source of object definitions)– Run-time data source (environment where rules will be run)

22 of 28Siebel Business Rules

2. Import Siebel Object Definitions…

• On the first import for a new knowledge base the following occurs immediately:

– Object definitions relating to currency and currency code are imported– Concepts to support Siebel currency calculation procedures are created– Siebel-specific actions, functions, and predicates are created

• After currency-related concepts are created:\– Select Import Siebel Objects– Specify the Siebel Business Object– Select the business component and, possibly, child business components– For each selected business component, select one or more fields

• Inspect the concepts and the phrasings created• Verify that the entities and values corresponding to the objects and

fields have been created

23 of 28Siebel Business Rules

3. Create a Rule Module

• A module is a collection of rule statements that are deployed together• Suggestion:

– Create a rule module to contain only the statements that need to be evaluated as a set by the rules engine

– Name the rule module to indicate how the module will be invoked

• A module can be divided into submodules to improve readability• Click the Modules & Statement tab• Add a new module (and submodules if desired)• Add one or more statements

– Use the Edit Statement dialog box to enter the statement

24 of 28Siebel Business Rules

4. Deploy the Rule Module

• Invoke the Siebel Deployer– In HaleyAuthority select Tools > Siebel Deployment

– Verify the connection parameters for the run-time data source

– Select the modules to deploy and click OK

25 of 28Siebel Business Rules

Administer Deployed Rules

• In the Siebel client, navigate to Administration - Business Rules > Rule Modules List– Select the deployed rule module– Specify the business object that will provide data to the run-time rules engine• Should be the business object specified for object import

• Create one or more Rule Module Relation records– They identify the business components necessary to evaluate the rules

• Click New and select the records that specify the parent-child relationships captured in the rules

• Click the Activate button in the Rule Modules list applet to set the status to active– Only active rules are evaluated by the rules engine

26 of 28Siebel Business Rules

Creating a Run-Time Event and Action Set

• In the Siebel client, navigate to Administration - Runtime Events > Action Sets. – Create a new action set, and a child action of BusService type

– In the More Info applet Specify Business Rule Service and RunRules as the business service name and method

– Specify the rule module name as the context

• Create an event record for the business component and test with appropriate data– Specify the desired run-time event

– Assign the action set

– Select Reload Runtime Events from the applet menu

Rule Module Name

27 of 28Siebel Business Rules

Module Highlights

• Business policies can be captured by users using Siebel Business Rules

– Are expressed in natural English– Developed by client-side configuration

• Siebel Business Rules consist of:– Authoring tool accessible from Siebel Tools– A run-time execution engine accessed by calling a business service

• A rules module consists of multiple statements based on a set of predefined concepts, actions, functions, and predicates

– Concepts correspond to business components and fields in the Siebel repository

28 of 28Siebel Business Rules

Lab

• In this lab you will:– To examine a rule module and identify the business logic – To import the Siebel objects in to the Haley Authority Business Rules

Developer and examine them

Recommended