Package org.openbp.server.engine.script

Examples of org.openbp.server.engine.script.ScriptEngine


    String expression = node.getExpression();
    if (expression != null)
    {
      // Evaluate a script expression
      ScriptEngine scriptEngine = getEngine().getScriptEngineFactory().obtainScriptEngine(context);
      try
      {
        // Evaluate the expression
        scriptEngine.prepareNodeSocketExecution(entrySocket);
        Object value = scriptEngine.executeScript(expression, "Decision node script", entrySocket.getNode()
                              .getQualifier().toString());
        scriptEngine.finishNodeSocketExecution(entrySocket);

        // Assign the result to the parameter
        if (value != null && ! value.equals(Boolean.FALSE))
          result = true;
      }
View Full Code Here


            }
          }
          else
          {
            // Evaluate a script expression
            ScriptEngine scriptEngine = engine.getScriptEngineFactory().obtainScriptEngine(context);
            try
            {
              // Evaluate the expression
              scriptEngine.prepareNodeParamExecution(param);
              value = scriptEngine.executeScript(expression, "entry parameter script", param.getQualifier().toString());
              scriptEngine.finishNodeParamExecution(param);

              // Assign the result to the parameter
              TokenContextUtil.setParamValue(context, param, value);
            }
            finally
View Full Code Here

            }
          }
          else
          {
            // Evaluate a script expression
            ScriptEngine scriptEngine = engine.getScriptEngineFactory().obtainScriptEngine(context);
            try
            {
              // Evaluate the expression
              scriptEngine.prepareNodeParamExecution(param);
              Object value = scriptEngine.executeScript(expression, "exit parameter script", param.getQualifier().toString());
              scriptEngine.finishNodeParamExecution(param);

              // Assign the result to the parameter
              TokenContextUtil.setParamValue(context, param, value);
            }
            finally
View Full Code Here

      {
        LogUtil.trace(getClass(), "Executing script on node $0 as {1} handler. [{2}]",
          currentSocket.getNode().getQualifier().toString(), eventType, context);

        // Execute the script associated with this handler
        ScriptEngine scriptEngine = getScriptEngineFactory().obtainScriptEngine(hc.getTokenContext());
        try
        {
          scriptEngine.prepareHandlerExecution(hc);
          String script = handlerDef.getScript();
          scriptEngine.executeScript(script, "handler script", currentSocket.getNode().getQualifier().toString());
          scriptEngine.finishHandlerExecution(hc);
        }
        finally
        {
          getScriptEngineFactory().releaseScriptEngine(scriptEngine);
        }
View Full Code Here

TOP

Related Classes of org.openbp.server.engine.script.ScriptEngine

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.