Dev mromano improveprocess (#1334)

* fix overload activiti

* fix reload tasklist

* fix process variables

* fix default filter

* improve process list

* fix tests process

* fix tests

* Fix test for form

* fix tests

* fix tests

* #fix activiti bug

* #fix activiti bug (reverted from commit c966395ed1087e1dedaf0af0923a89ba99d6ab9f)

* fix tests

* #fix header test bug

* fix tests

* fix process

* fix tests
This commit is contained in:
Mario Romano
2016-12-20 09:37:56 +00:00
committed by GitHub
parent 636fa770b4
commit 11894a9769
34 changed files with 375 additions and 207 deletions

View File

@@ -280,7 +280,6 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
loadForm() {
if (this.taskId) {
this.getFormByTaskId(this.taskId);
this.visibilityService.getTaskProcessVariable(this.taskId).subscribe();
return;
}
@@ -295,6 +294,22 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
}
}
loadFormPorcessVariable(taskId) {
this.formService.getTask(taskId).subscribe(
task => {
if (this.isAProcessTask(task)) {
this.visibilityService.getTaskProcessVariable(taskId).subscribe();
}
},
(error) => {
this.handleError(error);
});
}
isAProcessTask(taskRepresentation) {
return taskRepresentation.processDefinitionId && taskRepresentation.processDefinitionDeploymentId !== 'null';
}
setupMaterialComponents(): boolean {
// workaround for MDL issues with dynamic components
if (componentHandler) {
@@ -305,6 +320,7 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
}
getFormByTaskId(taskId: string) {
this.loadFormPorcessVariable(this.taskId);
let data = this.data;
this.formService
.getTaskForm(taskId)
@@ -411,7 +427,7 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
*/
getFormDefinitionOutcomes(form: FormModel): FormOutcomeModel[] {
return [
new FormOutcomeModel(form, { id: '$custom', name: FormOutcomeModel.SAVE_ACTION, isSystem: true })
new FormOutcomeModel(form, {id: '$custom', name: FormOutcomeModel.SAVE_ACTION, isSystem: true})
];
}