public void notify(DelegateExecution execution) { // Return value of expression is ignored expression.getValue(execution); }
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()); } } }
/** * returns the expression text for this execution listener. Comes in handy if you want to check which listeners you already have. */ public String getExpressionText() { return expression.getExpressionText(); }
/** * returns the expression text for this execution listener. Comes in handy if you want to check which listeners you already have. */ public String getExpressionText() { return expression.getExpressionText(); } }
public void notify(DelegateTask delegateTask) { expression.getValue(delegateTask); }
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"); } }
/** * returns the expression text for this task listener. Comes in handy if you want to check which listeners you already have. */ public String getExpressionText() { return expression.getExpressionText(); }
protected String getStringFromField(Expression expression, DelegateExecution execution) { if (expression != null) { Object value = expression.getValue(execution); if (value != null) { return value.toString(); } } return null; }
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; }
/** * returns the expression text for this execution listener. Comes in handy if you want to check which listeners you already have. */ public String getExpressionText() { return expression.getExpressionText(); } }
protected String getStringFromField(Expression expression, DelegateExecution execution) { if (expression != null) { Object value = expression.getValue(execution); if (value != null) { return value.toString(); } } return null; }
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()); } }
/** * returns the expression text for this execution listener. Comes in handy if you want to check which listeners you already have. */ public String getExpressionText() { return expression.getExpressionText(); }
@Override public void execute(DelegateExecution execution) { CALL_COUNT.incrementAndGet(); NAMES.add((String) name.getValue(execution)); }
if (taskElementProperties != null && taskElementProperties.has(DynamicBpmnConstants.SERVICE_TASK_EXPRESSION)) { String overrideExpression = taskElementProperties.get(DynamicBpmnConstants.SERVICE_TASK_EXPRESSION).asText(); if (StringUtils.isNotEmpty(overrideExpression) && !overrideExpression.equals(expression.getExpressionText())) { expression = Context.getProcessEngineConfiguration().getExpressionManager().createExpression(overrideExpression); value = expression.getValue(execution); if (resultVariable != null) { execution.setVariable(resultVariable, value);
/** * returns the expression text for this task listener. Comes in handy if you want to check which listeners you already have. */ public String getExpressionText() { return expression.getExpressionText(); }
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; }