Edits task filter details.

edit-task-filter-cloud

Contents

Basic Usage

<adf-cloud-edit-task-filter
    [id]="taskFilterId"
    [appName]="appName"
    [filterProperties]="filterProperties"
    (filterChange)="onFilterChange($event)"
    (action)="onAction($event)">
</adf-cloud-edit-task-filter>

Class members

Properties

NameTypeDefault valueDescription
actionsstring[]List of task filter actions.
appNamestring""(required) Name of the app.
environmentListEnvironment[][]List of environments.
filterPropertiesstring[][]List of task filter properties to display.
idstring(required) ID of the task filter.
processInstanceIdstringprocessInstanceId of the task filter.
rolestring""user role.
showFilterActionsbooleantrueToggles the filter actions.
showTaskFilterNamebooleantrueToggles display of task filter name
showTitlebooleantrueToggles the title.
sortPropertiesstring[][]List of sort properties to display.
taskFilterTaskFilterCloudModelTask Filter to use.

Events

NameTypeDescription
actionEventEmitter<TaskFilterAction>Emitted when a filter action occurs (i.e Save, Save As, Delete).
filterChangeEventEmitter<>Emitted when a task filter property changes.

Details

Editing APS2 task filters

Use the appName and id properties to choose which task filter to edit:

<adf-cloud-edit-task-filter
    [id]="taskFilterId"
    [appName]="appName">
</adf-cloud-edit-task-filter>

Filter properties

You can supply various filter properties to edit that will determine which tasks are found by a filter. The full set of properties is given below:

NameDescription
appNameName of the app
statusExecution state of the task.
assigneeUser the task is assigned to
taskNameName of the task
taskIdID of the task
parentTaskIdID of the task's parent task
priorityTask priority
createdDateDate the task was created
standaloneStandalone status of the task
ownerUser ID of the task's owner
processDefinitionIdProcess definition ID
processInstanceIdProcess instance ID
lastModifiedDate the task was last modified. If lastModified defined the component will show the range lastModifiedFrom, lastModifiedTo
sortField on which the filter results will be sorted (doesn't participate in the filtering itself). Can be "id", "name", "createdDate", "priority", "processDefinitionId".
orderSort ordering of the filter results it can be ASC or DESC (doesn't participate in the filtering itself).

By default, the status, assignee, sort and order properties are displayed in the editor. However, you can also choose which properties to show using the filterProperties array. For example, the code below initializes the editor with the appName, processInstanceId, createdDate and lastModified properties:

import { UserProcessModel } from '@alfresco/adf-core';

class SomeComponent implements OnInit {

    filterProperties: string[] = [
        "appName",
        "processInstanceId",
        "createdDate",
        "lastModified"];

    onFilterChange(filter: TaskFilterCloudModel) {
        console.log('On filter change: ', filter);
    }

    onAction($event: TaskFilterAction) {
        console.log('Clicked action: ', $event);
    }

With this configuration, only the four listed properties will be shown.

Sort properties

You can supply a list of sort properties to sort the tasks. You can use any of the filter properties listed above as sort properties and you can also use the task id property and use name as a shorthand for taskName.

By default, the id, name, createdDate and priority properties are displayed in the editor. However, you can also choose which sort properties to show using the sortProperties array. For example, the code below initializes the editor with the createdDate , lastModified and priority properties:

export class SomeComponent implements OnInit {

    sortProperties: string[] = [
        "createdDate",
        "lastModified",
        "priority"];

    onFilterChange(filter: TaskFilterCloudModel) {
        console.log('On filter change: ', filter);
    }

    onAction($event: TaskFilterAction) {
        console.log('Clicked action: ', $event);
    }
<adf-cloud-edit-task-filter
    [id]="taskFilterId"
    [appName]="applicationName"
    [sortProperties]="sortProperties">
</adf-cloud-edit-task-filter>

With this configuration, only the three listed sort properties will be shown.

Action properties

You can supply various actions to apply on task filter.

NameDescription
saveSave task filter.
saveAsCreates a new task filter.
deleteDelete task filter.

By default, the save, saveAs and delete actions are displayed in the editor. However, you can also choose which actions to show using the actions array. For example, the code below initializes the editor with the save and delete actions:

export class SomeComponent implements OnInit {

    actions: string[] = ['save', 'delete'];

    onFilterChange(filter: TaskFilterCloudModel) {
        console.log('On filter change: ', filter);
    }

    onAction($event: TaskFilterAction) {
        console.log('Clicked action: ', $event);
    }
<adf-cloud-edit-task-filter
    [id]="taskFilterId"
    [appName]="applicationName"
    [actions]="actions">
</adf-cloud-edit-task-filter>

With this configuration, only the two actions will be shown.

Saving custom filters

Users can save a filter if they make any changes to it in an application using the Save icon. How it is saved is dictated by the Activiti version used:

  • An Activiti 7 community version stores saved filters in the local browser storage. This restricts a user's custom filters to that single session.

  • An Activiti Enterprise version uses the preference service to store saved filters. This allows for user's custom filters to be available between sessions and between devices.

See also

© 2023 Alfresco Software, Inc. All Rights Reserved.