To jest stara wersja strony!


View page as slide show

MIW 2009 XTT_DROOLS

Cel projektu

Analyze how to design Drools rules with XTT2

Wyszukiwanie systemów Drools

wyszukiwanie

Przykład reguł

rule "Platinum Priority"
	when
		customer : Customer( subscription == "Platinum" )	
		ticket : Ticket( customer == customer, status == "New" )	
	then
		ticket.setStatus( "Escalate" );
		modify ( ticket ) {setStatus( "Escalate" )}
end

Przykład reguł w XML-u

<?xml version="1.0"?>
<rule-set>
  <!-- Ensure stock price is not too high-->      
  <rule name="Stock Price Low Enough">
    <!-- Params to pass to business rule -->
    <parameter identifier="stockOffer">
      <class>StockOffer</class>
    </parameter>
    <!-- Conditions or 'Left Hand Side' 
        (LHS) that must be met for 
         business rule to fire -->
    <!-- note markup -->
    <java:condition>
      stockOffer.getRecommendPurchase() == null
    </java:condition>
    <java:condition>
      stockOffer.getStockPrice() < 100
    </java:condition>
    <!-- What happens when the business 
                      rule is activated -->
    <java:consequence>
        stockOffer.setRecommendPurchase(
                              StockOffer.YES);  
          printStock(stockOffer);
    </java:consequence>
  </rule>
</rule-set>

Testowanie

testowanie

test1

test1

test2

test2

Modelowanie diagramów

modelowanie

ARD

ARD

TPH

TPH

pl/miw/2009/miw09_xtt_drools/prezentacja.1246377226.txt.gz · ostatnio zmienione: 2019/06/27 15:57 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0