Declaration[] innerDeclarations,
WorkingMemory workingMemory) throws Exception {
Object[] localVars = ((MVELAccumulatorContext) context).getVariables();
MVELAccumulatorFactoryContext factoryContext = (MVELAccumulatorFactoryContext)workingMemoryContext;
VariableResolverFactory factory = factoryContext.getActionFactory();
DroolsVarFactory df = ( DroolsVarFactory ) factory.getNextFactory();
Object[] vars = ((MVELAccumulatorContext) context).getShadow().remove( handle.getId() );
for ( int i = 0; i < df.getOtherVarsPos(); i++ ) {
factory.getIndexedVariableResolver( i ).setValue(vars[i]);
}
if ( localVars.length > 0 ) {
for ( int i = 0; i < df.getOtherVarsLength(); i++ ) {
factory.getIndexedVariableResolver( df.getOtherVarsPos() + i ).setValue( localVars[i] );
}
}
// reverseUnit.updateFactory( null, null, handle.getObject(), (LeftTuple) leftTuple, localVars, (InternalWorkingMemory) workingMemory, workingMemory.getGlobalResolver(), factory );
MVELSafeHelper.getEvaluator().executeExpression( this.reverse,
null,
factory );
if ( localVars.length > 0 ) {
for ( int i = 0; i < df.getOtherVarsLength(); i++ ) {
localVars[i] = factory.getIndexedVariableResolver( df.getOtherVarsPos() + i ).getValue();
}
}
((MVELAccumulatorContext) context).setVariables( localVars );
}