1 /*******************************************************************************
 
   2  * Copyright (c) 2017 ZTE Corporation.
 
   3  * All rights reserved. This program and the accompanying materials
 
   4  * are made available under the terms of the Eclipse Public License v1.0
 
   5  * and the Apache License 2.0 which both accompany this distribution,
 
   6  * and are available at http://www.eclipse.org/legal/epl-v10.html
 
   7  * and http://www.apache.org/licenses/LICENSE-2.0
 
  10  *     ZTE - initial API and implementation and/or initial documentation
 
  11  *******************************************************************************/
 
  12 import { Component, Input, ViewChild } from '@angular/core';
 
  13 import { Subscription } from 'rxjs/Subscription';
 
  15 import { ValueSource } from '../../../model/value-source.enum';
 
  16 import { Parameter } from '../../../model/workflow/parameter';
 
  17 import { StartEvent } from '../../../model/workflow/start-event';
 
  18 import { BroadcastService } from '../../../services/broadcast.service';
 
  21     selector: 'b4t-start-event-parameters',
 
  22     templateUrl: 'start-event-parameters.component.html',
 
  24 export class StartEventParametersComponent {
 
  25     @Input() public node: StartEvent;
 
  26     public sources: ValueSource[] = [ValueSource.String];
 
  28     public create(): void {
 
  29         this.node.parameters.push(new Parameter('', '', ValueSource[ValueSource.String]));
 
  32     public delete(index: number): void {
 
  33         this.node.parameters.splice(index, 1);