Toggle menu

Task Management

Task Management Overview

The Task Management template displays a list of workflow tasks that are either assigned to or claimable by users. It provides filters to find tasks and users, and controls to either reassign a task to a different user, or unassign it, returning it back to the pool of claimable tasks.

The article extras let you control which workflow processes and which users can be managed by the template, as well as being able to construct a range of filters and add custom columns to the view of tasks.

Searchable Values
The data returned by the template is taken from workflow process instances that have been indexed by the platform's search engine. If you want to add custom filters and columns, the fields/variables that hold the values you want to filter on will need to have been indexed in the search, which will mean setting them as "searchable" in the forms that created them. See Process Instance Search Indexing for more information.

Task Management with Search

Finding Tasks

You can search for tasks by the business key of the process they relate to, or use the column filters to see tasks by date or user.

Searching for Tasks

The main search can be used to search for process business keys:

Search

It will perform partial matches on any part of a business key. In the article extras you can choose to show or hide this search.

Columns and Filters

The table of tasks always displays the following information. Each column has a filter in its heading.

Task Management Columns

In the template article extras (see Setting up the Template - Standard Columns and Filters) you can set the default behaviour and available filters of the standard columns.

Task/Process

This column includes the task description (as set in the workflow model), the process instance business key, and, in a tooltip, the process name (in Case Management mode it displays the case type).

In the column filter pick the type of task you'd like to use as a filter.

Assignee

The display name of the user the task is currently assigned to, or the word "unassigned", with a button to assign the task.

Pick the user or group you'd like to filter by.

Updated and Due Dates

These dates are those of the task, not the process. If a due date is in the past it will be highlighted in red.

You can sort tasks by date by clicking on the column titles and filter the table using the drop-downs.

Custom Columns and Filters

You can also create custom columns to display data relevant to your tasks.

Active Filters

To apply filters, make a selection, then press the "Update" button to reload the table with your chosen filters.

Current Filters

Current filters are listed at the top of the table and can be removed individually or cleared.

Viewing Task Details

The right-most column includes a button that shows a summary of the task.

Task Details

The Assignee, Start Date and Completion target fields show the same information as the main list of tasks. Beneath this is a task summary. This summary is taken from the most recent summary event in the history written by this process, and works in exactly the same way as the summary view in the Self Service, User Requests and Case Search templates.

Assigning Tasks

To assign a single task, press the assign button:

Assign Button

This launches the assign dialog:

Assign Dialog

Who can tasks be assigned to?
The users a task can be assigned to are the candidate users set in the workflow user task. While the Task Management article extras control whose tasks you can see, the workflow determines who can work on them. This behaves slightly differently in Case Management Mode.

The drop-down displays who the task is currently assigned to or, if not assigned to anyone, the word unassigned. The users in the drop-down are taken from the task's candidates set in the workflow model. To assign the task, pick a user and press "Assign".

To assign multiple tasks at once, use the checkboxes next to the task descriptions, then press the "Assign selected tasks" button:

Assign Multiple

All of your chosen tasks will be loaded into the dialog. The drop-down of users will be filtered to only display users who are eligible to be assigned all of the tasks in the list.

Audit Log

The Task Management template writes an audit log using the platform's history service. A new history is added for each task that gets assigned or reassigned, with relevant information written into the history's subject:

{
    "id": "196f7581-756c-48bc-8edc-6c0a883ee22f",
    "labela": "Template log",
    "labelb": "c76465c0-4f8b-4c56-abb5-fd361cac6ac1",
    "labelc": null,
    "labeld": null,
    "labele": null,
    "created": 1626335004390,
    "lastupdated": 1626335004390,
    "sealed": true,
    "subject": {
        "private": false,
        "templateName": "taskmanagement",
        "articleID": 1865,
        "description": "Re-assigned task 623201 from stevew to adame",
        "subsiteName": "staff",
        "event": "Task Management",
        "userId": "TIMG"
    }
}

Where:

  • labela - always "Template log"
  • labelb - a unique ID generated by the site framework
  • created/lastupdated - the time of the assigning/unassigning
  • templateName - always "taskmanagement"
  • articleID - the ID of the article that was used
  • description - one of "Unclaimed task <taskID> from <userID>", "Assigned task <taskID> to <userID>", "Re-assigned task <taskID> from <userID> to <userID>"
  • subsiteName - the name of the subsite the article was published on
  • event - always "Task Management"
  • userId - the user who performed the assigning/unassigning/reassigning

Setting up the Template - Standard Columns and Filters

Setting up the standard columns, filters and user restrictions in Task Management.

Select the Processes to Display

A list box in the article extras displays all of the currently deployed process models in the workflow engine.

Process Picker

Select the processes whose tasks you'd like to appear on your article. You can use Ctrl-Click or Shift-Click to select more than one. If you don't select any none will appear.

Process Variables Filter

When building filters the variable names and values should be entered in lowercase, the ANDs and ORs in UPPERCASE

You can further restrict the tasks shown by the template so that it will only show tasks for process instances that have variables with certain values. For example, you could select the "case management" process, and then write an expression to only show cases of a certain type.

Note that this filter is used to restrict the instances shown for the processes selected above, you must select processes before applying a filter.

Filter expressions have the format variablename='value'. The name of the variable should not be in quotes, the value always will be.

The filter also lets you construct more complex expressions using ANDs or ORs with named variables and values.

This expression would only return tasks for processes that have a type of complaint or a type of feedback:

Filter - OR

This expression would only return complaints that also have an escalated status:

Filter - AND

Task/Process Filter

Once the template has been set up to only show tasks for the process instances you want, you can also build filters that will appear in the Task/Process drop-down filter on the article.

Simple Filters

Start by building some simple filters. This example shows Task Management set up to work with Case Management. Each filter will display one case type:

Variable Filter

Each item in the list has a display value and an expression:

Filter Expression

Which has generated the following drop-down options:

Process Filter

Remember, you can use any process variable to construct a filter! We've seen great examples using locations, postcodes and case statuses.

More Complex Expressions

You can also build filters using AND or OR expressions. In this example a single item in the drop-down would display a variety of waste-related tasks:

Expression Filter

 

Creating Multiple Filters at Once

To make adding multiple items easier, press the "Add multiple" button. This lets you enter the name of a single process variable, then a comma separated list of possible values:

Add Multiple

Which will automatically generate the following list of items:

Add Multiple Result

You can then edit each item individually to tidy up the display values.

Useful Case Management Filters

These are some common filters you can use with Case Management processes.

VariableExampleDescription
assignGroupNameassignGroupName = "CM-TEST"Show cases assigned to the test group
form_CASETYPEform_casetype = "complaint"Show cases of this type type
form_CASESTAGENAMEform_casestagename = "stage 1"Show cases at this stage
form_STATUSform_status = "under review"Show cases with this status
form_CASESUBTYPEform_casesubtype = "corporate"Show cases with this subtype

 

Groups and Users

In the article extras, select the user groups that can be managed by the template. Only tasks assigned to or claimable by users in the chosen groups will be returned. The groups and users automatically populate the Assignee drop-down filter on the article. The list also includes the current user ("you").

For example, this article has been set up to manage two groups:

Manageable Groups

Those groups and the users in them appear as filters:

Assignee Filter

The groups appear first and a list of users second. Groups display the group description, followed by the name. Users are listed by their profile display name and account username.

Selecting a group or a user from the assignee filter will only display tasks already assigned to those users. This is a change in behaviour from previous versions of Task Management (prior to October 2024) where you would see all tasks a user may be able to work on, even via other group memberships.

Created and Due Date Filters

The options in these two filters are set in the article extras. Pick a date or SLA to filter the task table.

Date Filters

Setting up the Template - Custom Columns

You can add any number of extra custom columns to the table to use as filters for your tasks. There are two types of column, drop-down and text box, which determines the type of filter they provide.

Custom Drop-down

This column and filter creates a custom drop-down list.

Custom Drop-down

To create this column, in the article extras, pick "Add a custom column". Then choose "Dropdown".

Custom Drop-down Extras

  • Display label is the label that appears above the column
  • Query field is the name of the process variable (it is case sensitive) that holds the values you'd like to filter on
  • Type is either dropdown or fixed text (so, dropdown in this case)
  • Options type lets you enter fixed values that will appear in the drop-down, or lists all of the end points found in the TaskSearch.getConfig end point (see Configuration below)

Custom Text Box

This column filter works like a search, rather than picking options from a drop-down.

Custom Text Box Filter

To create this column, in the article extras, pick "Add a custom column". Then choose "Text box".

Custom Text Box Extras

  • Display label is the label that appears above the column
  • Query field is the name of the process variable (it is case sensitive) that holds the values you'd like to search for
  • Type is either dropdown or text box (so, text box in this case)

Additional Configuration

The custom drop-down column can generate its options from an end point rather than having fixed values entered into the article extras. The names of the end points you'd like to use need to be added into the Task Management configuration, so they can be selected in the article extras. The end points themselves need to return a single array of values that will appear in the drop-down on the template.

The configuration end point has the namespace config.[environment].TaskSearch.getConfig.

The end point should list the namespaces of other end points which will generate options for your drop-downs. For example, this configuration end point lists two end points:

function(params, credentials) {
    return {
        optionsEndpoints: [{
                name: "Initiator",
                endpoint: "test.alex.initiatorOptions"
            },
            {
                name: "Location",
                endpoint: "test.tim.locationOptions"
            }
        ]
    };
}

It provides these options in the article extras:

End Point Options

The initiatorOptions end point returns:

{
    "result": ["anonymous", "citizen1", "sarah"],
}

Which appears in the drop-down as:

End Point Drop-down

Task Management with Case Management

In this mode you can pick the case types to manage without building filters, view the case details, and start working on a case once it is assigned to you.

Case Management Mode

To enable the Case Management specific features, pick "Case Management processes" in the article extras:

Display Case Management Processes - Article Extras

Select Case Types

In this mode, the list box changes to display case types rather than all of your workflow processes. Select the case types you'd like to manage with this article:

Manageable Case Types

User Groups

The user groups you can reassign cases to match the "Reassignment groups" set in the Groups section of the case configuration. If you want to be able to reassign a case to other users within the initial case manager group, make sure to add that group as a reassignment group in your case config too.

Your reassignment groups also need to be picked in the "Manageable groups" list in the Task Management article extras.

To save you checking your case config, the groups are listed in brackets next to each case type:

Reassignment Groups

If your case's configured reassignment groups, and the article extra's manageable groups don't match, you may still see a task (depending on your other filters) but it will be disabled and you won't be able to reassign it:

Disabled Task Row

Remaining Settings

All of the other settings, like the process variable filters and columns, work exactly as they do in "standard" mode. See the previous two articles in this documentation.

Additional Features

Once your article has been set up, the following features are available.

Case Type Filter

The Task/Process filter changes to a Case Type filter:

Case Type Filter

All of the case types picked in the article extras will be in the drop-down.

Assign Dialog

When you assign the case, you'll see a similar view to the one you'd see when Reassigning a Case directly in Case Management:

Assign Case Dialog

Pick the group, user and reason, then enter a note. The groups and reasons are taken from the case configuration.

Viewing Case Details

The right-most column of the Task Management table includes a button that shows a summary of the case, and may link directly into Case Management. This view is similar to the Case Search details view:

Case Details View

It is made up of:

  • Headline details about the case
  • A summary of the case which uses the Read Only view
  • An assign button which works in the same way as the Assign Dialog above
  • If the case is assigned to you, a "Manage case" button, which will open the case to work on, and an "Unclaim case" button
  • If the case is not assigned to you, but you do have permission to view the case details, a "View case details" button, which will open a view of the case in a new window

For information about what these buttons link to, user permissions, and how the URLs are constructed, see the relevant sections of the Case Search Results article.

Last modified on 3 February 2025