You have to dispatch model updates via our commandStack in order to make them undoable and appear on the diagram.
commandStack
Have a look at this post or our FAQ entry that summarizes the issue.