Overview: --------- The Imperius binding for Java (JavaSPL) processor currently operates in an embedded mode only. Which means you need to write the wrapper code that interacts with the processor. JavaSPL ships with a sample wrapper under org/apache/imperius/samples/simplepolicies/RunSamples.java The runsamples script simple invokes this wrapper. The /policies folder contains some simple JavaSPL policies that showcase the various features of the language. Prerequisites: -------------- 1. ANTLR 2.7.7 : Can be downloaded from http://www.antlr2.org. Make sure to set the ANTLR_HOME environment variable 2. JDK 142 : The java executable must be on the PATH Running the Samples: -------------------- Open a command prompt and execute the runsamples script This script will execute all the policies one by one. It will first try to delete the policy, then create it and finally run it. Note: If the policy does not exist an exception will be thrown ignore the exception To run a single policy invoke the script as follows: runsamples The Policies: -------------- 1. Basic Policy: A simple policy that demonstrates: -Importing multiple classes with multiple instances. -Invoking methods of imported instances -Returning values as part of decision 2. MacroSample: -Demonstrates how to define and use a Macro within a policy 3. MultiplePolicySample: -Demonstrates how to define multiple sub-policies 4. ComplexPolicy: -Demonstrates the use of several built-in operators including String, Numeric, DateTime and Collection 5. DateTime -Demonstrates several datetime operators 6. InvokeMethodSample -Demonstrates how to invoke a method on the imported instance as part of the decision 7. SimplePolicy -A very simple poliy