Examples of VariableScope


Examples of org.activiti.engine.delegate.VariableScope

  public void handle(SimulationEvent event) {
    ScriptingEngines scriptingEngines = Context
      .getProcessEngineConfiguration()
      .getScriptingEngines();

    VariableScope execution = SimulationRunContext.getExecution();
    try {
      scriptingEngines.evaluate((String) event.getProperty(this.scriptPropertyName), language, execution, false);

    } catch (ActivitiException e) {
      log.warn("Exception while executing simulation event " + event + " scriptPropertyName :" +
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.VariableScope

    String dueDateString = null;
    Date duedate = null;

    // ACT-1415: timer-declaration on start-event may contain expressions NOT
    // evaluating variables but other context, evaluating should happen nevertheless
    VariableScope scopeForExpression = execution;
    if(scopeForExpression == null) {
      scopeForExpression = StartProcessVariableScope.getSharedInstance();
    }

    Object dueDateValue = description.getValue(scopeForExpression);
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.VariableScope

  public Object getValue(ELContext context, Object base, Object property)  {

    Object object = context.getContext(VariableScope.class);
    if (object instanceof VariableScope) {
      VariableScope variableScope = (VariableScope) object;
      if (base == null) {
        String variable = (String) property; // according to javadoc, can only be a String

        if( (EXECUTION_KEY.equals(property) && variableScope instanceof ExecutionEntity)
                || (TASK_KEY.equals(property) && variableScope instanceof TaskEntity)
                || (variableScope instanceof CaseExecutionEntity
                && (CASE_EXECUTION_KEY.equals(property) || EXECUTION_KEY.equals(property))) ) {
          context.setPropertyResolved(true);
          return variableScope;
        } else if (EXECUTION_KEY.equals(property) && variableScope instanceof TaskEntity) {
          context.setPropertyResolved(true);
          return ((TaskEntity) variableScope).getExecution();
        } else if(LOGGED_IN_USER_KEY.equals(property)){
          context.setPropertyResolved(true);
          return Context.getCommandContext().getAuthenticatedUserId();
        } else {
          if (variableScope.hasVariable(variable)) {
            context.setPropertyResolved(true); // if not set, the next elResolver in the CompositeElResolver will be called
            return variableScope.getVariable(variable);
          }
        }
      }
    }
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.VariableScope

  public void setValue(ELContext context, Object base, Object property, Object value) {
    if (base == null) {
      String variable = (String) property;
      Object object = context.getContext(VariableScope.class);
      if (object instanceof VariableScope) {
        VariableScope variableScope = (VariableScope) object;
        if (variableScope.hasVariable(variable)) {
          variableScope.setVariable(variable, value);
        }
      }
    }
  }
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.VariableScope

  public void notify(DelegateTask delegateTask) {
    // Note: we can't cache the result of the expression, because the
    // execution can change: eg. delegateExpression='${mySpringBeanFactory.randomSpringBean()}'

    VariableScope variableScope = delegateTask.getExecution();
    if (variableScope == null) {
      variableScope = delegateTask.getCaseExecution();
    }

    Object delegate = expression.getValue(variableScope);
View Full Code Here

Examples of org.camunda.bpm.engine.delegate.VariableScope

    // set id
    formField.setId(id);

    // set label (evaluate expression)
    VariableScope variableScope = executionEntity != null ? executionEntity : StartProcessVariableScope.getSharedInstance();
    Object labelValueObject = label.getValue(variableScope);
    if(labelValueObject != null) {
      formField.setLabel(labelValueObject.toString());
    }

    // set type
    formField.setType(type);

    // set default value (evaluate expression)
    Object defaultValue = null;
    if(defaultValueExpression != null) {
      defaultValue = defaultValueExpression.getValue(variableScope);
      if(defaultValue != null) {
        formField.setDefaultValue(type.convertFormValueToModelValue(defaultValue));
      } else {
        formField.setDefaultValue(null);
      }
    }

    // value
    TypedValue value = variableScope.getVariableTyped(id);
    if(value != null) {
      formField.setValue(type.convertToFormValue(value));
    }
    else {
      // first, need to convert to model value since the default value may be a String Constant specified in the model xml.
View Full Code Here

Examples of org.codehaus.groovy.ast.VariableScope

    private List<Statement> statements = new ArrayList<Statement>();
    private VariableScope scope;
   
    public BlockStatement() {
        this(new ArrayList<Statement>(), new VariableScope());
    }
View Full Code Here

Examples of org.drools.process.core.context.variable.VariableScope

    private static final long serialVersionUID = 400L;
   
    public RuleFlowProcess() {
        setType(RULEFLOW_TYPE);
        // TODO create contexts on request ?
        VariableScope variableScope = new VariableScope();
        addContext(variableScope);
        setDefaultContext(variableScope);
        SwimlaneContext swimLaneContext = new SwimlaneContext();
        addContext(swimLaneContext);
        setDefaultContext(swimLaneContext);
View Full Code Here

Examples of org.drools.process.core.context.variable.VariableScope

        // Composite node
        CompositeContextNode compositeNode = new CompositeContextNode();
        compositeNode.setName("ForEachComposite");
        compositeNode.setMetaData("hidden", true);
        super.addNode(compositeNode);
        VariableScope variableScope = new VariableScope();
        compositeNode.addContext(variableScope);
        compositeNode.setDefaultContext(variableScope);
        // Join
        ForEachJoinNode join = new ForEachJoinNode();
        join.setName("ForEachJoin");
View Full Code Here

Examples of org.drools.process.core.context.variable.VariableScope

    public CompositeNodeFactory variable(String name, DataType type, Object value) {
      Variable variable = new Variable();
      variable.setName(name);
      variable.setType(type);
      variable.setValue(value);
      VariableScope variableScope = (VariableScope)
      getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE);
    if (variableScope == null) {
      variableScope = new VariableScope();
      getCompositeNode().addContext(variableScope);
      getCompositeNode().setDefaultContext(variableScope);
    }
    variableScope.getVariables().add(variable);
        return this;
    }
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.