BRE Rules

Viewing 2 reply threads
  • Author
    Posts
    • #17047

      How to implement IF-THEN-ELSE condition in one rule.

      example

      if name="latha"
      then status="valid"
      else status="invalid"

      or any nested if-the-else..

      one more query is i need to take record from sql database table based upon some condition (staus="valid") and implement some rules
      in BRE. created a sql receive schema,adapter and called call rules in orchestration. will that be o.k

      can anyone help me plaase.

      thanks in advance.

       

    • #17049

      unfortunately none of the patterns can be done easily. The straight if-then-else can be implemented by priority your rules and use either vocabulary or interim XML as "Variable" for condition set or check.

      I might be wrong but the nested condition just can't be done by BRE… 

       

    • #17051

      There is no direct way to do "else".

       The normal way to achieve this in one policy is to have two rules, one which is the "not" of the other.

      Or, as the previous poster suggested, you can create an intermediate result and check that in another rule. However, this tends to produce logic which is very hard to read.

       By the way, if I understand correctly, not having an "else" clause is quite normal in rules languages.

      John D.

Viewing 2 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.