#1432 - Added new system outcome : Start Process (#1453)

* #1432 - Added system outcome for start process

* 1432 - improved condition for system outcome check

* #1432 - fix test for start process system outcome
This commit is contained in:
Vito
2017-01-13 04:46:40 -08:00
committed by Mario Romano
parent 0fa87bb17d
commit fcdc628d35
5 changed files with 43 additions and 6 deletions

View File

@@ -15,7 +15,17 @@
* limitations under the License.
*/
import { Component, AfterViewChecked, OnChanges, SimpleChanges, Input, ViewChild, ElementRef, Output, EventEmitter } from '@angular/core';
import {
Component,
AfterViewChecked,
OnChanges,
SimpleChanges,
Input,
ViewChild,
ElementRef,
Output,
EventEmitter
} from '@angular/core';
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
import { ActivitiForm } from './activiti-form.component';
import { FormService } from './../services/form.service';
@@ -124,8 +134,11 @@ export class ActivitiStartForm extends ActivitiForm implements AfterViewChecked,
/** @override */
isOutcomeButtonVisible(outcome: FormOutcomeModel): boolean {
if (outcome && outcome.name === FormOutcomeModel.SAVE_ACTION) {
if (outcome && outcome.isSystem && ( outcome.name === FormOutcomeModel.SAVE_ACTION ||
outcome.name === FormOutcomeModel.COMPLETE_ACTION )) {
return false;
} else if (outcome && outcome.name === FormOutcomeModel.START_PROCESS_ACTION) {
return true;
}
return super.isOutcomeButtonVisible(outcome);
}