Lost In Space: February 2008



SharePoint Business Data Catalog

Sunday, February 17, 2008

Business rule ?

Saturday, February 16, 2008
Start from Wikipedia, what is Business rule,
Real world applications and obstacles
1. overhead and effort to maintain this database of rules. this because severe the more dynamic and fluid the business for an organizaion are.
2. lack of employees to part with their most valuable asset to the organization: their knowledge of the business rules
3. access to viable technology for maintaining business rules
Best practices:
1. Declarative
2. Atomic
3. distinct
4. express
5. business, not technology, oriented
6. business, not technology, owned

Business rules engine
IT use
pluggable, seperate the business rules from the application code, this allow the business users to modify the rules frequently without the need of IT intervention
Design strategies
types of rule engines
1. productin/inference: IF .. THEN
2. reaction/Event condition Action:

BRMS, Business rule Management System
authoring, deployment and management of business rules

Business rules approach
one more tier to system that automate business processes
lower the cost incurred in the modification of business logic
shortens development time
rules are externalized and easily shared among multiple applications
changes can be made faster and with less risk
Technical Detail:
Reta algorithm
sequential algorithm(ILOG and Blaze Advisor terminology)
decision table, decision tree
vocabulary: words, expressions that correspond to business objects and conditions and operations involving them. programming language
rules, can also be modelled
Relation to database management
business rules translate to data integrity constraints
also can be used to specify constructive business policies

Rete algorithm
pattern matching algorithm
A Rete-based expert system build a network of nodes, where each node (except the root0 corresponds to a pattern occurring in the left-hand-side of a rule. the path from the root node to a leaf node defines a complete rule left-hand-side. Each node has a memory of facts which satisfy that pattern. This structure is essentially a generalized Trie
Trie

cannot finish it

Pattern matching
sequences: regular expressions
tree structure

There are 2 rule engines in Micorsoft product:
BizTalk Server Business Rules Framework and Workflow Foundation Rules Engine

Differences Between WF Rules Engine and BRE Included With BizTalk
-WF rules don't have the concept of vocaularies, which exist in the BRE
-the rules in WF allow an "else" condition, unlike the BRE where you usually set up conditions, and then negation conditions
-There is no real concept of versioning in the WF rulesets. the only versioning that you do is assembly based. BRE rulesets are versioned and natively reside in a physical data store
-The BRE has long-term facts used by the engine, while WF rules don't really have that concept
-the WF rules engine does not use a Rete-based algorithm, unlike the BRE which does. this is done because human workflow based rules benefit from the alternate algorithm
-Remember that the BRE offers many infrastructure/management features that WF does not. For instance, native persistence store, a business-friendly design environment, tracking and analysis of rules, and a scalable hosting service




relate terms:
BPM, Business Process Management
BRM, Business Rules Management



Angle, Bulge ...

Thursday, February 14, 2008
Here is some thought about Angle and Bulge
Angle,
DTR, RTD,
0 to 360,
equal 10 = 370
normalize
plus, minus
equal with direction
equal without direction: 20 = 200
bulge
from bulge, start point, end point -> center point, radius, start angle, end angle
from center point, radius, start angle, end angle -> bulge, start point, end point

1. in ObjectARX:
a. from bulge
double bulge=pline_nodes_[position].getBulge();
gePoint pt1, pt2, pt3;

getPointAt(position, pt1);
getPointAt(position+1, pt3);

geVector vSeg=pt3-pt1, vPerp=vSeg.crossProduct(normal_);

pt2=pt3.midPoint(pt1)+0.5*bulge*vPerp;
arc=geArc(pt1, pt2, pt3);

b. from Angle To Bulge
double PI = 4 * atan(1);

diffAngle = Endangle - Startangle;

if(diffAngle < 0)
{
diffAngle = diffAngle + 2 * PI;
bulge = tan( diffAngle / 4) * -1;
}
else
{
bulge = tan( diffAngle / 4) ;
}