diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
index ff8e279604..48829e5f36 100644
--- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
+++ b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
@@ -36,8 +36,8 @@
Task List
-
diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts b/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts
index 100d71ebb8..3cb9e17d37 100644
--- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts
+++ b/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts
@@ -81,9 +81,9 @@ export class ActivitiDemoComponent implements AfterViewChecked {
taskSchemaColumns: any [] = [];
processSchemaColumns: any [] = [];
- taskFilter: any;
+ taskFilter: FilterRepresentationModel;
report: any;
- processFilter: any;
+ processFilter: FilterRepresentationModel;
sub: Subscription;
@@ -103,11 +103,10 @@ export class ActivitiDemoComponent implements AfterViewChecked {
this.dataProcesses = new ObjectDataTableAdapter(
[],
[
- {type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
- {type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true}
+ {type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column'},
+ {type: 'text', key: 'started', title: 'Started', cssClass: 'hidden'}
]
);
- this.dataProcesses.setSorting(new DataSorting('started', 'desc'));
// Uncomment this line to replace all 'text' field editors with custom component
// formRenderingService.setComponentTypeResolver('text', () => CustomEditorComponent, true);
@@ -163,10 +162,10 @@ export class ActivitiDemoComponent implements AfterViewChecked {
}
onSuccessTaskList(event: FilterRepresentationModel) {
- this.currentTaskId = this.activititasklist.getCurrentTaskId();
+ this.currentTaskId = this.activititasklist.getCurrentId();
}
- onProcessFilterClick(event: any) {
+ onProcessFilterClick(event: FilterRepresentationModel) {
this.processFilter = event;
}
@@ -175,7 +174,7 @@ export class ActivitiDemoComponent implements AfterViewChecked {
}
onSuccessProcessList(event: any) {
- this.currentProcessInstanceId = this.activitiprocesslist.getCurrentProcessId();
+ this.currentProcessInstanceId = this.activitiprocesslist.getCurrentId();
}
onTaskRowClick(taskId) {
diff --git a/ng2-components/ng2-activiti-processlist/README.md b/ng2-components/ng2-activiti-processlist/README.md
index be0d6f1308..0ab002ba91 100644
--- a/ng2-components/ng2-activiti-processlist/README.md
+++ b/ng2-components/ng2-activiti-processlist/README.md
@@ -108,10 +108,10 @@ Follow the 3 steps below:
### Activiti Process Instance List
-This component renders a list containing all the process instances matched by the filter specified.
+This component renders a list containing all the process instances matched by the parameters specified.
```html
-
+
```
Usage example of this component :
@@ -130,14 +130,16 @@ import { ObjectDataTableAdapter, DataSorting } from 'ng2-alfresco-datatable';
@Component({
selector: 'alfresco-app-demo',
- template: ``
})
class MyDemoApp {
dataProcesses: ObjectDataTableAdapter;
- filterRepresentationModel: FilterRepresentationModel;
+ appId: string = '1';
+
+ state: string = 'open';
constructor(private authService: AlfrescoAuthenticationService, private settingsService: AlfrescoSettingsService) {
settingsService.bpmHost = 'http://localhost:9999';
@@ -190,7 +192,10 @@ platformBrowserDynamic().bootstrapModule(AppModule);
| Name | Description |
| --- | --- |
-|`filter`| { UserProcessInstanceFilterRepresentationModel } (required) UserProcessInstanceFilterRepresentationModel object that is passed to the process instance list API to filter the returned list. |
+|`appId`| { appId } The id of the app. |
+|`processDefinitionKey`| { processDefinitionKey } The processDefinitionKey of the process. |
+|`state`| { state } Define state of the processes. Possible values are running, completed and all |
+|`sort`| { sort } Define sort of the processes. Possible values are created-desc, created-asc, ended-desc, ended-asc |
Example:
diff --git a/ng2-components/ng2-activiti-processlist/demo/src/main.ts b/ng2-components/ng2-activiti-processlist/demo/src/main.ts
index a6076bbce2..ac0dd70bb4 100644
--- a/ng2-components/ng2-activiti-processlist/demo/src/main.ts
+++ b/ng2-components/ng2-activiti-processlist/demo/src/main.ts
@@ -22,7 +22,7 @@ import { AppDefinitionRepresentationModel, ActivitiTaskListModule } from 'ng2-ac
import { CoreModule } from 'ng2-alfresco-core';
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
-import { ObjectDataTableAdapter, DataSorting } from 'ng2-alfresco-datatable';
+import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
@Component({
selector: 'alfresco-app-demo',
@@ -144,11 +144,12 @@ class MyDemoApp implements OnInit {
this.dataProcesses = new ObjectDataTableAdapter(
[],
[
+ {type: 'text', key: 'id', title: 'Id'},
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
- {type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true}
+ {type: 'text', key: 'started', title: 'Started', sortable: true},
+ {type: 'text', key: 'startedBy.email', title: 'Started By', sortable: true}
]
);
- this.dataProcesses.setSorting(new DataSorting('started', 'desc'));
}
public updateTicket(): void {
@@ -195,7 +196,7 @@ class MyDemoApp implements OnInit {
}
onSuccessProcessList(event: any) {
- this.currentProcessInstanceId = this.activitiprocesslist.getCurrentProcessId();
+ this.currentProcessInstanceId = this.activitiprocesslist.getCurrentId();
}
onProcessRowClick(processInstanceId) {
diff --git a/ng2-components/ng2-activiti-tasklist/README.md b/ng2-components/ng2-activiti-tasklist/README.md
index d287f191fd..99d5df17dc 100644
--- a/ng2-components/ng2-activiti-tasklist/README.md
+++ b/ng2-components/ng2-activiti-tasklist/README.md
@@ -137,7 +137,7 @@ Follow the 3 steps below:
## Basic usage example Activiti Task List
-The component shows the list of all the tasks filter by the FilterParamRepresentationModel passed in input.
+This component renders a list containing all the tasks matched by the parameters specified.
```html
@@ -218,22 +218,16 @@ platformBrowserDynamic().bootstrapModule(AppModule);
| Name | Description |
| --- | --- |
-| `taskFilter` | { FilterParamRepresentationModel } required) FilterParamRepresentationModel object that is passed to the task list API to filter the task list. |
-
-Example:
-
-```json
-{
- appId: '3003',
- filter:{
- processDefinitionKey: null,
- name:null,
- assignment: 'involved',
- state:'running',
- sort: 'created-desc'
- }
-}
-```
+|`appId`| { appId } The id of the app. |
+|`processDefinitionKey`| { processDefinitionKey } The processDefinitionKey of the process. |
+|`assignment`| { assignment } The assignment of the process.
+Possible values are:
+assignee : where the current user is the assignee
+candidate: where the current user is a task candidate
+group_x: where the task is assigned to a group where the current user is a member of. The groups can be fetched through the profile REST endpoint
+no value: where the current user is involved |
+|`state`| { state } Define state of the processes. Possible values are: completed, active |
+|`sort`| { sort } Define the sort of the processes. Possible values are created-desc, created-asc, due-desc, due-asc |
| Name | Description |
| --- | --- |
diff --git a/ng2-components/ng2-activiti-tasklist/demo/src/main.ts b/ng2-components/ng2-activiti-tasklist/demo/src/main.ts
index 3b7e5d0163..f367d9ab86 100644
--- a/ng2-components/ng2-activiti-tasklist/demo/src/main.ts
+++ b/ng2-components/ng2-activiti-tasklist/demo/src/main.ts
@@ -27,7 +27,7 @@ import {
} from 'ng2-activiti-tasklist';
import { CoreModule } from 'ng2-alfresco-core';
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
-import { ObjectDataTableAdapter, DataSorting } from 'ng2-alfresco-datatable';
+import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
@Component({
selector: 'alfresco-app-demo',
@@ -159,7 +159,6 @@ class MyDemoApp implements OnInit {
{type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true}
]
);
- this.dataTasks.setSorting(new DataSorting('started', 'desc'));
}
public updateTicket(): void {
@@ -209,7 +208,7 @@ class MyDemoApp implements OnInit {
onSuccessTaskList(event: FilterRepresentationModel) {
this.currentTaskId = this.activititasklist.getCurrentId();
}
-main
+
onTaskRowClick(taskId) {
this.currentTaskId = taskId;
}