[ADF-2451] Reviewed component docs (#3108)

* [ADF-2451] Reviewed component docs

* [ADF-2451] Reviewed component docs

* [ADF-2451] Renamed node share directive doc fileand rebuilt index
This commit is contained in:
Andy Stark
2018-03-22 09:34:26 +00:00
committed by Eugenio Romano
parent e8e2af7d6b
commit 36625c1af6
19 changed files with 363 additions and 681 deletions
+1
View File
@@ -34,6 +34,7 @@ for more information about installing and using the source code.
| [Task filters component](task-filters.component.md) | Shows all available filters. | [Source](../../lib/process-services/task-list/components/task-filters.component.ts) |
| [Task header component](task-header.component.md) | Shows all the information related to a task. | [Source](../../lib/process-services/task-list/components/task-header.component.ts) |
| [Task list component](task-list.component.md) | Renders a list containing all the tasks matched by the parameters specified. | [Source](../../lib/process-services/task-list/components/task-list.component.ts) |
| [Task standalone component](task-standalone.component.md) | This component can be used when there is no form attached to a task. | [Source](../../lib/process-services/task-list/components/task-standalone.component.ts) |
## Directives
@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-21
---
# Process Attachment List component
Displays attached documents on a specified process instance
@@ -17,10 +19,6 @@ Displays attached documents on a specified process instance
</adf-process-attachment-list>
```
If the List is empty, a default no content template is displayed.
![default-no-content-template-sample](../docassets/images/default-no-content-template.png)
Make sure to override the UploadService with the ProcessUploadService
```ts
@@ -57,7 +55,10 @@ export class MyCustomProcessAttachmentComponent {
### How to Add Drag and Drop Functionality
If we want user to be able to upload attachments for empty lists, We can wrap our component with upload drag area component. In that case, We should also pass a custom _no content template_ as shown below with our component urging the user to drag files to upload whenever the list is empty.
You can wrap the attachment list with an
[Upload Drag Area component](../content-services/upload-drag-area.component.md)
to let the user upload attachments to empty lists. When you do this, you can also supply
a custom _no content template_ (using &lt;adf-empty-list>) to invite the user to add their attachments:
<!-- {% raw %} -->
@@ -85,3 +86,7 @@ If we want user to be able to upload attachments for empty lists, We can wrap ou
If the List is empty, the custom no-content template we passed is displayed.
![custom-no-content-drag-drop-template-sample](../docassets/images/custom-no-content-drag-drop-template.png)
A default template will be used if you don't supply a custom one to override it:
![default-no-content-template-sample](../docassets/images/default-no-content-template.png)
+41 -173
View File
@@ -1,62 +1,44 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-21
---
# Process Filter Service
Manage Process Filters, which are pre-configured Process Instance queries.
## Importing
```ts
import { ProcessFilterService, FilterProcessRepresentationModel } from '@alfresco/adf-process-services';
export class SomePageComponent implements OnInit {
constructor(private processFilterService: ProcessFilterService) {
}
```
## Methods
#### createDefaultFilters(appId: number): Observable`<any[]>`
- `getProcessFilters(appId: number): Observable<FilterProcessRepresentationModel[]>`
Gets all filters defined for a Process App.
- `appId` - ID of the target app
- `getProcessFilterById(filterId: number, appId?: number): Observable<FilterProcessRepresentationModel>`
Retrieves the process filter by ID.
- `filterId` - ID of the filter
- `appId` - (Optional) ID of the target app
- `getProcessFilterByName(filterName: string, appId?: number): Observable<FilterProcessRepresentationModel>`
Retrieves the process filter by name.
- `filterName` - Name of the filter
- `appId` - (Optional) ID of the target app
- `createDefaultFilters(appId: number): Observable<FilterProcessRepresentationModel[]>`
Creates and returns the default filters for an app.
- `appId` - ID of the target app
- `getRunningFilterInstance(appId: number): FilterProcessRepresentationModel`
Creates and returns a filter that matches "running" process instances.
- `appId` - ID of the target app
- `addProcessFilter(filter: FilterProcessRepresentationModel): Observable<FilterProcessRepresentationModel>`
Adds a filter.
- `filter` - The filter to add
- `callApiProcessFilters(appId?: number): any`
Calls `getUserProcessInstanceFilters` from the Alfresco JS API.
- `appId` - (Optional) ID of the target app
Create and return the default filters for a Process App:
## Details
```ts
const processAppId = 2;
this.processFilterService.createDefaultFilters(processAppId)
.subscribe( filters => {
console.log('filters: ', filters);
}, error => {
console.log('Error: ', error);
});
```
The response is an array of `FilterProcessRepresentationModel` objects:
filters:
0: {
appId: 2
filter:
name: ""
sort: "created-desc"
state: "running"
icon: "glyphicon-random"
id: null
index: undefined
name: "Running"
recent: true
}
1: {id: null, appId: 2, name: "Completed", recent: false, icon: "glyphicon-ok-sign", …}
2: {id: null, appId: 2, name: "All", recent: true, icon: "glyphicon-th", …}
These filters can now be used to get matching process instances for Process App with ID 2,
such as 'Running', 'Completed', and 'All' .
#### getProcessFilters(appId: number): Observable`<FilterProcessRepresentationModel[]>`
Get all filters defined for a Process App:
The methods of this service generally return an instance of
`FilterProcessRepresentationModel` or an array of instances. For example, you
could use `getProcessFilters` as follows:
```ts
const processAppId = 2;
@@ -70,133 +52,19 @@ this.processFilterService.getProcessFilters(processAppId)
The response is an array of `FilterProcessRepresentationModel` objects:
filters:
0: {id: 15, appId: 2, name: "Running", recent: true, icon: "glyphicon-random", …}
1: {id: 14, appId: 2, name: "Completed", recent: false, icon: "glyphicon-ok-sign", …}
2: {id: 13, appId: 2, name: "All", recent: false, icon: "glyphicon-th", …}
3: {id: 3003, appId: 2, name: "Running", recent: false, icon: "glyphicon-random", …}
4: {id: 3004, appId: 2, name: "Completed", recent: false, icon: "glyphicon-ok-sign", …}
5: {id: 3005, appId: 2, name: "All", recent: false, icon: "glyphicon-th", …}
filters:
0: {id: 15, appId: 2, name: "Running", recent: true, icon: "glyphicon-random", …}
1: {id: 14, appId: 2, name: "Completed", recent: false, icon: "glyphicon-ok-sign", …}
2: {id: 13, appId: 2, name: "All", recent: false, icon: "glyphicon-th", …}
3: {id: 3003, appId: 2, name: "Running", recent: false, icon: "glyphicon-random", …}
4: {id: 3004, appId: 2, name: "Completed", recent: false, icon: "glyphicon-ok-sign", …}
5: {id: 3005, appId: 2, name: "All", recent: false, icon: "glyphicon-th", …}
In this example I had run the `createDefaultFilters` method ones and that created the duplicate of
the default filters.
You can use the returned filters to get matching process instances for the process app with ID 2,
such as 'Running', 'Completed', 'All', etc.
These filters can now be used to get matching process instances for Process App with ID 2,
such as 'Running', 'Completed', and 'All' .
#### getProcessFilterById(filterId: number, appId?: number): Observable`<FilterProcessRepresentationModel>`
## See also
Get a specific Process Filter based on its ID, optionally pass in Process App ID to improve performance
when searching for filter:
```ts
const processAppId = 2;
const filterId = 3003;
this.processFilterService.getProcessFilterById(filterId, processAppId)
.subscribe( (filter: FilterProcessRepresentationModel) => {
console.log('filter: ', filter);
}, error => {
console.log('Error: ', error);
});
```
The response is a `FilterProcessRepresentationModel` object:
appId: 2
filter: {sort: "created-desc", name: "", state: "running"}
icon: "glyphicon-random"
id: 3003
name: "Running"
recent: false
The filter can now be used to get 'Running' process instances for Process App with ID 2.
#### getProcessFilterByName(filterName: string, appId?: number): Observable`<FilterProcessRepresentationModel>`
Get a specific Process Filter based on its name, optionally pass in Process App ID to improve performance
when searching for filter:
```ts
const processAppId = 2;
const filterName = 'Running';
this.processFilterService.getProcessFilterByName(filterName, processAppId)
.subscribe( (filter: FilterProcessRepresentationModel) => {
console.log('filter: ', filter);
}, error => {
console.log('Error: ', error);
});
```
The response is a `FilterProcessRepresentationModel` object:
appId: 2
filter: {sort: "created-desc", name: "", state: "running"}
icon: "glyphicon-random"
id: 15
name: "Running"
recent: true
If there are several filters with the same name for the Process App, then you get back the
first one found matching the name.
The filter can now be used to get 'Running' process instances for Process App with ID 2.
#### addProcessFilter(filter: FilterProcessRepresentationModel): Observable`<FilterProcessRepresentationModel>`
Add a new Process Instance filter:
```ts
const processAppId = 2;
const filterName = 'RunningAsc';
const filterRunningAsc = new FilterProcessRepresentationModel({
'name': filterName,
'appId': processAppId,
'recent': true,
'icon': 'glyphicon-random',
'filter': { 'sort': 'created-asc', 'name': 'runningasc', 'state': 'running' }
});
this.processFilterService.addProcessFilter(filterRunningAsc)
.subscribe( (filterResponse: FilterProcessRepresentationModel) => {
console.log('filterResponse: ', filterResponse);
}, error => {
console.log('Error: ', error);
});
```
The response is a `FilterProcessRepresentationModel` object:
appId: 2
icon: "glyphicon-random"
id: 3008
name: "RunningAsc"
recent: false
The filter can now be used to get 'Running' process instances for
Process App with ID 2 in created date ascending order.
See also the `getRunningFilterInstance` method.
#### getRunningFilterInstance(appId: number): FilterProcessRepresentationModel
Convenience method to create and return a filter that matches `running` process instances
for passed in Process App ID:
```ts
const processAppId = 2;
const runningFilter: FilterProcessRepresentationModel = this.processFilterService.getRunningFilterInstance(processAppId);
console.log('Running filter', runningFilter);
```
The response is a `FilterProcessRepresentationModel` object:
appId: 2
filter: {sort: "created-desc", name: "", state: "running"}
icon: "glyphicon-random"
id: null
index: undefined
name: "Running"
recent: true
The filter can now be used to get 'Running' process instances for
Process App with ID 2 in created date ascending order.
- [Process Filters component](process-filters.component.md)
- [Task Filter service](task-filter.service.md)
@@ -74,4 +74,5 @@ page for an example of how to do set this up.
## See also
- [Process Filter service](process-filter.service.md)
- [Filter model](filter.model.md)
+35 -30
View File
@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-21
---
# Process Instance List
Renders a list containing all the process instances matched by the parameters specified.
@@ -17,9 +19,34 @@ Renders a list containing all the process instances matched by the parameters sp
</adf-process-instance-list>
```
You can also use custom schema declaration as shown below:
### Properties
define custom schema in the app.config.json as shown below json format.
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| appId | number | | The id of the app. |
| processDefinitionKey | string | | The processDefinitionKey of the process. |
| presetColumn | string | | Name of a custom schema to fetch from `app.config.json`. |
| state | string | | Define state of the processes. Possible values are `running`, `completed` and `all` |
| sort | string | | Define sort of the processes. Possible values are `created-desc`, `created-asc`, `ended-desc`, `ended-asc` |
| name | string | | The name of the list. |
| page | number | 0 | The page of the processes to fetch. |
| size | number | 25 | The number of processes to fetch. |
| data | DataTableAdapter | | Data source to define the datatable. |
| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each row. |
| selectionMode | string | 'single' | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
### Events
| Name | Description |
| ---- | ----------- |
| rowClick | Emitted when a row in the process list is clicked |
| success | Emitted when the list of process instances has been loaded successfully from the server |
| error | Emitted when an error is encountered loading the list of process instances from the server |
## Details
You can define a custom schema for the list in the `app.config.json` file and access it with the
`presetColumn` property as shown below:
```json
"adf-process-list": {
@@ -50,7 +77,9 @@ define custom schema in the app.config.json as shown below json format.
</adf-process-instance-list>
```
You can also use both HTML-based and app.config.json custom schema declaration at same time like shown below:
You can also define the schema in the HTML using the
[Data column component](../core/data-column.component.md). You can combine this with schema
information defined in `app.config.json` as in the example below:
```json
"adf-process-list": {
@@ -93,7 +122,7 @@ You can also use both HTML-based and app.config.json custom schema declaration a
### Pagination strategy
adf-process-instance-list also supports pagination and the same can be used as shown below.
The Process Instance List also supports pagination:
```html
<adf-process-instance-list
@@ -110,32 +139,8 @@ adf-process-instance-list also supports pagination and the same can be used as s
</adf-pagination>
```
### Properties
| Name | Type | Default | Description |
| ---- | ----------- | --- | --- |
| appId | number | | The id of the app. |
| processDefinitionKey | string | | The processDefinitionKey of the process. |
| presetColumn | string | | The presetColumn of the custom schema to fetch. |
| state | string | | Define state of the processes. Possible values are `running`, `completed` and `all` |
| sort | string | | Define sort of the processes. Possible values are `created-desc`, `created-asc`, `ended-desc`, `ended-asc` |
| name | string | | The name of the list. |
| page | number | 0 | The page of the processes to fetch. |
| size | number | 25 | The number of processes to fetch. |
| data | DataTableAdapter | | Data source to define the datatable. |
| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each row. |
| selectionMode | string | 'single' | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
### Events
| Name | Description |
| ---- | ----------- |
| rowClick | Emitted when a row in the process list is clicked |
| success | Emitted when the list of process instances has been loaded successfully from the server |
| error | Emitted when an error is encountered loading the list of process instances from the server |
## See also
- [Data column component](../core/data-column.component.md)
- [DataTableAdapter](../core/datatable-adapter.interface.md)
- [Pagination component](../core/pagination.component.md)
- [Data Table Adapter interface](../core/datatable-adapter.interface.md)
- [Pagination component](../core/pagination.component.md)
+56 -297
View File
@@ -2,66 +2,50 @@
Added: v2.0.0
Status: Active
---
# Task Filter Service
Manage Task Filters, which are pre-configured Task Instance queries.
## Importing
```ts
import { TaskFilterService, FilterRepresentationModel } from '@alfresco/adf-process-services';
export class SomePageComponent implements OnInit {
constructor(private taskFilterService: TaskFilterService) {
}
```
## Methods
#### createDefaultFilters(appId: number): Observable`<FilterRepresentationModel[]>`
Create and return the default task filters for a Process App:
- `createDefaultFilters(appId: number): Observable<FilterRepresentationModel[]>`
Creates and returns the default filters for a process app.
- `appId` - ID of the target app
- `getTaskListFilters(appId?: number): Observable<FilterRepresentationModel[]>`
Gets all task filters for a process app.
- `appId` - (Optional) Optional ID for a specific app
- `getTaskFilterById(filterId: number, appId?: number): Observable<FilterRepresentationModel>`
Gets a task filter by ID.
- `filterId` - ID of the filter
- `appId` - (Optional) ID of the app for the filter
- `getTaskFilterByName(taskName: string, appId?: number): Observable<FilterRepresentationModel>`
Gets a task filter by name.
- `taskName` - Name of the filter
- `appId` - (Optional) ID of the app for the filter
- `addFilter(filter: FilterRepresentationModel): Observable<FilterRepresentationModel>`
Adds a new task filter
- `filter` - The new filter to add
- `callApiTaskFilters(appId?: number): any`
Calls `getUserTaskFilters` from the Alfresco JS API.
- `appId` - (Optional) ID of the target app
- `getInvolvedTasksFilterInstance(appId: number): FilterRepresentationModel`
Creates and returns a filter for "Involved" task instances.
- `appId` - ID of the target app
- `getMyTasksFilterInstance(appId: number): FilterRepresentationModel`
Creates and returns a filter for "My Tasks" task instances.
- `appId` - ID of the target app
- `getQueuedTasksFilterInstance(appId: number): FilterRepresentationModel`
Creates and returns a filter for "Queued Tasks" task instances.
- `appId` - ID of the target app
- `getCompletedTasksFilterInstance(appId: number): FilterRepresentationModel`
Creates and returns a filter for "Completed" task instances.
- `appId` - ID of the target app
```ts
const processAppId = 2;
this.taskFilterService.createDefaultFilters(processAppId).subscribe( (filters: FilterRepresentationModel[]) => {
console.log('Task filters: ', filters);
}, error => {
console.log('Error: ', error);
});
```
## Details
The response is an array of `FilterRepresentationModel` objects:
```
filters:
0: {
appId: 2
filter : {
assignment: "involved"
dueAfter: null
dueBefore: null
name: null
processDefinitionId: null
processDefinitionKey: null
sort: "created-desc"
state: "open"
}
icon: "glyphicon-align-left"
id: null
index: undefined
name: "Involved Tasks"
recent: false
1: {id: null, appId: 2, name: "My Tasks", recent: false, icon: "glyphicon-inbox", …}
2: {id: null, appId: 2, name: "Queued Tasks", recent: false, icon: "glyphicon-record", …}
3: {id: null, appId: 2, name: "Completed Tasks", recent: true, icon: "glyphicon-ok-sign", …}
```
These filters can now be used to get matching Task Instances for Process App with ID 2,
such as 'Involved Tasks', 'My Tasks', 'Queued Tasks', and 'Completed Tasks'.
#### getTaskListFilters(appId?: number): Observable`<any>`
Get all task filters defined for a Process App:
The methods of this service generally return an instance of `FilterRepresentationModel` or
an array of instances. For example, you could use `getTaskListFilters` as follows:
```ts
const processAppId = 2;
@@ -74,256 +58,31 @@ this.taskFilterService.getTaskListFilters(processAppId).subscribe( (filters: Fil
The response is an array of `FilterRepresentationModel` objects:
```
filters:
0: {id: 10, appId: 2, name: "Involved Tasks", recent: true, icon: "glyphicon-align-left", …}
1: {id: 9, appId: 2, name: "My Tasks", recent: false, icon: "glyphicon-inbox", …}
2: {id: 11, appId: 2, name: "Queued Tasks", recent: false, icon: "glyphicon-record", …}
3: {id: 12, appId: 2, name: "Completed Tasks", recent: false, icon: "glyphicon-ok-sign", …}
4: {id: 4004, appId: 2, name: "Completed Tasks", recent: false, icon: "glyphicon-ok-sign", …}
5: {id: 4005, appId: 2, name: "My Tasks", recent: false, icon: "glyphicon-inbox", …}
6: {id: 4006, appId: 2, name: "Queued Tasks", recent: false, icon: "glyphicon-record", …}
7: {id: 4007, appId: 2, name: "Involved Tasks", recent: false, icon: "glyphicon-align-left", …}
```
In this example I had run the `createDefaultFilters` method once, and that created the duplicate of
the default filters.
filters:
0: {id: 10, appId: 2, name: "Involved Tasks", recent: true, icon: "glyphicon-align-left", …}
1: {id: 9, appId: 2, name: "My Tasks", recent: false, icon: "glyphicon-inbox", …}
2: {id: 11, appId: 2, name: "Queued Tasks", recent: false, icon: "glyphicon-record", …}
3: {id: 12, appId: 2, name: "Completed Tasks", recent: false, icon: "glyphicon-ok-sign", …}
4: {id: 4004, appId: 2, name: "Completed Tasks", recent: false, icon: "glyphicon-ok-sign", …}
5: {id: 4005, appId: 2, name: "My Tasks", recent: false, icon: "glyphicon-inbox", …}
6: {id: 4006, appId: 2, name: "Queued Tasks", recent: false, icon: "glyphicon-record", …}
7: {id: 4007, appId: 2, name: "Involved Tasks", recent: false, icon: "glyphicon-align-left", …}
These filters can now be used to get matching Task Instances for Process App with ID 2,
These filters can now be used to get matching task instances for the process app with ID 2,
such as 'Involved Tasks', 'My Tasks', 'Queued Tasks', and 'Completed Tasks'.
If you want to return all filters regardless of Process App, and filter out duplicates,
then you can just leave out the Process App number:
### Importing
```ts
this.taskFilterService.getTaskListFilters().subscribe( (filters: FilterRepresentationModel[]) => {
console.log('Task filters: ', filters);
}, error => {
console.log('Error: ', error);
});
import { TaskFilterService, FilterRepresentationModel } from '@alfresco/adf-process-services';
export class SomePageComponent implements OnInit {
constructor(private taskFilterService: TaskFilterService) {
}
```
#### getTaskFilterById(filterId: number, appId?: number): Observable`<FilterRepresentationModel>`
Get a specific Task Filter based on its ID, optionally pass in Process App ID to improve performance
when searching for filter:
## See also
```ts
const processAppId = 2;
const taskFilterId = 4007;
this.taskFilterService.getTaskFilterById(taskFilterId, processAppId).subscribe( (filter: FilterRepresentationModel) => {
console.log('Task filter: ', filter);
}, error => {
console.log('Error: ', error);
});
```
The response is a `FilterRepresentationModel` object:
```
Task filter:
appId: 2
filter:
assignment: "involved"
sort: "created-desc"
state: "open"
icon: "glyphicon-align-left"
id: 4007
name: "Involved Tasks"
recent: false
```
The filter can now be used to get 'Involved Tasks' Task Instances for Process App with ID 2.
#### getTaskFilterByName(taskName: string, appId?: number): Observable`<FilterRepresentationModel>`
Get a specific Task Filter based on its name, optionally pass in Process App ID to improve performance
when searching for filter:
```ts
const processAppId = 2;
const taskFilterName = 'Completed Tasks';
this.taskFilterService.getTaskFilterByName(taskFilterName, processAppId).subscribe( (filter: FilterRepresentationModel) => {
console.log('Task filter: ', filter);
}, error => {
console.log('Error: ', error);
});
```
The response is a `FilterRepresentationModel` object:
```
appId: 2
filter: {sort: "created-desc", name: "", state: "completed", assignment: "involved"}
icon: "glyphicon-ok-sign"
id: 12
name: "Completed Tasks"
recent: false
```
If there are several filters with the same name for the Process App, then you get back the
first one found matching the name.
The filter can now be used to get 'Completed Tasks' Task Instances for Process App with ID 2.
#### addFilter(filter: FilterRepresentationModel): Observable`<FilterRepresentationModel>`
Add a new Task Instance filter:
```ts
const processAppId = 2;
const filterName = 'InvolvedAsc';
const filterInvolvedAsc = new FilterRepresentationModel({
'name': filterName,
'appId': processAppId,
'recent': false,
'icon': 'glyphicon-align-left',
'filter': { 'assignment': 'involved', 'sort': 'created-asc', 'state': 'open' }
});
this.taskFilterService.addFilter(filterInvolvedAsc).subscribe( (filterResponse: FilterRepresentationModel) => {
console.log('Task filter: ', filterResponse);
}, error => {
console.log('Error: ', error);
});
```
The response is a `FilterRepresentationModel` object:
```
appId: 2
icon: "glyphicon-align-left"
id: 4008
name: "InvolvedAsc"
recent: false
```
The filter can now be used to get 'Involved' Task Instances for
Process App with ID 2 in created date ascending order.
#### getRunningFilterInstance(appId: number): FilterProcessRepresentationModel
Convenience method to create and return a filter that matches `involved` Task Instances
for passed in Process App ID:
```ts
const processAppId = 2;
const involvedFilter: FilterRepresentationModel = this.taskFilterService.getInvolvedTasksFilterInstance(processAppId);
console.log('Involved filter', involvedFilter);
```
The response is a `FilterRepresentationModel` object:
```
appId: 2
filter:
assignment: "involved"
dueAfter: null
dueBefore: null
name: null
processDefinitionId: null
processDefinitionKey: null
sort: "created-desc"
state: "open"
icon: "glyphicon-align-left"
id: null
index: undefined
name: "Involved Tasks"
recent: false
```
Use the `addFilter` to add this filter to a Process App.
#### getMyTasksFilterInstance(appId: number): FilterProcessRepresentationModel
Convenience method to create and return a filter that matches `My Tasks` Task Instances
for passed in Process App ID:
```ts
const processAppId = 2;
const myTasksFilter: FilterRepresentationModel = this.taskFilterService.getMyTasksFilterInstance(processAppId);
console.log('My Tasks filter', myTasksFilter);
```
The response is a `FilterRepresentationModel` object:
```
appId: 2
filter:
assignment: "assignee"
dueAfter: null
dueBefore: null
name: null
processDefinitionId: null
processDefinitionKey: null
sort: "created-desc"
state: "open"
icon: "glyphicon-inbox"
id: null
index: undefined
name: "My Tasks"
recent: false
```
Use the `addFilter` to add this filter to a Process App.
#### getQueuedTasksFilterInstance(appId: number): FilterProcessRepresentationModel
Convenience method to create and return a filter that matches `Queued Tasks` Task Instances
for passed in Process App ID:
```ts
const processAppId = 2;
const queuedTasksFilter: FilterRepresentationModel = this.taskFilterService.getQueuedTasksFilterInstance(processAppId);
console.log('Queued Tasks filter', queuedTasksFilter);
```
The response is a `FilterRepresentationModel` object:
```
appId: 2
filter:
assignment: "candidate"
dueAfter: null
dueBefore: null
name: null
processDefinitionId: null
processDefinitionKey: null
sort: "created-desc"
state: "open"
icon: "glyphicon-record"
id: null
index: undefined
name: "Queued Tasks"
recent: false
```
Use the `addFilter` to add this filter to a Process App.
#### getCompletedTasksFilterInstance(appId: number): FilterProcessRepresentationModel
Convenience method to create and return a filter that matches `Completed Tasks` Task Instances
for passed in Process App ID:
```ts
const processAppId = 2;
const completedTasksFilter: FilterRepresentationModel = this.taskFilterService.getCompletedTasksFilterInstance(processAppId);
console.log('Completed Tasks filter', completedTasksFilter);
```
The response is a `FilterRepresentationModel` object:
```
appId: 2
filter:
assignment: "involved"
dueAfter: null
dueBefore: null
name: null
processDefinitionId: null
processDefinitionKey: null
sort: "created-desc"
state: "completed"
icon: "glyphicon-ok-sign"
id: null
index: undefined
name: "Completed Tasks"
recent: true
```
Use the `addFilter` to add this filter to a Process App.
<!-- seealso start -->
<!-- seealso end -->
- [Task Filters component](task-filters.component.md)
- [Process Filter service](process-filter.service.md)
@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-21
---
# Task Header component
Shows all the information related to a task.
@@ -32,14 +34,14 @@ Shows all the information related to a task.
## Details
The purpose of the component is to populate the local variable called `properties` (array of CardViewModel), with all the information that we want to display.
The component populates an internal array of
[CardViewModel](../core/card-view.component.md) with the information that we want to display.
By default all properties are displayed:
## Customise the property showed
By default all the property are showed :
***assignee***, ***status***, ***priority***, ***dueDate***, ***category***, ***parentName***, ***created-by***, ***created***, ***id***, ***description***, ***formName***.
It is possible to customise the showed property via the "app.config.json".
This is how the configuration looks like:
However, you can also choose which properties to show using a configuration in `app.config.json`:
```json
@@ -50,7 +52,7 @@ This is how the configuration looks like:
},
```
In this way only the listed property will be showed.
With this configuration, only the four listed properties will be shown.
## See also