alfresco-ng2-components/docs/process-services-cloud/edit-task-filter-cloud.component.md
Silviu Popa 877c57b356 [ADF-4067] Process Service Cloud change applicationName input (#4299)
* [ADF-4047] Process Service Cloud change applicationName input

* [ADF-4067] Change applicationName properties and route param name
2019-02-20 18:02:53 +00:00

4.2 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Edit Task Filter Cloud component v3.0.0 Experimental 2019-01-30

Edit Task Filter Cloud component

Edits Task Filter Details.

edit-task-filter-cloud

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

Name Type Default value Description
appName string (required) Name of the app.
id string "" (required) The id of the Task filter.
filterProperties string [] ['state', 'assignment', 'sort', 'order'] List of task filter properties to display.
showFilterActions boolean true Toggles edit task filter actions.
showTitle boolean true Toggles edit task filter title.

Events

Name Type Description
action EventEmitter<FilterActionType> Emitted when a filter action occurs (i.e Save, Save As, Delete).
filterChange EventEmitter<TaskFilterCloudModel> 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:

Name Description
appName Name of the app
state Execution state of the task.
assignment User the task is assigned to
taskName Name of the task
parentTaskId ID of the task's parent task
priority Task priority
standAlone Standalone status of the task
owner User ID of the task's owner
processDefinitionId Process definition ID
processDefinitionKey Process definition key
processInstanceId Process instance ID
lastModifiedFrom Finds tasks modified after this date
lastModifiedTo Finds tasks modified before this date
sort Field on which the filter results will be sorted (doesn't participate in the filtering itself). Can be "id", "name", "createdDate", "priority", "processDefinitionId".
order Sort ordering of the filter results it can be ASC or DESC (doesn't participate in the filtering itself).

By default, the state, assignment, 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, startDate and lastModifiedTo properties:

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

export class SomeComponent implements OnInit {

    filterProperties: string[] = [
        "appName",
        "processInstanceId",
        "startDate",
        "lastModifiedTo"];

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

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

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

Note: Currently, the sort property has a limited set of properties to choose from: id, name, status and startDate.

See also