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

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

What if you want to write your own business rules? This page shows you how. We assume that you've already checked out the Online Examples . And you've looked at the User Getting Started to see how you can put your own information into these examples.

Introduction to the Rule Player

There are two main ways of interacting with Red-Piranha to build and run your business rules

  • Red Piranha - the Web Interface for applying rules to your speadsheet. You saw this in the Online Examples, and used it as part of the User Getting Started. These samples allow you to change the information in the spreadsheets, but not the rules that run in them.

  • Rule Player; If you want to build your own rules, you'll need the Rule Player. The Rule Player is downloaded from the web, but uses the power of your local machine. After it packages the rules, it uploads the finished package to the web, where we can share it with other users via Red Piranha.

(There is a third way if you're a developer, as set out here),

How does it work

We're not going to actually run any rules using Ruleplayer (see End User Getting Started for that). What this page shows you how to do is how to write and prepare your rules so that other people can use them.

What you'll need

Google Docs Account The completed, packaged rules are loaded as a file into Google docs. Obviously you'll need to create a Google account if you don't already have one.

Writing your own Rules

TODO Complete Section

  1. Edit rules online - e.g. using Google Docs, or host them anywhere on the web (e.g. Google Sites, file on webserver TODO instructions for these
  2. Make the rules publicly available (so Red-Piranha can find them)
  3. TODO Helps if links to red-piranha project
  4. TODO Suggest copy existing template

Getting the Rule Player

TODO Complete Section and update in line with new screenshots / configuration

There are three options for running the Rule Player. More information on each is provided in the next sections.

the Rule Player Locally From a Download

  • Local Download, Batch (.bat) or Shell (.sh) file Same as the previous option, but click on RulePlayer.bat / RulePlayer.sh to start the Rule Player. The main difference is that is is 'one less thing to go wrong' (i.e. Java Webstart), but you lose the automatic install of Java that Webstart gives you.

Either of these methods, if successful, you should see a screen similar to the following;

RulePlayer Console

Using the defaults (as set in the properties file - next section), you should see the following text;

Compiling Rules...
Using file:http://red-piranha.googlecode.com/svn/trunk/war/sampleresources/SpreadSheetServlet/log-then-modify-rules.drl
Compiling complete

Running the Rule Player Locally From a Download

TODO Complete

# Properties file for when the RulePlayer is unpackaged / run locally

# The Url (Web Address) of the Rule File we wish to package 
RuleFile=http://red-piranha.googlecode.com/svn/trunk/war/sampleresources/SpreadSheetServlet/log-then-modify-rules.drl

# Where we store the packaged rule file locally before uploading
KbFileName=LocalRuleFile.kb

# Your Google UserName - you'll be asked for your password later when the RulePlayer runs
GoogleUser=SOME-GOOGLE-USER@GMAIL.COM

# Only set these if you are having difficulty connecting to the internet (e.g. in a corporate environment)
# Uncomment (remove # at start of line) first
# Ask your friendly IT staff the values that you should use
# ProxyHost=SomeCorporateProxy
# ProxyPort=80
  • Configure Proxy - edit the rulerunner.properties file to contain the Proxy Host and Proxy Port that you use to reach the Internet (check your web browser / Internext explorer settings as they are likely to use same values).

Running the Rule Player Directly from Web Start

TODO Complete

Note that this may not currently work on your Machine due to

  1. The way the Jar (download) is packaged
  2. The need to configure the JNLP file

Work in progress to resolve this issue

Running the Rule Player

TODO Complete Section

For the moment , take a look at the DevDeveloperGettingStarted to see how to run the Rule Player through eclipse

  1. Screenshot; Should start automatically
  2. Run again if press the big green button
  3. Should see the following txt

Deploying to Your Own Google App Engine

TODO Complete Section

TODO Code for this not yet implemented. For the moment use ours - see UserEndUserGettingStarted

  • Link to Google App Engine Launcher
  • Link to where to get the WAR file to deploy
  • Doc how to get Google App engine account, what it is etc.

Errors when running the Rule Player

TODO Complete section

  • Refer to FAQ
  • No Java Installed
  • Errors getting started (Java, download etc)
  • Errors in compiling rules
  • Errors in uploading

Using your New Rules

TODO Complete Section

  • By default rules are shared (explain how)
  • Link to rules directory
  • Highlight differences in running rules from UserEndUserGettingStarted

Sharing and the Community

TODO Tie this doc to the community

  • How do I get help
  • Where do I find more examples?
  • Where can I show off my example?
  • Auto submit of successful deploys
  • why your email is added to email list (and how to remove?)
  • Gallery

Now What can I do with this

TODO Complete Section
































Sign in to add a comment
Powered by Google Project Hosting