executionEntity = task.getExecution();
taskId = task.getId();
}
if (executionEntity != null) {
final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();
final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();
for (String variableName : properties.keySet()) {
TypedValue value = properties.getValueTyped(variableName);
// NOTE: SerializableValues are never stored as form properties
if (!(value instanceof SerializableValue)
&& value.getValue() != null && value.getValue() instanceof String) {
String stringValue = (String) value.getValue();
HistoryEvent evt = eventProducer.createFormPropertyUpdateEvt(executionEntity, variableName, stringValue, taskId);
eventHandler.handleEvent(evt);
}
}
}
}