Book a Demo

Author Topic: modeling conditional business rules  (Read 13586 times)

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
modeling conditional business rules
« on: March 06, 2010, 03:24:24 am »
I'm trying to find an elegant way to model some data quality rules for Meteorological observations (the rules are used to flag that something 'may' be wrong)

Simple range checks are easy.

For example, in Canada the observed temperature should be in general less than 40C, and greater than -55C.  That rule is pretty straight forward, and was easy to model with the Rule Composer in EA.

What I'm trying to model is the more complex checks we do:  customized range check, temporal check, multi-variable check, and spatial check. Ideally in a form that I can generate code from to help with system testing.  

Examples of each additional check:

Customized range check:  The upper and lower limits change depending on the location and time of year.  
E.g. in July the lower limit in Toronto is 10C,   But the lower limit in Regina could be 5C for July

Temporal check:  For the same location: In 1 hour the temperature should only increase or decrease by 6C.  In 2 hours temperature should have changed at least once (check for 'stuck' sensors)

Multi-variable check:  If the present weather sensor is reporting snow the temperature should not be greater than 5C

Spatial Check: The current temperature should not have a greater than +/- 5C difference from any other temperature observations measured within the past 30 minutes within a radius of 50KM and +/- 150m difference in altitude.

I'm going to keep working on this, and if I find a method that works, I'll pass it on.

beginner

  • Guest
Re: modeling conditional business rules
« Reply #1 on: March 06, 2010, 06:35:40 am »
How do you describe BR at all in EA? Do you use a special profile? Or just OCL?

b.

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Re: modeling conditional business rules
« Reply #2 on: March 06, 2010, 07:10:03 am »
http://www.sparxsystems.com/uml_tool_guide/extending_uml/business_rule_modeling.html

Not all versions of EA have this feature.  I'm using the Business and Software Engineering Edition.

I purchased it specifically to make use of the Rule Composer.   Overall it's worked well, I'm just not sure how to model the examples I posted in a way that will generate useful code.

beginner

  • Guest
Re: modeling conditional business rules
« Reply #3 on: March 07, 2010, 12:25:35 am »
I would be rather suspicious with a few code lines generated for business rules. I'd rather expect to have a rules engine working life on BPEL or something like that. Are you actually coding based on business rules?

b.

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Re: modeling conditional business rules
« Reply #4 on: March 09, 2010, 01:40:40 am »
I'm hoping the the EA generated code can be used as part of the testing process.  

E.g given a set of inputs do I get the same outputs from both the component optimized by the developers and the component created from the EA generated code.

The example I gave is pretty simple, but represents the key data anaysis patterns I will be dealing with.