private final static Logger logger = Logger.getLogger(CustomClassExecutor.class.getName());
public void execute(Map transientVars, Map args, PropertySet ps) throws WorkflowException
{
logger.info("CustomClassExecutor.execute........");
final WorkflowContext wfContext = (WorkflowContext) transientVars.get("context");
String className = (String) args.get("customClass.name");
HttpServletRequest request = (HttpServletRequest) transientVars.get("request");
logger.info("className:" + className);
Iterator paramsIterator = transientVars.keySet().iterator();
while(paramsIterator.hasNext())
{
String key = (String)paramsIterator.next();
logger.info("transientVars key:" + key);
Object value = args.get(key);
logger.info("transientVars value:" + value);
}
Map params = new HashMap(transientVars);
params.putAll(args);
ActionContext.setParameters(Collections.unmodifiableMap(params));
CustomWorkflowAction customWorkflowAction = getCustomWorkflowActionWithName(className);
if(customWorkflowAction != null)
customWorkflowAction.invokeAction(wfContext.getCaller(), request, Collections.unmodifiableMap(params), ps);
else
{
logger.warn("Could not find custom class " + className + ". Is it in the classpath?");
throw new WorkflowException("Could not find custom class " + className + ". Is it in the classpath?");
}