Package com.opensymphony.workflow

Examples of com.opensymphony.workflow.WorkflowContext


    {
        boolean passesCondition = true;
       
        try
        {
            WorkflowContext context = (WorkflowContext) transientVars.get("context");
            String roleName = (String)args.get("roleName");
            String userName = (String)args.get("userName");
           
            logger.info("passesCondition.............");
            logger.info("caller:" + context.getCaller());
            logger.info("roleName:" + roleName);
            logger.info("userName:" + userName);
           
            InfoGluePrincipal principal = UserControllerProxy.getController().getUser(context.getCaller());
           
            if(userName != null && userName.length() > 0 && !principal.getName().equals(userName))
                passesCondition = false;
           
            if(roleName != null && roleName.length() > 0)
View Full Code Here


    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?");
        }
View Full Code Here

    //~ Methods ////////////////////////////////////////////////////////////////

    public void execute(Map transientVars, Map args, PropertySet ps) throws WorkflowException
    {
        final WorkflowContext wfContext = (WorkflowContext) transientVars.get("context");

        String actionName = (String) args.get("action.name");
        GenericDispatcher gd = new GenericDispatcher(actionName);
        gd.prepareContext();
       
        ActionContext.setPrincipal(new Principal() {
                public String getName() {
                    return wfContext.getCaller();
                }
            });
        ActionContext.setApplication(args);
        ActionContext.setSession(ps.getProperties(""));
        ActionContext.setLocale(Locale.getDefault());
View Full Code Here

TOP

Related Classes of com.opensymphony.workflow.WorkflowContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.