@SuppressWarnings({ "rawtypes"}) public static boolean contains(VariableScope variableScope, String variableName, Object... values) { Object variableValue = getVariableValue(variableScope, variableName); if (variableValue != null) { if (variableValue instanceof String) { Collection collectionVariableValue = (Collection) variableValue; for (Object value : values) { if (!collectionContains(collectionVariableValue, value)) { return false; ArrayNode arrayNodeVariableValue = (ArrayNode) variableValue; for (Object value : values) { if (!arrayNodeContains(arrayNodeVariableValue, value)) { return false;
Collection collectionVariableValue = (Collection) variableValue; for (Object value : values) { if (VariableContainsExpressionFunction.collectionContains(collectionVariableValue, value)) { return true; ArrayNode arrayNodeVariableValue = (ArrayNode) variableValue; for (Object value : values) { if (VariableContainsExpressionFunction.arrayNodeContains(arrayNodeVariableValue, value)) { return true;
public void initShortHandExpressionFunctions() { if (shortHandExpressionFunctions == null) { shortHandExpressionFunctions = new ArrayList<>(); String variableScopeName = "planItemInstance"; shortHandExpressionFunctions.add(new VariableGetExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableGetOrDefaultExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableContainsAnyExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableContainsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableEqualsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableNotEqualsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableExistsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableIsEmptyExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableIsNotEmptyExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableLowerThanExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableLowerThanOrEqualsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableGreaterThanExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableGreaterThanOrEqualsExpressionFunction(variableScopeName)); } }
public void initShortHandExpressionFunctions() { if (shortHandExpressionFunctions == null) { shortHandExpressionFunctions = new ArrayList<>(); String variableScopeName = "execution"; shortHandExpressionFunctions.add(new VariableGetExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableGetOrDefaultExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableContainsAnyExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableContainsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableEqualsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableNotEqualsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableExistsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableIsEmptyExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableIsNotEmptyExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableLowerThanExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableLowerThanOrEqualsExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableGreaterThanExpressionFunction(variableScopeName)); shortHandExpressionFunctions.add(new VariableGreaterThanOrEqualsExpressionFunction(variableScopeName)); } }