}
public int getValue(final KnowledgeHelper khelper,
final Rule rule,
final WorkingMemory workingMemory) {
VariableResolverFactory factory = unit.getFactory( khelper, ((AgendaItem)khelper.getMatch()).getTerminalNode().getSalienceDeclarations(),
rule, null, (LeftTuple) khelper.getMatch().getTuple(), null, (InternalWorkingMemory) workingMemory, workingMemory.getGlobalResolver() );
// do we have any functions for this namespace?
Package pkg = workingMemory.getRuleBase().getPackage( "MAIN" );
if ( pkg != null ) {
MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
factory.setNextFactory( data.getFunctionFactory() );
}
Object value = MVEL.executeExpression( this.expr, factory );
if (value instanceof String) {
value = TimeUtils.parseTimeString( (String)value );