Quantcast
Channel: SCN : Popular Discussions - SAP Business Rules Management
Viewing all articles
Browse latest Browse all 1717

Question about Rule Design

$
0
0

Hi all,

 

after seeing Tobias Trapp and Daniel Ridders presentation at the sitMuc I started to play around with BRFplus again. I'm currently trying to implement what is though was a simple requirement. However, after several days of experimenting, reading an thinking I still cant get it to run. What I'm trying to do is the following.

  • KeyKeyKey1I pass a table to BRFplus containing essentially key value pairs, e.g. something like that
    KeyValue
    Key1Value1
    Key2Value2
    Key2Value3
  • Using BRFplus I want to check if the table contains valid data. For my example I defined validity as the following set of rules:
    1. Exactly one entry with Key1 needs to be present
    2. Key2 is optional, but a maximum of one Key2 entries is allowed (by this rule the above example would not be valid)
    3. Value1 needs to be in a certain range, and, if present, Value2 as well.

 

What I did so far is to create Table Operation Expressions to check if only one entry with Key1 is present (expressions IS_KEY1_PRESENT) and if the optional Key2 is present (expression IS_KEY2_PRESENT). Furthermore, I created Table Operation Expressions to select and return the line containing Key1 (expression GET_KEY1_ENTRY)  and Key2 (expressions GET_KEY2_ENTRY) respectively.

 

That is where I'm stuck now. Conceptually I'd first need to create rules or expressions to work with the results of GET_KEY1_ENTRY and GET_KEY2_ENTRY. Next I would need to combine the expressions somehow (e.g. by using a ruleset or a decision tree)  in order to check my validity rules.However, I could not figure out a way of doing this.

 

Could somebody please suggest how to design the expressions and rules for what I'm trying to do?

 

Thanks,

Christian

 

ps.: I'm working on a 7.40 system.


Viewing all articles
Browse latest Browse all 1717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>