Codota Logo
Expression.getValue
Code IndexAdd Codota to your IDE (free)

How to use
getValue
method
in
org.camunda.bpm.engine.delegate.Expression

Best Java code snippets using org.camunda.bpm.engine.delegate.Expression.getValue (Showing top 20 results out of 315)

  • Common ways to obtain Expression
private void myMethod () {
Expression e =
  • Codota IconExpressionManager expressionManager;String expression;expressionManager.createExpression(expression)
  • Codota Iconnew FixedValue(true)
  • Codota IconTaskDefinition taskDefinition;taskDefinition.getFormKey()
  • Smart code suggestions by Codota
}
origin: camunda/camunda-bpm-platform

protected String getStringFromField(Expression expression, DelegateExecution execution) {
 if (expression != null) {
  Object value = expression.getValue(execution);
  if (value != null) {
   return value.toString();
  }
 }
 return null;
}
origin: camunda/camunda-bpm-platform

public void notify(DelegateCaseVariableInstance variableInstance) throws Exception {
 DelegateCaseVariableInstanceImpl variableInstanceImpl = (DelegateCaseVariableInstanceImpl) variableInstance;
 // Return value of expression is ignored
 expression.getValue(variableInstanceImpl.getScopeExecution());
}
origin: camunda/camunda-bpm-platform

protected Object instantiateDelegateClass(ActivityExecution execution) {
 Object delegate = null;
 if (expression != null) {
  delegate = expression.getValue(execution);
 } else if (className != null) {
  delegate = ClassDelegateUtil.instantiateDelegate(className, null);
 }
 return delegate;
}
origin: camunda/camunda-bpm-platform

public void notify(DelegateCaseVariableInstance variableInstance) throws Exception {
 DelegateCaseVariableInstanceImpl variableInstanceImpl = (DelegateCaseVariableInstanceImpl) variableInstance;
 // Return value of expression is ignored
 expression.getValue(variableInstanceImpl.getScopeExecution());
}
origin: camunda/camunda-bpm-platform

protected int resolveLoopCardinality(ActivityExecution execution) {
 // Using Number since expr can evaluate to eg. Long (which is also the default for Juel)
 Object value = loopCardinalityExpression.getValue(execution);
 if (value instanceof Number) {
  return ((Number) value).intValue();
 } else if (value instanceof String) {
  return Integer.valueOf((String) value);
 } else {
  throw LOG.expressionNotANumberException("loopCardinality", loopCardinalityExpression.getExpressionText());
 }
}
origin: camunda/camunda-bpm-platform

 @Override
 public Void call() throws Exception {
  //getValue() can have side-effects, that's why we have to call it independently from the result variable
  Object value = expression.getValue(execution);
  if (resultVariable != null) {
   execution.setVariable(resultVariable, value);
  }
  leave(execution);
  return null;
 }
});
origin: camunda/camunda-bpm-platform

public void initializeFormKey() {
 isFormKeyInitialized = true;
 if(taskDefinitionKey != null) {
  TaskDefinition taskDefinition = getTaskDefinition();
  if(taskDefinition != null) {
   Expression formKey = taskDefinition.getFormKey();
   if(formKey != null) {
    this.formKey = (String) formKey.getValue(this);
   }
  }
 }
}
origin: camunda/camunda-bpm-platform

protected void initializeTaskAssignee(TaskEntity task, VariableScope variableScope) {
 Expression assigneeExpression = taskDefinition.getAssigneeExpression();
 if (assigneeExpression != null) {
  task.setAssignee((String) assigneeExpression.getValue(variableScope));
 }
}
origin: camunda/camunda-bpm-platform

protected void initializeTaskName(TaskEntity task, VariableScope variableScope) {
 Expression nameExpression = taskDefinition.getNameExpression();
 if (nameExpression != null) {
  String name = (String) nameExpression.getValue(variableScope);
  task.setName(name);
 }
}
origin: camunda/camunda-bpm-platform

public void initializeFormKey() {
 isFormKeyInitialized = true;
 if(taskDefinitionKey != null) {
  TaskDefinition taskDefinition = getTaskDefinition();
  if(taskDefinition != null) {
   Expression formKey = taskDefinition.getFormKey();
   if(formKey != null) {
    this.formKey = (String) formKey.getValue(this);
   }
  }
 }
}
origin: camunda/camunda-bpm-platform

 @Override
 public Void call() throws Exception {
  //getValue() can have side-effects, that's why we have to call it independently from the result variable
  Object value = expression.getValue(execution);
  if (resultVariable != null) {
   execution.setVariable(resultVariable, value);
  }
  leave(execution);
  return null;
 }
});
origin: camunda/camunda-bpm-platform

public void notify(DelegateTask delegateTask) {
 if (this.expression != null && this.expression.getValue(delegateTask) != null) {
  // get the expression variable
  String expression = this.expression.getValue(delegateTask).toString();
  // this expression will be evaluated when completing the task
  delegateTask.setVariableLocal("validationRule", expression);
 }
}
origin: camunda/camunda-bpm-platform

protected boolean completionConditionSatisfied(ActivityExecution execution) {
 if (completionConditionExpression != null) {
  Object value = completionConditionExpression.getValue(execution);
  if (! (value instanceof Boolean)) {
   throw LOG.expressionNotBooleanException("completionCondition", completionConditionExpression.getExpressionText());
  }
  Boolean booleanValue = (Boolean) value;
  LOG.multiInstanceCompletionConditionState(booleanValue);
  return booleanValue;
 }
 return false;
}
origin: camunda/camunda-bpm-platform

public void notify(DelegateCaseExecution caseExecution) {
 caseExecution.setVariable("greeting", "Hello from " + greeter.getValue(caseExecution));
 caseExecution.setVariable("helloWorld", helloWorld.getValue(caseExecution));
 caseExecution.setVariable("prefix", prefix.getValue(caseExecution));
 caseExecution.setVariable("suffix", suffix.getValue(caseExecution));
 // kind of workaround to pass through the test
 greeter = null;
 helloWorld = null;
 prefix = null;
 suffix = null;
}
origin: camunda/camunda-bpm-platform

public void execute(DelegateExecution execution) {
 
 if(!setterInvoked) {
  throw new RuntimeException("Setter was not invoked");
 }
 execution.setVariable("setterVar", ((String)text.getValue(execution)).toUpperCase());
}

origin: camunda/camunda-bpm-platform

public void notify(DelegateTask delegateTask) {
 delegateTask.setVariable("greeting", "Hello from " + greeter.getValue(delegateTask));
 delegateTask.setVariable("helloWorld", helloWorld.getValue(delegateTask));
 delegateTask.setVariable("prefix", prefix.getValue(delegateTask));
 delegateTask.setVariable("suffix", suffix.getValue(delegateTask));
 // kind of workaround to pass through the test
 greeter = null;
 helloWorld = null;
 prefix = null;
 suffix = null;
}
origin: camunda/camunda-bpm-platform

public void execute(DelegateExecution execution) {
 String value1 = (String) text1.getValue(execution);
 execution.setVariable("var1", new StringBuffer(value1).reverse().toString());
 String value2 = (String) text2.getValue(execution);
 execution.setVariable("var2", new StringBuffer(value2).reverse().toString());
}
origin: camunda/camunda-bpm-platform

protected void evaluateCollectionVariable(ActivityExecution execution, int loopCounter) {
 if (usesCollection() && collectionElementVariable != null) {
  Collection<?> collection = null;
  if (collectionExpression != null) {
   collection = (Collection<?>) collectionExpression.getValue(execution);
  } else if (collectionVariable != null) {
   collection = (Collection<?>) execution.getVariable(collectionVariable);
  }
  Object value = getElementAtIndex(loopCounter, collection);
  setLoopVariable(execution, collectionElementVariable, value);
 }
}
origin: camunda/camunda-bpm-platform

public void execute(DelegateExecution execution) throws Exception {
 String variableName = (String) counterName.getValue(execution);
 Object variable = execution.getVariable(variableName);
 if(variable == null) {
  execution.setVariable(variableName, (Integer) 1);
 }
 else  {
  execution.setVariable(variableName, ((Integer)variable)+1);
 }
}
origin: camunda/camunda-bpm-platform

public void execute(ActivityExecution execution) throws Exception {
 String variableName = (String) counterName.getValue(execution);
 Object variable = execution.getVariable(variableName);
 if(variable == null) {
  execution.setVariable(variableName, (Integer) 1);
 }
 else  {
  execution.setVariable(variableName, ((Integer)variable)+1);
 }
}
org.camunda.bpm.engine.delegateExpressiongetValue

Popular methods of Expression

  • getExpressionText
  • setValue

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now