alfresco-ng2-components/docs/process-services-cloud/edit-task-filter-cloud.component.md
Andy Stark f77764bc21 [ADF-3745] Clarified Edit process/task filter cloud component docs (#4228)
* [ADF-3745] Initial review of edit proc filter cloud docs

* [ADF-3745] Updated page ordering

* [ADF-3745] Updated info about sort property

* [ADF-3745] Added edit task cloud component docs

* [ADF-3745] Fixed small typos
2019-01-31 09:30:16 +00:00

4.3 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]="applicationName"
    [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]="applicationName">
</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
initiator ID of the user who initiated the process
state Execution state of the task.
sort Field on which the filter results will be sorted (doesn't participate in the filtering itself). Can be "id", "name", "status" or "startDate".
order Sort ordering of the filter results (this doesn't participate in the filtering itself)
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
startDate Date the task was started
lastModified Date the task was last modified
lastModifiedFrom Finds tasks modified after this date
lastModifiedTo Finds tasks modified before this date

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