Package org.huihoo.workflow.rules

Examples of org.huihoo.workflow.rules.ScriptException


            scriptClass = ctxt.load();
            theScript = (Script) scriptClass.newInstance();
          }
          catch (Exception ex1)
          {
            throw new ScriptException(ex1);
          }

          theScript.init(scriptContext, workflowTransition);
          firstTime = false;
          reload = false;
View Full Code Here


    try
    {

      if (ctxt.isRemoved())
      {
        throw new ScriptException("condition not found");
      }


      if (firstTime)
      {
        synchronized (this)
        {
          ctxt.compile();
        }
      }

      if (reload)
      {
        getServlet();
      }


      return theScript.evalute(workflowWork,paramContext);

    }
    catch (Exception ex)
    {
      ScriptException newEx=new ScriptException(ex);     
      throw newEx;
    }
   
  }
View Full Code Here

        String sciptURI=condition.getContent();
        File scriptFile = new File(options.getScriptDir(),sciptURI);
       
        if (!scriptFile.exists() || !scriptFile.isFile())
        {
          throw new ScriptException("script not found : "+sciptURI);
        }
      }
      else if(condition instanceof XCDATACondition)
      {
       
      }
      else
      {
        throw new ScriptException("unknown condition : "+condition);
      }
     
      synchronized (this)
      {
        wrapper = (ScriptWrapper) rctxt.getScriptWrapper(workflowTransition);
View Full Code Here

      {
        throw ex;
      }
      catch (Exception ex)
      {
        throw new ScriptException(sm.getString("script.error.unable.compile"), ex);
      }
    }
  }
View Full Code Here

    {
      if(ex instanceof ScriptException)
      {
        throw (ScriptException)ex;
      }
      throw new ScriptException(sm.getString("script.error.unable.load"), ex);
    }
    removed = 0;
    return scriptClass;
  }
View Full Code Here

        {
          match = directives[i];
          break;
        }
      if (match == null)
        throw new ScriptException(
          reader.mark(),
          sm.getString("script.error.invalid.directive"));
      reader.advance(match.length());
      // Parse the attr-val pairs.
      Hashtable attrs = reader.parseTagAttributes();
      if (match.equals("script"))
        ScriptUtil.checkAttributes(
          "Script directive",
          attrs,
          scriptDvalidAttrs,
          start);
      // Match close.
      reader.skipSpaces();
      if (!reader.matches(close))
        throw new ScriptException(
          reader.mark(),
          sm.getString("script.error.unterminated", new Object[] { open }));
      else
        reader.advance(close.length());
      Mark stop = reader.mark();
View Full Code Here

      if (end_open != null)
      {
        attrs = reader.parseTagAttributes();
        reader.skipSpaces();
        if (!reader.matches(end_open))
          throw new ScriptException(
            reader.mark(),
            sm.getString("script.error.unterminated"));
        reader.advance(end_open.length());
        reader.skipSpaces();
        ScriptUtil.checkAttributes("Scriptlet", attrs, validAttributes, start);
      }
      Mark stop = reader.skipUntil(close);
      if (stop == null)
        throw new ScriptException(
          reader.mark(),
          sm.getString("script.error.unterminated", new Object[] { open }));
      listener.handleScriptlet(start, stop, attrs);
      return true;
    }
View Full Code Here

          stringBuffer.append((char) ch);
        }
        // Check end of quote, skip closing quote:
        if (ch == -1)
        {
          throw new ScriptException(mark(), sm.getString("script.error.quotes.unterminated"));
        }
      }
      else
      {
        throw new ScriptException(mark(), sm.getString("script.error.attr.quoted"));
      }
    }
    else
    {
      if (!isDelimiter()) // Read value until delimiter is found:
View Full Code Here

    String name = parseToken(false);
    // Check for an equal sign:
    skipSpaces();
    if (peekChar() != '=')
    {
      throw new ScriptException(mark(), sm.getString("script.error.attr.novalue", new Object[] { name }));
    }
    char ch = (char) nextChar();
    // Get the attribute value:
    skipSpaces();
    String value = parseToken(true);
View Full Code Here

        break;
      // Parse as an attribute=value:
      parseAttributeValue(values);
    }
    // Reached EOF:
    throw new ScriptException(mark(), sm.getString("script.error.tag.attr.unterminated"));
  }
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.rules.ScriptException

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.