Merge pull request #772 from Alfresco/dev-valbano-fix-visibility-tests

Dev valbano fix visibility tests
This commit is contained in:
Maurizio Vitale 2016-09-21 16:55:38 +01:00 committed by GitHub
commit c8e8dffe64
3 changed files with 127 additions and 125 deletions

View File

@ -30,13 +30,14 @@ declare var componentHandler;
}) })
export class UploadWidget extends WidgetComponent implements OnInit { export class UploadWidget extends WidgetComponent implements OnInit {
hasFile: boolean;
fileName: string;
constructor(private settingsService: AlfrescoSettingsService, constructor(private settingsService: AlfrescoSettingsService,
private authService: AlfrescoAuthenticationService) { private authService: AlfrescoAuthenticationService) {
super(); super();
} }
hasFile: boolean;
fileName: string;
ngOnInit() { ngOnInit() {
if (this.field && if (this.field &&

View File

@ -205,11 +205,15 @@ describe('WidgetVisibilityService', () => {
expect(res).toBeFalsy(); expect(res).toBeFalsy();
}); });
/*
it('should be able to retrieve the value of a process variable', (done) => { it('should be able to retrieve the value of a process variable', (done) => {
service.getTaskProcessVariableModelsForTask(9999).subscribe( service.getTaskProcessVariableModelsForTask(9999).subscribe(
(res: TaskProcessVariableModel[]) => { (res: TaskProcessVariableModel[]) => {
done(); expect(res).toBeDefined();
let varValue = service.getValueFromVariable(formTest, 'TEST_VAR_1', res);
expect(varValue).not.toBeUndefined();
expect(varValue).toBe('test_value_1');
done();
} }
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
@ -217,14 +221,7 @@ describe('WidgetVisibilityService', () => {
contentType: 'application/json', contentType: 'application/json',
responseText: JSON.stringify(fakeTaskProcessVariableModels) responseText: JSON.stringify(fakeTaskProcessVariableModels)
}); });
});
let varValue = service.getValueFromVariable(formTest, 'TEST_VAR_1');
expect(varValue).not.toBe(null);
expect(varValue).toBe('test_value_1');
});
*/
it('should be able to retrieve the value of a form variable', () => { it('should be able to retrieve the value of a form variable', () => {
let fakeForm = new FormModel({variables: [ let fakeForm = new FormModel({variables: [
@ -232,17 +229,19 @@ describe('WidgetVisibilityService', () => {
type: 'string', type: 'string',
value: 'form_value_test' } value: 'form_value_test' }
]}); ]});
let varValue = service.getValueFromVariable(fakeForm, 'FORM_VARIABLE_TEST'); let varValue = service.getValueFromVariable(fakeForm, 'FORM_VARIABLE_TEST', null);
expect(varValue).not.toBe(null); expect(varValue).not.toBeUndefined();
expect(varValue).toBe('form_value_test'); expect(varValue).toBe('form_value_test');
}); });
/*
it('should return null if the variable does not exist', (done) => { it('should return undefined if the variable does not exist', (done) => {
service.getTaskProcessVariableModelsForTask(9999).subscribe( service.getTaskProcessVariableModelsForTask(9999).subscribe(
(res: TaskProcessVariableModel[]) => { (res: TaskProcessVariableModel[]) => {
done(); let varValue = service.getValueFromVariable(formTest, 'TEST_MYSTERY_VAR', res);
expect(varValue).toBeUndefined();
done();
} }
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
@ -251,36 +250,34 @@ describe('WidgetVisibilityService', () => {
responseText: JSON.stringify(fakeTaskProcessVariableModels) responseText: JSON.stringify(fakeTaskProcessVariableModels)
}); });
let varValue = service.getValueFromVariable(formTest, 'TEST_MYSTERY_VAR');
expect(varValue).toBe(null); });
});
*/
it('should be able to retrieve a field value searching in the form', () => { it('should be able to retrieve a field value searching in the form', () => {
let stubFormWithFields = new FormModel(fakeFormJson); let stubFormWithFields = new FormModel(fakeFormJson);
let formValue = service.getFormValueByName(stubFormWithFields, 'FIELD_WITH_CONDITION'); let formValue = service.getFormValueByName(stubFormWithFields, 'FIELD_WITH_CONDITION');
expect(formValue).not.toBe(null); expect(formValue).not.toBeNull();
expect(formValue).toBe('field_with_condition_value'); expect(formValue).toBe('field_with_condition_value');
}); });
it('should return null if the field value is not in the form', () => { it('should return undefined if the field value is not in the form', () => {
let stubFormWithFields = new FormModel(fakeFormJson); let stubFormWithFields = new FormModel(fakeFormJson);
let formValue = service.getFormValueByName(stubFormWithFields, 'FIELD_MYSTERY'); let formValue = service.getFormValueByName(stubFormWithFields, 'FIELD_MYSTERY');
expect(formValue).toBe(null); expect(formValue).toBeUndefined();
}); });
it('should take the value from form values if it is present', () => { it('should take the value from form values if it is present', () => {
formTest.values = formValues; formTest.values = formValues;
let formValue = service.getValueOField(formTest, 'test_1'); let formValue = service.getValueOField(formTest, 'test_1');
expect(formValue).not.toBe(null); expect(formValue).not.toBeNull();
expect(formValue).toBe('value_1'); expect(formValue).toBe('value_1');
}); });
it('should search in the form if element value is not in form values', () => { it('should search in the form if element value is not in form values', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
@ -288,18 +285,18 @@ describe('WidgetVisibilityService', () => {
let value = service.getValueOField(fakeFormWithField, 'FIELD_WITH_CONDITION'); let value = service.getValueOField(fakeFormWithField, 'FIELD_WITH_CONDITION');
expect(value).not.toBe(null); expect(value).not.toBeNull();
expect(value).toBe('field_with_condition_value'); expect(value).toBe('field_with_condition_value');
}); });
it('should return null if the element is not present anywhere', () => { it('should return undefined if the element is not present anywhere', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
fakeFormWithField.values = formValues; fakeFormWithField.values = formValues;
let formValue = service.getValueOField(fakeFormWithField, 'FIELD_MYSTERY'); let formValue = service.getValueOField(fakeFormWithField, 'FIELD_MYSTERY');
expect(formValue).toBe(null); expect(formValue).toBeUndefined();
}); });
it('should retrieve the value for the right field when it is a value', () => { it('should retrieve the value for the right field when it is a value', () => {
let visibilityObjTest = new WidgetVisibilityModel(); let visibilityObjTest = new WidgetVisibilityModel();
@ -308,13 +305,19 @@ describe('WidgetVisibilityService', () => {
let rightValue = service.getRightValue(formTest, visibilityObjTest); let rightValue = service.getRightValue(formTest, visibilityObjTest);
expect(rightValue).toBe('100'); expect(rightValue).toBe('100');
}); });
/*
it('should retrieve the value for the right field when it is a process variable', (done) => { it('should retrieve the value for the right field when it is a process variable', (done) => {
service.getTaskProcessVariableModelsForTask(9999).subscribe( service.getTaskProcessVariableModelsForTask(9999).subscribe(
(res: TaskProcessVariableModel[]) => { (res: TaskProcessVariableModel[]) => {
done(); let visibilityObjTest = new WidgetVisibilityModel();
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
let rightValue = service.getRightValue(formTest, visibilityObjTest);
expect(rightValue).not.toBeNull();
expect(rightValue).toBe('test_value_2');
done();
} }
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
@ -322,15 +325,7 @@ describe('WidgetVisibilityService', () => {
contentType: 'application/json', contentType: 'application/json',
responseText: JSON.stringify(fakeTaskProcessVariableModels) responseText: JSON.stringify(fakeTaskProcessVariableModels)
}); });
let visibilityObjTest = new WidgetVisibilityModel(); });
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
let rightValue = service.getRightValue(formTest, visibilityObjTest);
expect(rightValue).not.toBe(null);
expect(rightValue).toBe('test_value_2');
});
*/
it('should retrieve the value for the right field when it is a form variable', () => { it('should retrieve the value for the right field when it is a form variable', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
@ -339,9 +334,9 @@ describe('WidgetVisibilityService', () => {
let rightValue = service.getRightValue(fakeFormWithField, visibilityObjTest); let rightValue = service.getRightValue(fakeFormWithField, visibilityObjTest);
expect(rightValue).not.toBe(null); expect(rightValue).not.toBeNull();
expect(rightValue).toBe('RIGHT_FORM_FIELD_VALUE'); expect(rightValue).toBe('RIGHT_FORM_FIELD_VALUE');
}); });
it('should retrieve right value from form values if it is present', () => { it('should retrieve right value from form values if it is present', () => {
formTest.values = formValues; formTest.values = formValues;
@ -350,12 +345,12 @@ describe('WidgetVisibilityService', () => {
let rightValue = service.getRightValue(formTest, visibilityObjTest); let rightValue = service.getRightValue(formTest, visibilityObjTest);
expect(rightValue).not.toBe(null); expect(rightValue).not.toBeNull();
expect(formTest.values).toEqual(formValues); expect(formTest.values).toEqual(formValues);
expect(rightValue).toBe('value_2'); expect(rightValue).toBe('value_2');
}); });
it('should return null for a value that is not on variable or form', () => { it('should return undefined for a value that is not on variable or form', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
fakeFormWithField.values = formValues; fakeFormWithField.values = formValues;
let visibilityObjTest = new WidgetVisibilityModel(); let visibilityObjTest = new WidgetVisibilityModel();
@ -363,14 +358,20 @@ describe('WidgetVisibilityService', () => {
let rightValue = service.getRightValue(fakeFormWithField, visibilityObjTest); let rightValue = service.getRightValue(fakeFormWithField, visibilityObjTest);
expect(rightValue).toBe(null); expect(rightValue).toBeUndefined();
}); });
/* it('should retrieve the value for the left field when it is a process variable', (done) => {
it('should retrieve the value for the left field when it is a process variable', (variableUpdated) => {
service.getTaskProcessVariableModelsForTask(9999).subscribe( service.getTaskProcessVariableModelsForTask(9999).subscribe(
(res: TaskProcessVariableModel[]) => { (res: TaskProcessVariableModel[]) => {
variableUpdated(); let visibilityObjTest = new WidgetVisibilityModel();
visibilityObjTest.leftRestResponseId = 'TEST_VAR_2';
let rightValue = service.getLeftValue(formTest, visibilityObjTest);
expect(rightValue).not.toBeNull();
expect(rightValue).toBe('test_value_2');
done();
} }
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
@ -378,15 +379,7 @@ describe('WidgetVisibilityService', () => {
contentType: 'application/json', contentType: 'application/json',
responseText: JSON.stringify(fakeTaskProcessVariableModels) responseText: JSON.stringify(fakeTaskProcessVariableModels)
}); });
let visibilityObjTest = new WidgetVisibilityModel(); });
visibilityObjTest.leftRestResponseId = 'TEST_VAR_2';
let rightValue = service.getLeftValue(formTest, visibilityObjTest);
expect(rightValue).not.toBe(null);
expect(rightValue).toBe('test_value_2');
});
*/
it('should retrieve the value for the left field when it is a form variable', () => { it('should retrieve the value for the left field when it is a form variable', () => {
let fakeForm = new FormModel({variables: [ let fakeForm = new FormModel({variables: [
@ -399,9 +392,9 @@ describe('WidgetVisibilityService', () => {
let leftValue = service.getLeftValue(fakeForm, visibilityObjTest); let leftValue = service.getLeftValue(fakeForm, visibilityObjTest);
expect(leftValue).not.toBe(null); expect(leftValue).not.toBeNull();
expect(leftValue).toBe('form_value_test'); expect(leftValue).toBe('form_value_test');
}); });
it('should retrieve the value for the left field when it is a form value', () => { it('should retrieve the value for the left field when it is a form value', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
@ -410,9 +403,9 @@ describe('WidgetVisibilityService', () => {
let leftValue = service.getLeftValue(fakeFormWithField, visibilityObjTest); let leftValue = service.getLeftValue(fakeFormWithField, visibilityObjTest);
expect(leftValue).not.toBe(null); expect(leftValue).not.toBeNull();
expect(leftValue).toBe('field_with_condition_value'); expect(leftValue).toBe('field_with_condition_value');
}); });
it('should retrieve left value from form values if it is present', () => { it('should retrieve left value from form values if it is present', () => {
formTest.values = formValues; formTest.values = formValues;
@ -421,18 +414,18 @@ describe('WidgetVisibilityService', () => {
let leftValue = service.getLeftValue(formTest, visibilityObjTest); let leftValue = service.getLeftValue(formTest, visibilityObjTest);
expect(leftValue).not.toBe(null); expect(leftValue).not.toBeNull();
expect(leftValue).toBe('value_2'); expect(leftValue).toBe('value_2');
}); });
it('should return null for a value that is not on variable or form', () => { it('should return undefined for a value that is not on variable or form', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
let visibilityObjTest = new WidgetVisibilityModel(); let visibilityObjTest = new WidgetVisibilityModel();
let leftValue = service.getLeftValue(fakeFormWithField, visibilityObjTest); let leftValue = service.getLeftValue(fakeFormWithField, visibilityObjTest);
expect(leftValue).toBe(null); expect(leftValue).toBeUndefined();
}); });
it('should evaluate the visibility for the field with single visibility condition between two field values', () => { it('should evaluate the visibility for the field with single visibility condition between two field values', () => {
formTest.values = formValues; formTest.values = formValues;
@ -444,7 +437,7 @@ describe('WidgetVisibilityService', () => {
let isVisible = service.evaluateVisibilityForField(formTest, visibilityObjTest); let isVisible = service.evaluateVisibilityForField(formTest, visibilityObjTest);
expect(isVisible).toBeTruthy(); expect(isVisible).toBeTruthy();
}); });
it('should evaluate true visibility for the field with single visibility condition between a field and a value', () => { it('should evaluate true visibility for the field with single visibility condition between a field and a value', () => {
formTest.values = formValues; formTest.values = formValues;
@ -456,7 +449,7 @@ describe('WidgetVisibilityService', () => {
let isVisible = service.evaluateVisibilityForField(formTest, visibilityObjTest); let isVisible = service.evaluateVisibilityForField(formTest, visibilityObjTest);
expect(isVisible).toBeTruthy(); expect(isVisible).toBeTruthy();
}); });
it('should evaluate the visibility for the field with single visibility condition between form values', () => { it('should evaluate the visibility for the field with single visibility condition between form values', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
@ -468,13 +461,21 @@ describe('WidgetVisibilityService', () => {
let isVisible = service.evaluateVisibilityForField(fakeFormWithField, visibilityObjTest); let isVisible = service.evaluateVisibilityForField(fakeFormWithField, visibilityObjTest);
expect(isVisible).toBeTruthy(); expect(isVisible).toBeTruthy();
}); });
/* it('should evaluate the visibility for the field between form value and process var', (done) => {
it('should evaluate the visibility for the field between form value and process var', (varReady) => {
service.getTaskProcessVariableModelsForTask(9999).subscribe( service.getTaskProcessVariableModelsForTask(9999).subscribe(
(res: TaskProcessVariableModel[]) => { (res: TaskProcessVariableModel[]) => {
varReady(); let fakeFormWithField = new FormModel(fakeFormJson);
let visibilityObjTest = new WidgetVisibilityModel();
visibilityObjTest.leftFormFieldId = 'LEFT_FORM_FIELD_ID';
visibilityObjTest.operator = '!=';
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
let isVisible = service.evaluateVisibilityForField(fakeFormWithField, visibilityObjTest);
expect(isVisible).toBeTruthy();
done();
} }
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
@ -482,23 +483,27 @@ describe('WidgetVisibilityService', () => {
contentType: 'application/json', contentType: 'application/json',
responseText: JSON.stringify(fakeTaskProcessVariableModels) responseText: JSON.stringify(fakeTaskProcessVariableModels)
}); });
let fakeFormWithField = new FormModel(fakeFormJson); });
let visibilityObjTest = new WidgetVisibilityModel();
visibilityObjTest.leftFormFieldId = 'LEFT_FORM_FIELD_ID';
visibilityObjTest.operator = '!=';
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
let isVisible = service.evaluateVisibilityForField(fakeFormWithField, visibilityObjTest);
expect(isVisible).toBeTruthy(); it('should evaluate visibility with multiple conditions', (done) => {
});
*/
/*
it('should evaluate visibility with multiple conditions', (ready) => {
service.getTaskProcessVariableModelsForTask(9999).subscribe( service.getTaskProcessVariableModelsForTask(9999).subscribe(
(res: TaskProcessVariableModel[]) => { (res: TaskProcessVariableModel[]) => {
ready(); let fakeFormWithField = new FormModel(fakeFormJson);
let visibilityObjTest = new WidgetVisibilityModel();
let chainedVisibilityObj = new WidgetVisibilityModel();
visibilityObjTest.leftFormFieldId = 'LEFT_FORM_FIELD_ID';
visibilityObjTest.operator = '!=';
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
visibilityObjTest.nextConditionOperator = 'and';
chainedVisibilityObj.leftRestResponseId = 'TEST_VAR_2';
chainedVisibilityObj.operator = '!empty';
visibilityObjTest.nextCondition = chainedVisibilityObj;
let isVisible = service.evaluateVisibilityForField(fakeFormWithField, visibilityObjTest);
expect(isVisible).toBeTruthy();
done();
} }
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
@ -506,22 +511,7 @@ describe('WidgetVisibilityService', () => {
contentType: 'application/json', contentType: 'application/json',
responseText: JSON.stringify(fakeTaskProcessVariableModels) responseText: JSON.stringify(fakeTaskProcessVariableModels)
}); });
let fakeFormWithField = new FormModel(fakeFormJson); });
let visibilityObjTest = new WidgetVisibilityModel();
let chainedVisibilityObj = new WidgetVisibilityModel();
visibilityObjTest.leftFormFieldId = 'LEFT_FORM_FIELD_ID';
visibilityObjTest.operator = '!=';
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
visibilityObjTest.nextConditionOperator = 'and';
chainedVisibilityObj.leftRestResponseId = 'TEST_VAR_2';
chainedVisibilityObj.operator = '!empty';
visibilityObjTest.nextCondition = chainedVisibilityObj;
let isVisible = service.evaluateVisibilityForField(fakeFormWithField, visibilityObjTest);
expect(isVisible).toBeTruthy();
});
*/
it('should return true when the visibility condition is not valid', () => { it('should return true when the visibility condition is not valid', () => {
let visibilityObjTest = new WidgetVisibilityModel(); let visibilityObjTest = new WidgetVisibilityModel();
@ -532,7 +522,7 @@ describe('WidgetVisibilityService', () => {
let isVisible = service.getVisiblityForField(formTest, visibilityObjTest); let isVisible = service.getVisiblityForField(formTest, visibilityObjTest);
expect(isVisible).toBeTruthy(); expect(isVisible).toBeTruthy();
}); });
it('should refresh the visibility for a form field object', () => { it('should refresh the visibility for a form field object', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
@ -547,7 +537,7 @@ describe('WidgetVisibilityService', () => {
service.refreshVisibilityForField(fakeFormField); service.refreshVisibilityForField(fakeFormField);
expect(fakeFormField.isVisible).toBeFalsy(); expect(fakeFormField.isVisible).toBeFalsy();
}); });
it('should not change the isVisible if field does not have visibility condition', () => { it('should not change the isVisible if field does not have visibility condition', () => {
let fakeFormWithField = new FormModel(fakeFormJson); let fakeFormWithField = new FormModel(fakeFormJson);
@ -559,5 +549,5 @@ describe('WidgetVisibilityService', () => {
fakeFormField.isVisible = false; fakeFormField.isVisible = false;
service.refreshVisibilityForField(fakeFormField); service.refreshVisibilityForField(fakeFormField);
expect(fakeFormField.isVisible).toBeFalsy(); expect(fakeFormField.isVisible).toBeFalsy();
}); });
}); });

View File

@ -81,7 +81,7 @@ export class WidgetVisibilityService {
private getLeftValue(form: FormModel, visibilityObj: WidgetVisibilityModel) { private getLeftValue(form: FormModel, visibilityObj: WidgetVisibilityModel) {
if ( visibilityObj.leftRestResponseId ) { if ( visibilityObj.leftRestResponseId ) {
return this.getValueFromVariable(form, visibilityObj.leftRestResponseId); return this.getValueFromVariable(form, visibilityObj.leftRestResponseId, this.processVarList);
} }
return this.getValueOField(form, visibilityObj.leftFormFieldId); return this.getValueOField(form, visibilityObj.leftFormFieldId);
} }
@ -89,7 +89,7 @@ export class WidgetVisibilityService {
private getRightValue(form: FormModel, visibilityObj: WidgetVisibilityModel) { private getRightValue(form: FormModel, visibilityObj: WidgetVisibilityModel) {
let valueFound = null; let valueFound = null;
if ( visibilityObj.rightRestResponseId ) { if ( visibilityObj.rightRestResponseId ) {
valueFound = this.getValueFromVariable(form, visibilityObj.rightRestResponseId); valueFound = this.getValueFromVariable(form, visibilityObj.rightRestResponseId, this.processVarList);
}else if ( visibilityObj.rightFormFieldId ) { }else if ( visibilityObj.rightFormFieldId ) {
valueFound = this.getValueOField(form, visibilityObj.rightFormFieldId); valueFound = this.getValueOField(form, visibilityObj.rightFormFieldId);
}else { }else {
@ -116,18 +116,29 @@ export class WidgetVisibilityService {
} }
} }
} }
return null;
} }
private getValueFromVariable(form: FormModel, name: string) { private getValueFromVariable( form: FormModel, name: string, processVarList: TaskProcessVariableModel[] ) {
let formVariable = form.json.variables.find(formVar => formVar.name === name); return this.getFormVariableValue(form, name) ||
if ( !formVariable && this.processVarList ) { this.getProcessVariableValue(name, processVarList);
formVariable = this.processVarList.find(variable => variable.id === name); }
}
if ( formVariable ) { private getFormVariableValue(form: FormModel, name: string ) {
return formVariable.value; if ( form.json.variables) {
} let variableFromForm = form.json.variables.find(formVar => formVar.name === name);
return null; if ( variableFromForm ) {
return variableFromForm ? variableFromForm.value : variableFromForm;
}
}
}
private getProcessVariableValue(name: string, processVarList: TaskProcessVariableModel[]) {
if ( this.processVarList ) {
let variableFromProcess = this.processVarList.find(variable => variable.id === name);
if ( variableFromProcess ) {
return variableFromProcess ? variableFromProcess.value : variableFromProcess;
}
}
} }
private evaluateLogicalOperation(logicOp, previousValue, newValue): boolean { private evaluateLogicalOperation(logicOp, previousValue, newValue): boolean {
@ -168,7 +179,7 @@ export class WidgetVisibilityService {
console.error( 'NO valid operation!' ); console.error( 'NO valid operation!' );
break; break;
} }
return null; return;
} }
getTaskProcessVariableModelsForTask(taskId: string): Observable<TaskProcessVariableModel[]> { getTaskProcessVariableModelsForTask(taskId: string): Observable<TaskProcessVariableModel[]> {