Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 31 Introduction to WebStudio : Introduction to TIBCO BusinessEvents WebStudio

Introduction to TIBCO BusinessEvents WebStudio
TIBCO BusinessEvents WebStudio is a TIBCO BusinessEvents online component consisting of a client, WebStudio, and a server, Rules Management Server (RMS).
WebStudio Component
TIBCO BusinessEvents WebStudio is an online component which allows business users to create/manage business rules in a web browser. In TIBCO BusinessEvents WebStudio user defines an executable rule (business rule) based on the rule template and rule template view defined by developer in TIBCO BusinessEvents Studio. Similar to TIBCO BusinessEvents Decision Manager, a decision table in TIBCO BusinessEvents WebStudio is defined using the virtual rule function. Rule templates, rule template views, and virtual function are created in TIBCO BusinessEvents Studio by developers and stored in RMS repositories.
Rules Management Server (RMS) Component
Rules Management Server (RMS) is a server-based component that manages the lifecycle of WebStudio artifacts and WebStudio user access.
Using a menu of options in TIBCO BusinessEvents WebStudio, RMS allows business users to check out projects and check them in, subject to an approval process that RMS also provides. The workflow process can be customized. For a more detailed overview see WebStudio and RMS User Workflow.
Before RMS can be used, some configuration is required, as explained in Introduction to Rules Management Server (RMS).
Technical User Tasks
As a technical user you configure RMS and the TIBCO BusinessEvents WebStudio components, and set up project resources required for business users to create decision tables or business rules. You also deploy decision tables or business rules when they are ready for use, either in an enterprise archive (EAR) file, or as class files. Class files can be deployed for use at startup, or hot deployed. They can also be unloaded from a running engine. You also define access control settings and can act as an approver to ensure that decision tables and business rules created by business users are appropriate for use.
Virtual Rule Functions and Decision Tables
At designtime, technical users add virtual rule functions (VRFs) to a TIBCO BusinessEvents project. A VRF has no body, similar to a Java interface. Its implementation is provided using decision tables authored in TIBCO BusinessEvents WebStudio. VRFs are used in the TIBCO BusinessEvents project like any other rule function; they can be called from rules or other rule functions. Here is a simple example:

 
/**
* @description
*/
virtual void rulefunction Virtual_RF.Applicant_VirtualRuleFunction {
   attribute {
      validity = ACTION;
 }
   scope {
      Concepts.Applicant applicant;
      Events.ApplicationReceived applicationreceived;
   }
   body {
 
   }
}

 
In TIBCO BusinessEvents WebStudio, business users add decision table resources to VRFs. The decision table provides the body to the VRF, also known as the VRF implementation.
One VRF can have more than one decision table. If a VRF has more than one decision table, functions in TIBCO BusinessEvents determine how the tables are used.
Rule Template and Business Rule
At designtime users add rule template to a TIBCO BusinessEvents project. Rule template is a specialized rule that contains a pre-conditions section which defines the pre-conditions which must be met in addition to the conditions defined by the business user in a business rule.
The Action Context section of a rule template defines all possible actions that can be taken by a business rule (after all conditions are met). Only the action context statements that the WebStudio user selects and defines as commands in the business rules are actually taken (depending on rule evaluation at runtime). For a businsess rule execution to succeed, a business rule definition must include all Actions and the order should be maintained. Completing the definition of an action is a WebStudio user task. If bindings are used (and a view) then in WebStudio, the business rule writer only has to enter the binding values to complete the definition. Action context statements are of three types: create, modify, and call, plus arbitrary actions.
Business User Task
Rule Building with Business Rules
As a business user, you check out projects from RMS, build business rules, and submit them for approval.
Business rules provide builder or a user-friendly HTML form to build rules. In builder you specify the conditions in the “when” section and the actions in the “then” section. You can use artifacts and supported operators for building conditions and actions. In user-friendly HTML form, you fill up the values for the conditions and actions.
Rule Building with Decision Tables
As a business user, you check out projects from RMS, build decision tables, and submit them for approval.
Decision tables provide a graphical way to build complex business rules. You create table columns by dragging and dropping predefined properties onto the decision table framework. The properties belong to ontology resources defined in the TIBCO BusinessEvents project. However, you can only use the properties specified in the VRF. Columns can be created in other ways too. You then define threshold values (conditions) and actions in the cells of the table. Each row can be thought of as one rule in a table made up of many rules. The individual rules are often straightforward, as in the following examples.
Three Rule Conditions
Person.age < Max(20, Parent.age)
Person.creditscore >= Math.function(...)
Person.gender == "female"
Three Rule Actions
Application.status = "ACCEPTED"
Application.credit = 4000
sendNotification()
However, one decision table can consist of hundreds, even thousands of rules each of which is executed only when its specific conditions are satisfied.
Exception Tables
Each decision table can optionally have another table known as an exception table. The purpose of the exception table is purely organizational: it enables you to separate the business logic of the main decision table (added by business users) from any non-business logic (generally added by technical users). For example, in the exception table, you could capture situations where fields are blank or contain invalid values, and define actions that send notifications or set return values. The rows of a decision table plus the rows of its exception table are considered in an RTC. If you prefer, you can put non-business logic in the main table instead of using an exception table.
Table Analyzer
The Table Analyzer feature analyzes decision tables and reports problems, such as uncovered ranges for conditions, uncovered domain entries, different set of actions for identical conditions. Table Analyzer creates a sparse matrix data structure representing an optimized form of decision tables in memory.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved