Package org.jbpm.pvm.internal.script

Examples of org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression()


      Activity activity = execution.getActivity();
      String subProcessActivityName = subProcessInstance.getActivityName();
     
      if (outcomeExpression!=null) {
        ScriptManager scriptManager = Environment.getFromCurrent(ScriptManager.class);
        Object value = scriptManager.evaluateExpression(outcomeExpression, null);
        // if the value is a String and matches the name of an outgoing transition
        if ( (value instanceof String)
             && (activity.hasOutgoingTransition(((String) value)))
           ) {
          // then take that one
View Full Code Here


    if (target!=null) {
      invocationTarget = target;

    } else if (targetExpression!=null) {
      ScriptManager scriptManager = EnvironmentDefaults.getScriptManager();
      invocationTarget = scriptManager.evaluateExpression(targetExpression, targetLanguage);
   
    } else {
      throw new JbpmException("no target specified");
    }
View Full Code Here

    if (initDescriptor!=null) {
      return WireContext.create(initDescriptor);
    }
    if (initExpression!=null) {
      ScriptManager scriptManager = EnvironmentImpl.getFromCurrent(ScriptManager.class);
      return scriptManager.evaluateExpression(initExpression, initLanguage);
    }
    return null;
  }

  public String getName() {
View Full Code Here

    }
  }

  private String evaluateExpression(String expression, Execution execution) {
    ScriptManager scriptManager = EnvironmentImpl.getFromCurrent(ScriptManager.class);
    Object value = scriptManager.evaluateExpression(expression, template.getLanguage());
    if (!(value instanceof String)) {
      throw new JbpmException("expected expression '"
          + expression
          + "' to return string, but was: "
          + value);
View Full Code Here

      if (object==null) {
        throw new WireException("created factory object is null, can't invoke method '"+methodName+"' on it");
      }
    } else if (expr!=null) {
      ScriptManager scriptManager = ScriptManager.getScriptManager();
      object = scriptManager.evaluateExpression(expr, lang);
    }

    if (methodName!=null) {
      try {
        object = invokeMethod(methodName, argDescriptors, wireContext, object, clazz);
View Full Code Here

         
          // TODO update evaluateExpression so that scopeInstance can be passed in directly
          String expression = variableOutDefinition.getExpression();
          String language = variableOutDefinition.getLanguage();

          Object value = scriptManager.evaluateExpression(expression, language);
          outerExecution.setVariable(variableName, value);
        }
      }
    }
  }
View Full Code Here

    }
  }

  protected String resolveAssignmentExpression(String expression, String expressionLanguage) {
    ScriptManager scriptManager = EnvironmentImpl.getFromCurrent(ScriptManager.class);
    Object result = scriptManager.evaluateExpression(expression, expressionLanguage);
    if ( (result ==null)
         || (result instanceof String)
       ) {
      return (String) result;
    }
View Full Code Here

  protected String expression;
  protected String language;
 
  public Object construct(WireContext wireContext) {
    ScriptManager scriptManager = ScriptManager.getScriptManager();
    Object result = scriptManager.evaluateExpression(expression, language);
    return result;
  }

  public void setExpression(String expression) {
    this.expression = expression;
View Full Code Here

  protected String expression;
  protected String language;
 
  public boolean evaluate(OpenExecution execution) {
    ScriptManager scriptManager = ScriptManager.getScriptManager();
    Object result = scriptManager.evaluateExpression(expression, language);
    if (result instanceof Boolean) {
      return ((Boolean) result).booleanValue();
    }
    throw new JbpmException("expression condition '"+expression+"' did not return a boolean: "+result);
  }
View Full Code Here

    timerSession.schedule(this);
  }

  public void setDueDateDescription(String dueDateDescription) {
    ScriptManager scriptManager = ScriptManager.getScriptManager();
    dueDateDescription = (String) scriptManager.evaluateExpression(dueDateDescription, null);
    Date now = Clock.getCurrentTime();
    BusinessCalendar businessCalendar = EnvironmentImpl.getFromCurrent(BusinessCalendar.class);
    duedate = businessCalendar.add(now, dueDateDescription);
  }
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.