boolean updated = false;
final Object targetValue = targetExpression.getValue(elContext);
if (targetValue instanceof ProcessInstance) {
final ProcessInstance processInstance = (ProcessInstance) targetValue;
final ContextInstance contextInstance = processInstance.getContextInstance();
for (String name : deletes) {
contextInstance.deleteVariable(name);
updated = true;
}
for (String name : updates) {
contextInstance.setVariable(name, updatesHashMap.get(name));
updated = true;
}
} else if (targetValue instanceof Token) {
final Token token = (Token) targetValue;
final ProcessInstance processInstance = token.getProcessInstance();
final ContextInstance contextInstance = processInstance.getContextInstance();
for (String name : deletes) {
contextInstance.deleteVariable(name, token);
updated = true;
}
for (String name : updates) {
contextInstance.setVariable(name, updatesHashMap.get(name), token);
updated = true;
}
} else if (targetValue instanceof TaskInstance) {
final TaskInstance task = (TaskInstance) targetValue;
for (String name : deletes) {