Custom Java Code commands are a set of “standard” Java classes that are configurable in the properties file. With these standard Java classes, you do need to write any Java code— you just need to understand what the command does and the parameters it takes. Enter the following to invoke these commands:
alter system solve constraint using rule "MyRule1"
MyRule1 is defined in the properties file as follows:
ConstraintSolver.MyRule1.classname=com.interlacesystems.rules.PreviousValueCopier ConstraintSolver.MyRule1.description=Copies current week values to previous week ConstraintSolver.MyRule1.SourceMeasures=MS DEMAND ConstraintSolver.MyRule1.TargetMeasures=LAST WEEK MS DEMAND ConstraintSolver.MyRule1.Cube=DriveDemand ConstraintSolver.MyRule1.Condition=isNotPast ConstraintSolver.MyRule1.Levels=DriveMedia-Level1,Week
Custom java classes are solvers: they solve a violation of some business rule or constraint. Standard solvers take cube, levels, and condition as arguments.
Copy previous value—Copies values from one measure to another using the classname com.interlacesystems.rules.PreviousValueCopier. Preserves the values from one week (month) to another (month), and is invoked before loading values for the next time period. The new value is stored in the source measure after the data refresh, values between the two time periods are compared.
Clear user input—Clears user-input values and returns to the original calculated or loaded value. The following code retrieves baseline loaded values
ConstraintSolver.MyRule.classname=com.interlacesystems.rules.ClearUserInput ConstraintSolver.MyRule.description=Clear Measures from DriveDemand cube ConstraintSolver.MyRule.Cube=DriveDemand ConstraintSolver.MyRule.Measures=MS DEMAND,MS DRIVE DEMAND
In this example, the classname is com.interlacesystems.rules.ClearUserInput and the parameters are cube and measures.
Conditions supported by Integrated Operational Planning:
isCurrent—Only the current time members of the cube participate in the solver work. As time elapses, the solver works on different time members.
isPast—Only the past time members participate in the solver work.
isFuture—Only the future time members participate in the solver work.
isNotPast—The current and future time members participate in the solver work.
isNotCurrent—The past and future time members participate in the solver work.
isNotFuture—The past and current time members participate in the solver work.