Server

HOWTO: Add a "Save Work in Progress" Option on a Task

Updated: August 19, 2019

While dealing with a workflow task, you may be interrupted, but you don't want to lose the review that you started. This how-to will teach you how to implement an option so that work in progress can be saved, giving more flexibility to users to complete it at their own pace.

Prerequisites

Start by creating a group of users named reviewers; they will be in charge of reviewing the task.

Create a Workflow

  1. Go to Workflow > Process Definitions and click on New. Name it importantReview and click on Ok.
  2. On the Variables tab, Add a new variable reviewComment. Click on Edit next to this new variable and click on "Required".
    reviewComment-required.png
    reviewComment-required.png
  3. On the Graph tab, select an Accept/Reject user task and drag and drop it on the graph.
  4. Click on the Edit button next to the task. Fill in the General tab as shown below:
    general-tab-node.png
    general-tab-node.png
  5. On the Variables tab, activate the reviewComment variable by moving it to the right box.
    variables-tab-node.png
    variables-tab-node.png
  6. On the Task Buttons tab, add a task button:
    • id: saveprogress
    • Label: save progress
    • Uncheck the box Validate Form of this new button.
      validate-form-node.png
      validate-form-node.png
  7. Go to Transitions tab, to make sure that the 3 transitions are automatically created.
  8. Click on Save on the popup.
  9. On the graph, link the saveProgress transition back to the beginning of the Document Review task as you want to go back to it when you click on the Save Work in Progress button. You should end up with a graph like this:
    graph-document-review-done.png
    graph-document-review-done.png

You can now click on Configure layouts in Designer at the top-right of your screen to go directly to the Designer side.

Configure the Task Layout

  1. Once you are on the Document Review layout, keep only the Review Comment property and delete the others by clicking on the trash icon next to each of them.

    document-review-layout-config.png
    document-review-layout-config.png

  2. Users may want to replace the text input (1 line max) with a textarea, made for larger text. It's just about changing the <nuxeo-input> element to <nuxeo-textarea> in the layout configuration after clicking on switch to code at the bottom of the editor screen.
    It should look like this:

    textarea-reviewComment-designer.png
    textarea-reviewComment-designer.png

  3. That's it! Save your changes and deploy your configuration.

task-save-progess-done.png
task-save-progess-done.png

When saving work in progress, it triggers again the output chain, input chain and the task assigned email.


We'd love to hear your thoughts!

All fields required