My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
UserEndUserGettingStarted  

Featured
Updated Jun 6, 2011 by paul.m.browne

TODO Tidy this page

TODO Resize images

You've already checked out the Online Examples . But how do you try out those examples with your own information? This page shows you how.

This section shows you how to apply Business Rules to your spreadsheets.

  • Spreadsheet + Business Rules = Result

Why would we want to do this?

  • Excel Formulas can get too complicated. Rules are more simple.
  • Same for Excel Macros - and they have security concerns. You can tightly control the rules.
  • Google Spreadsheets are like Excel online, but don't have all the power. Rules add them back.
  • You control the rules. Who changes the Excel file when you're not looking?

How does it work

TODO Complete Section

When you're finished this section, you should be able to

  1. Tell Red Piranha where the Spreadsheet is, containing all your information, numbers and other data.
  2. Tell Red Piranha where the Business Rules are that you want to apply to this spreadsheet.
  3. Run the Rules
  4. View the Result

|| This sample is a work in progress. So for the moment you can use the existing excel spreadsheets, but not upload your own. Watch this space.

What you'll need

Google Account So that you can sign in (via Google) to run the example
Pointer to Red-Piranha on the Web Unless you've been told otherwise, use this web link: http://red-piranha.appspot.com/

Step by Step Guide

TODO complete Section

Click to Enlarge

excel named ranges




Sample Screenshot of Excel Spreadsheet before rules are run Click to Enlarge

excel before

Click to Enlarge

Red Piranha Signin Screen 1

  • Sign In to Google

Click to Enlarge

Red Piranha Signin Screen 2

Click to Enlarge

Red Piranha Screen 3 - run rules

  • Select the rules you want to run from the drop down
    • Location of Rules; a package of rules that somebody else has already built PowerUserGettingStarted if you want to do this yourself. Make reference to the samples that come with this.

|| This sample is a work in progress. So for the moment you can use the existing rules, but not yet upload your own. Watch this space.

  • Hit the Go Button ('Run Sample')
  • View the Result
    • Screenshot of example

Click to Enlarge

excel after

What just happened

Another a work in progress. Sample uses full Drools language, being upgraded to use a DSL (i.e. a clearer, more 'English' like language).

TODO complete Section

TODO move this section to 'power rules'

  • These rules match against (when) every named range in the spreadsheet and (then) turns the rules orange.
  • Rules that just ran are below

  package net.firstpartners.sample.ExcelDataRules;

  import net.firstpartners.drools.log.ILogger

  import net.firstpartners.spreadsheet.Cell;
  import net.firstpartners.spreadsheet.Range;

  global ILogger log;

  rule "log then modify cell values" 

   when
	$cell : Cell(modified==false)
       
    then
        	   
    	//Note: use the 'modify' block instead 
    	//want to give the rule engine a chance to react to these changes
    	$cell.setModified(true);
    	
    	 //Logging message
    	log.info("initial cell value:"+$cell);
    	
 end
  

What do I do next

TODO complete Section

  • Suggestions on how to play with the data
  • Suggestions on how to write your own business rules - PowerUserGettingStarted is a good next step as it shows
































Sign in to add a comment
Powered by Google Project Hosting