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

How to use
getValue
method
in
org.activiti.engine.delegate.Expression

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

origin: Activiti/Activiti

public void notify(DelegateExecution execution) {
 // Return value of expression is ignored
 expression.getValue(execution);
}
origin: Activiti/Activiti

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

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

@Override
public void execute(DelegateExecution execution) {
 CALL_COUNT.incrementAndGet();
 NAMES.add((String) name.getValue(execution));
}
origin: Activiti/Activiti

protected Object resolveCollection(DelegateExecution execution) {
 Object collection = null;
 if (collectionExpression != null) {
  collection = collectionExpression.getValue(execution);
 } else if (collectionVariable != null) {
  collection = execution.getVariable(collectionVariable);
 }
 return collection;
}
origin: Activiti/Activiti

 public void evaluate(DelegateExecution execution) {
  VariableScope variableScope = (VariableScope) execution;
  Object value = this.fromExpression.getValue(variableScope);
  this.toExpression.setValue(value, variableScope);
 }
}
origin: Activiti/Activiti

@Override
public Map<String, Object> getCustomPropertiesMap(DelegateExecution execution) {
 Object expressionValue = expression.getValue(execution);
 if (expressionValue instanceof Map) {
  return (Map<String, Object>) expressionValue;
 } else {
  throw new ActivitiIllegalArgumentException("Custom properties resolver expression " + expression + " did not return a Map<String, Object>");
 }
}
origin: Activiti/Activiti

protected int resolveLoopCardinality(DelegateExecution 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 new ActivitiIllegalArgumentException("Could not resolve loopCardinality expression '" + loopCardinalityExpression.getExpressionText() + "': not a number nor number String");
 }
}
origin: Activiti/Activiti

public boolean evaluate(String sequenceFlowId, DelegateExecution execution) {
 Object result = expression.getValue(execution);
 if (result == null) {
  throw new ActivitiException("condition expression returns null (sequenceFlowId: " + sequenceFlowId + " execution: " + execution + ")");
 }
 if (!(result instanceof Boolean)) {
  throw new ActivitiException("condition expression returns non-Boolean (sequenceFlowId: " + sequenceFlowId + " execution: " + execution + "): " + result + " (" + result.getClass().getName() + ")");
 }
 return (Boolean) result;
}
origin: Activiti/Activiti

protected boolean completionConditionSatisfied(DelegateExecution execution) {
 if (completionConditionExpression != null) {
  Object value = completionConditionExpression.getValue(execution);
  if (!(value instanceof Boolean)) {
   throw new ActivitiIllegalArgumentException("completionCondition '" + completionConditionExpression.getExpressionText() + "' does not evaluate to a boolean value");
  }
  Boolean booleanValue = (Boolean) value;
  if (LOGGER.isDebugEnabled()) {
   LOGGER.debug("Completion condition of multi-instance satisfied: {}", booleanValue);
  }
  return booleanValue;
 }
 return false;
}
origin: Activiti/Activiti

 public static boolean shouldSkipFlowElement(DelegateExecution execution, Expression skipExpression) {
  Object value = skipExpression.getValue(execution);

  if (value instanceof Boolean) {
   return ((Boolean) value).booleanValue();

  } else {
   throw new ActivitiIllegalArgumentException("Skip expression does not resolve to a boolean: " + skipExpression.getExpressionText());
  }
 }
}
origin: Activiti/Activiti

 public void evaluate(DelegateExecution execution) {
  Object value = this.transformation.getValue(execution);
  execution.setVariable(this.getTarget(), value);
 }
}
origin: Activiti/Activiti

@Override
public Map<String, Object> getCustomPropertiesMap(DelegateExecution execution) {
 // Note: we can't cache the result of the expression, because the
 // execution can change: eg.
 // delegateExpression='${mySpringBeanFactory.randomSpringBean()}'
 Object delegate = expression.getValue(execution);
 if (delegate instanceof CustomPropertiesResolver) {
  return ((CustomPropertiesResolver) delegate).getCustomPropertiesMap(execution);
 } else {
  throw new ActivitiIllegalArgumentException("Custom properties resolver delegate expression " + expression + " did not resolve to an implementation of " + CustomPropertiesResolver.class);
 }
}
origin: Activiti/Activiti

protected String getBusinessCalendarName(String calendarName, VariableScope variableScope) {
 String businessCalendarName = CycleBusinessCalendar.NAME;
 if (StringUtils.isNotEmpty(calendarName)) {
  businessCalendarName = (String) Context.getProcessEngineConfiguration().getExpressionManager()
    .createExpression(calendarName).getValue(variableScope);
 }
 return businessCalendarName;
}

origin: Activiti/Activiti

protected String getBusinessCalendarName(String calendarName,
                     VariableScope variableScope) {
  String businessCalendarName = CycleBusinessCalendar.NAME;
  if (StringUtils.isNotEmpty(calendarName)) {
    businessCalendarName = (String) Context.getProcessEngineConfiguration().getExpressionManager()
        .createExpression(calendarName).getValue(variableScope);
  }
  return businessCalendarName;
}
origin: Activiti/Activiti

@Override
public void notify(String processInstanceId, String executionId, FlowElement flowElement, Map<String, Object> executionVariables, Map<String, Object> customPropertiesMap) {
 NoExecutionVariableScope scope = new NoExecutionVariableScope();
 Object delegate = expression.getValue(scope);
 if (delegate instanceof TransactionDependentExecutionListener) {
  ((TransactionDependentExecutionListener) delegate).notify(processInstanceId, executionId, flowElement, executionVariables, customPropertiesMap);
 } else {
  throw new ActivitiIllegalArgumentException("Delegate expression " + expression + " did not resolve to an implementation of " + TransactionDependentExecutionListener.class);
 }
}
origin: Activiti/Activiti

@Override
public void notify(String processInstanceId, String executionId, Task task, Map<String, Object> executionVariables, Map<String, Object> customPropertiesMap) {
 NoExecutionVariableScope scope = new NoExecutionVariableScope();
 Object delegate = expression.getValue(scope);
 if (delegate instanceof TransactionDependentTaskListener) {
  ((TransactionDependentTaskListener) delegate).notify(processInstanceId, executionId, task, executionVariables, customPropertiesMap);
 } else {
  throw new ActivitiIllegalArgumentException("Delegate expression " + expression + " did not resolve to an implementation of " + TransactionDependentTaskListener.class);
 }
}
origin: Activiti/Activiti

public static boolean shouldSkipFlowElement(CommandContext commandContext, DelegateExecution execution, String skipExpressionString) {
 Expression skipExpression = commandContext.getProcessEngineConfiguration().getExpressionManager().createExpression(skipExpressionString);
 Object value = skipExpression.getValue(execution);
 if (value instanceof Boolean) {
  return ((Boolean) value).booleanValue();
 } else {
  throw new ActivitiIllegalArgumentException("Skip expression does not resolve to a boolean: " + skipExpression.getExpressionText());
 }
}
origin: Activiti/Activiti

public void execute(DelegateExecution execution) {
 CommandContext commandContext = Context.getCommandContext();
 ExecutionEntity executionEntity = (ExecutionEntity) execution;
 
 String signalName = null;
 if (StringUtils.isNotEmpty(signalEventDefinition.getSignalRef())) {
  signalName = signalEventDefinition.getSignalRef();
 } else {
  Expression signalExpression = commandContext.getProcessEngineConfiguration().getExpressionManager()
    .createExpression(signalEventDefinition.getSignalExpression());
  signalName = signalExpression.getValue(execution).toString();
 }
 
 commandContext.getEventSubscriptionEntityManager().insertSignalEvent(signalName, signal, executionEntity);
}
origin: Activiti/Activiti

@Override
public void execute(DelegateExecution execution) {
 CommandContext commandContext = Context.getCommandContext();
 ExecutionEntity executionEntity = (ExecutionEntity) execution;
 
 String signalName = null;
 if (StringUtils.isNotEmpty(signalEventDefinition.getSignalRef())) {
  signalName = signalEventDefinition.getSignalRef();
 } else {
  Expression signalExpression = commandContext.getProcessEngineConfiguration().getExpressionManager()
    .createExpression(signalEventDefinition.getSignalExpression());
  signalName = signalExpression.getValue(execution).toString();
 }
 
 commandContext.getEventSubscriptionEntityManager().insertSignalEvent(signalName, signal, executionEntity);
}
org.activiti.engine.delegateExpressiongetValue

Popular methods of Expression

  • getExpressionText
  • setValue

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • JFileChooser (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now