Examples of ExecutableScript


Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

      return new MapValueProvider(providerMap);
    }

    // SCRIPT
    if("script".equals(parameterElement.getTagName())) {
      ExecutableScript executableScript = parseCamundaScript(parameterElement);
      if (executableScript != null) {
        return new ScriptValueProvider(executableScript);
      }
      else {
        return new NullValueProvider();
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

    } else if (delegateExpression != null) {
      Expression delegateExp = expressionManager.createExpression(delegateExpression);
      taskListener = new DelegateExpressionTaskListener(delegateExp, fieldDeclarations);

    } else if (scriptElement != null) {
      ExecutableScript executableScript = initializeScript(element, activity, context, scriptElement);
      if (executableScript != null) {
        taskListener = new ScriptTaskListener(executableScript);
      }
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

      scriptSource = scriptElement.getText();
    }
    String scriptResource = scriptTaskElement.attributeNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "resource");

    try {
      ExecutableScript script = ScriptUtil.getScript(language, scriptSource, scriptResource, expressionManager);
      return new ScriptTaskActivityBehavior(script, resultVariableName);
    }
    catch (ProcessEngineException e) {
      addError("Unable to process ScriptTask: " + e.getMessage(), scriptElement);
      return null;
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

    } else if (delegateExpression != null) {
      taskListener = new DelegateExpressionTaskListener(expressionManager.createExpression(delegateExpression), parseFieldDeclarations(taskListenerElement));
    }
    else if (scriptElement != null) {
      try {
        ExecutableScript executableScript = parseCamundaScript(scriptElement);
        if (executableScript != null) {
          taskListener = new ScriptTaskListener(executableScript);
        }
      }
      catch (BpmnParseException e) {
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

      if (language == null) {
        condition = new UelExpressionCondition(expressionManager.createExpression(expression));
      }
      else {
        try {
          ExecutableScript script = ScriptUtil.getScript(language, expression, resource, expressionManager);
          condition = new ScriptCondition(script);
        }
        catch (ProcessEngineException e) {
          addError("Unable to process condition expression:" + e.getMessage(), conditionExprElement);
        }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

      executionListener = new ExpressionExecutionListener(expressionManager.createExpression(expression));
    } else if (delegateExpression != null) {
      executionListener = new DelegateExpressionExecutionListener(expressionManager.createExpression(delegateExpression), parseFieldDeclarations(executionListenerElement));
    } else if (scriptElement != null) {
      try {
        ExecutableScript executableScript = parseCamundaScript(scriptElement);
        if (executableScript != null) {
          executionListener = new ScriptExecutionListener(executableScript);
        }
      }
      catch (BpmnParseException e) {
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

  protected Object executeScript(String scriptSrc, VariableScope scope) {
    ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    ScriptingEnvironment scriptingEnvironment = processEngineConfiguration.getScriptingEnvironment();
    ScriptFactory scriptFactory = processEngineConfiguration.getScriptFactory();
    ExecutableScript script = scriptFactory.createScriptFromSource(ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE, scriptSrc);
    return scriptingEnvironment.execute(script, scope);
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

    } else if (delegateExpression != null) {
      Expression delegateExp = expressionManager.createExpression(delegateExpression);
      caseExecutionListener = new DelegateExpressionCaseExecutionListener(delegateExp, fieldDeclarations);

    } else if (scriptElement != null) {
      ExecutableScript executableScript = initializeScript(element, activity, context, scriptElement);
      if (executableScript != null) {
        caseExecutionListener = new ScriptCaseExecutionListener(executableScript);
      }
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

    } else if (delegateExpression != null) {
      Expression delegateExp = expressionManager.createExpression(delegateExpression);
      variableListener = new DelegateExpressionCaseVariableListener(delegateExp, fieldDeclarations);

    } else if (scriptElement != null) {
      ExecutableScript executableScript = initializeScript(element, activity, context, scriptElement);
      if (executableScript != null) {
        variableListener = new ScriptCaseVariableListener(executableScript);
      }
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.scripting.ExecutableScript

  public void verifyListener(DelegateListener<? extends BaseDelegateExecution> listener) {
    assertTrue(listener instanceof ScriptCaseExecutionListener);

    ScriptCaseExecutionListener scriptListener = (ScriptCaseExecutionListener) listener;
    ExecutableScript executableScript = scriptListener.getScript();
    assertNotNull(executableScript);
    assertEquals(SCRIPT_FORMAT, executableScript.getLanguage());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.