How to force a refresh on the diagram?

You have to dispatch model updates via our commandStack in order to make them undoable and appear on the diagram.

Have a look at this post or our FAQ entry that summarizes the issue.