Skip to content

Work in a draft and commit

Every edit you save goes into your personal draft first. This guide shows you how to follow what your draft holds, take changes back, and commit them so that they land on the model. For the ideas behind drafts, see Drafts & branches.

  • A model you can edit.
  1. Open your model and select Model editor in the left navigation.
  2. Make a change as usual: edit an element and select Save changes, rename or move an element in the model tree, or save a diagram.
  3. While the change is on its way to your draft, the draft chip in the bar at the top reads Saving to draft…, and so does Save changes if you used it.
  4. Once ModelDesk has accepted the change, the editor shows it, Save changes reads Saved to draft, and the draft chip reads, for example, Draft · 1 step, with a Commit button beside it.

Each save to your draft is one step, and the count goes up with every step. A step is what you save at once: for you, one edit. When an agent works in your draft, one step is one batch of changes, and a batch can touch many elements. Your pending changes show on every page of the model, but only to you, until you commit them.

The draft chip sits near the right end of the bar at the top of every page of the model, just before the branch control. It appears as soon as your draft holds a change, and it says what your draft is doing.

The chip reads What it means
Draft · 3 steps Your draft holds three steps. Select it to open your draft.
Saving to draft… A change is on its way to your draft.
Not saved to draft, with Retry Your latest edits could not reach the server. They are kept in this tab until you select Retry.
Full, after the count Your draft holds as many steps as it can. Commit or discard it to add more.
main was updated, after the count Someone committed to the branch since your draft started. The chip names the branch you are on. See Bring your draft up to date.

Select the count on the draft chip, for example Draft · 3 steps. Your draft opens below the chip. At the top it shows how many steps it holds, Review changes to see them all at once (see Review your changes), and Undo, Redo, and Discard all.

Below that are the steps in your draft, newest first. Each row names the element, what happened to it (for example “Attribuutsoort changed”), and when you made it. A change you saved to your draft from another browser tab is marked From another tab, and one added through the API From the API.

Steps that an agent staged in one session are grouped under a header such as 3 steps · 37 elements · 11:10 to 11:40. The element count shows how many different elements those steps touched, and appears only when it is larger than the number of steps. A step that an agent staged with a message shows the message first and, when it touched more than one element, how many, for example 12 elements: Enumeratie changed, Codelijst changed.

  • Select a row to see what the change did, property by property, with the values before and after. Select the element’s name there to select it in the editor.
  • Select Load older steps at the bottom of the list to see more.
  • Press Escape, or select anywhere outside your draft, to close it.

The draft opened from the draft chip at the top of the model editor, with the Draft heading, the count, Review changes, the Undo, Redo and Discard all row, and three steps, one of them expanded

Undo takes back the newest step in your draft, and Redo adds it to your draft again. Undo always takes back one step, so after an agent staged a batch of changes, one Undo takes back the whole batch. The keyboard does the same anywhere on the model’s pages: Cmd+Z to undo and Cmd+Shift+Z to redo (Ctrl+Z and Ctrl+Shift+Z on Windows and Linux).

  • Undo works on your draft only. A change you have already committed cannot be undone this way.
  • Redo is available until you make a new edit, bring your draft up to date, commit, discard, or reload the page.
  • In a text field where you have typed something, the keys undo your typing in that field first.
  • Undo and redo wait while a dialog is open, while you drag on a diagram, while the element form or a diagram has unsaved edits, and while Review changes is open. Hover the button to see why it is unavailable.

To take out a change that is not the newest one:

  1. Open your draft and select the change to expand it.
  2. Select Remove from draft.
  3. Confirm with Remove from draft, or select Keep to leave it.

The change leaves your draft, and the changes after it are applied again without it. This cannot be taken back. If a later change depended on the one you removed, ModelDesk asks what to do with it; see Changes that no longer apply.

To throw away all the changes in your draft, open your draft and select Discard all. Your draft closes, the page shows the branch without your changes, and a message reads Draft discarded. with Undo. For five seconds you can select Undo, or press Cmd+Z (Ctrl+Z), to get your draft back. After that, those changes are gone for good.

  1. Select Commit on the draft chip. In Review changes, select Commit….
  2. If the element form or a diagram has unsaved edits, the Unsaved changes dialog asks about them first. Select Save and continue to include them, or Discard changes to leave them out.
  3. The Commit changes dialog says what lands, for example “This commit lands 3 steps on main, touching 2 elements.”
  4. Optionally, enter a Message that says what changed and why, up to 2000 characters.
  5. Select Commit.

The dialog closes and a message confirms Your changes were committed. The draft chip disappears, everyone who opens the model now sees your changes, and the commit is listed on the model’s History page with your message. Your next edit starts a new draft.

If someone committed to the branch since your draft started, ModelDesk first brings your draft up to date and then commits, without asking, unless something needs your attention:

  • When dependencies or the metamodel changed on the branch, for example through a merge, the dialog stays open and lists what changed. Check your changes, then select Commit again.
  • The dialog also stays open, for you to select Commit again, when it says “New changes arrived in your draft while committing. Commit again to include them.”, “While committing, main moved again, and your draft was brought up to date with it.”, or “Bringing your draft up to date with main got no answer, so it was reloaded.”
  • When some of the changes in your draft no longer apply to the branch as it is now, ModelDesk asks what to do with them. See Changes that no longer apply.

Your draft is kept when you go to another model, close the tab, or sign out. When you leave a model whose draft holds changes, a message reminds you, for example “2 steps in IMBAG Conceptueel are saved in your draft, not on main yet.”, with Review to go back to them. In the model list, such a model carries a badge such as Draft · 2 changes; select it to open the model with your draft.

The browser asks before you close the tab only while edits are still on their way to your draft, or could not be saved to it.

When you cut elements in the tree of one model and paste them into another, the paste goes into your draft of this model like any other change. The originals are removed in your draft of the model they came from, and a message says so: “The originals were removed in your draft of “X”. That draft is committed on its own: the move completes when you commit it there.”

An element you added in your draft is not on the branch until you commit. Actions that record it outside your draft are unavailable on it until then: Open in Semantic Lineage, lineage links and rules, alignment suggestions and working sets, and resolving an unresolved reference. Hovering such an action reads Commit your changes to use this on a new element. On a branch other than main, lineage links and rules, alignment suggestions and working sets, and resolving an unresolved reference are unavailable on every element, and read “Changed on main only.” instead.

  • The chip reads Not saved to draft. Your edits did not reach the server, often because the connection dropped. Select Retry, and keep the tab open until they are saved to your draft. Until then the commit dialog says Some of your edits are not saved to your draft yet. and Commit stays unavailable.
  • The chip ends in Full. Commit or discard your draft. Edits you make meanwhile wait in the tab, and are saved to a new draft once you have committed or discarded this one.
  • Undo or Redo is unavailable. Hover the button to see why, for example Save or discard your unsaved edits first or Close Review changes to undo or redo.
  • A message says New changes arrived in your draft, so nothing was undone. You also changed the draft from another tab or through the API. Undo again to undo the newest change.
  • A message says New changes arrived in your draft, so it was not discarded. The same cause. Your draft is kept; discard it again if you still want to.
  • A message says The changes in your draft were committed or discarded in another session. You committed or discarded this draft in another tab. The page now shows the branch.
  • A save is refused with a message on a field. The change was not saved to your draft. Fix what the message names and save again.
  • A field says This edit may not have been saved. The request got no answer. Check the model and make the edit again if it is missing. This edit was only partly saved means the edit went as several changes and a later one was not saved; check the model and make the rest of the edit again.
  • A message says That change no longer applies, so it cannot be redone. The change you tried to redo no longer fits your draft as it is now. Make the edit again by hand.
  • A message says You no longer have access to this model. Your access was withdrawn while edits were on their way. The message names what was lost after Not saved:.