org.yawlfoundation.yawl.worklet.support
Class RdrConditionFunctions

java.lang.Object
  extended by org.yawlfoundation.yawl.worklet.support.RdrConditionFunctions

public class RdrConditionFunctions
extends Object

A class that will allow developers to define functions that can be called via conditional expressions in rules. To successfully add a function: 1. Add the function (method body) to the 'function definitions' section 2. Ensure the function (method) is declared 'private static' 3. Add the function's name added to the list of '_functionNames'. 4. Add a mapping for the function to the 'execute' method, following the examples 5. Ensure the function returns a String value. Once the function is added, it can be used in any rule's conditional expression Currently only a STUB with a couple of examples

Author:
Michael Adams v0.8 04-097/2006

Field Summary
static String[] _functionNames
           
 
Constructor Summary
RdrConditionFunctions()
           
 
Method Summary
static String execute(String name, Map<String,String> args)
          Executes the named function, using the supplied arguments
static boolean isRegisteredFunction(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_functionNames

public static final String[] _functionNames
Constructor Detail

RdrConditionFunctions

public RdrConditionFunctions()
Method Detail

isRegisteredFunction

public static boolean isRegisteredFunction(String name)

execute

public static String execute(String name,
                             Map<String,String> args)
Executes the named function, using the supplied arguments

Parameters:
name - the name of the function to execute
args - a map of String key-value pairs. Note that every map will contain a key called 'this' that has as its value an xml String of the workitem being evaluated
Returns:
the function's result


Copyright © 2004-2012 The YAWL Foundation.