Drafts

Drafts is a feature available for mobile applications which are not flagged to be online only.

Whenever a used does modifications on an edit page and leaves the page without saving (e.g. because there is no active network connection) he is asked to either save the pending changes as a draft on his device, to dicard the changes or to cancel navigation.

Create a draft drafts

Drafts are created whenever a save operation fails and a page is left with dirty changes e.g.:
When creating a new expense claim, the network connection drops after clicking the save button to save the expense:

There is no other way than accepting the error message (1) and go back to the previous page using the back button (2).

Since there are dirty changes not yet saved, the client will ask the user for one of the following options:

  1. Save as draft
    Will save the current changes as a draft which can be opened and saved again later
  2. Discard
    Discard all modifications and go back to previous page
  3. Cancel
    Cancel navigation. This allows to stay on the same page and try to get a working connection again.

Drafts page

Existing drafts can be displayed by using the "My drafts" item in the burger menu and in the action panel.

The following items are available on the drafts page:

  1. and 2. Existing drafts (1. is selected by the user)
  2. Type of the draft
  3. Error when the draft was created
  4. Comment entered by the user
  5. Date when draft was created
  6. Endpoint the draft was created on
  7. Edit button to edit the content of the draft and save it
  8. Drop down to change selection in the list of drafts
  9. Drop down to change order of drafts
  10. Delete selected drafts
  11. Synchronize selected drafts

Editing drafts

There are three ways to continue the data entry process for a draft and finally save the data on the server and removing the draft:

Delete draft

Deleting a draft should only be done if the data entered in the draft is not valid or not required any more.
It will discard all data and remove the draft from the list.
To delete one or more drafts, select them in the list of drafts (1. and 2.) and use the delete button (11.)

Edit and save draft

This option allows to open a draft and check all data. Open the draft by using the edit button (8.)
Once validated, the draft can be saved using the save button. This will also remove the draft from the list of drafts.

Synchronize drafts

The third option is used when there are many drafts or the drafts should be saved on the server without validation user input. To synchronize one or more drafts, select them in the list of drafts (1. and 2.) and use the synchronize button (12.).
This will save all drafts in a batch. Note that some drafts could be rejected by the server. For these drafts, an error message will be shown next to the failed draft. These drafts can be edited and saved again manually or synchronized again.
All drafts that were synchronized successfully will be removed from the list of drafts