diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2017-08-31 14:29:07 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2017-08-31 14:29:07 +0800 |
commit | 626d74e4c51aa47da5d5d643b5b7a04188b5552a (patch) | |
tree | 8d074a6928b71950cfbe69261bfa156ceaea3d07 /sdc-workflow-designer-ui/src/app/model | |
parent | 97e19323bd1e9ee44a02173a5ba05d13219c4082 (diff) |
support set parameter for workflow
support set input and output params for start event
Issue-ID: SDC-120
Change-Id: Ib5a87692e06817b2676b3f2f2223e1ced117b5c9
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/model')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/value-source.enum.ts | 17 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/value-type.enum.ts | 17 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts | 15 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts | 22 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts | 20 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/position.ts (renamed from sdc-workflow-designer-ui/src/app/model/workflow-node.ts) | 7 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts | 16 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts | 17 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts | 17 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts (renamed from sdc-workflow-designer-ui/src/app/model/workflow.ts) | 0 |
10 files changed, 145 insertions, 3 deletions
diff --git a/sdc-workflow-designer-ui/src/app/model/value-source.enum.ts b/sdc-workflow-designer-ui/src/app/model/value-source.enum.ts new file mode 100644 index 00000000..4a9ca78a --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/value-source.enum.ts @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + *******************************************************************************/ + +export enum ValueSource { + String, + Plan, + // Topology, // TODO implement Topology properties in R2 +} diff --git a/sdc-workflow-designer-ui/src/app/model/value-type.enum.ts b/sdc-workflow-designer-ui/src/app/model/value-type.enum.ts new file mode 100644 index 00000000..ab6d07b8 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/value-type.enum.ts @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + *******************************************************************************/ + +export enum ValueType { + String, + Number, + Date, +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts b/sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts new file mode 100644 index 00000000..300af898 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts @@ -0,0 +1,15 @@ +import {WorkflowNode} from './workflow-node'; +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ + +export class EndEvent extends WorkflowNode { +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts b/sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts new file mode 100644 index 00000000..994b3b67 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + *******************************************************************************/ + +export enum NodeType { + startEvent, + endEvent, + toscaNodeManagementTask, + restTask, + exclusiveGateway, + parallelGateway, + subProcess, + intermediateCatchEvent, +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts b/sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts new file mode 100644 index 00000000..cc87a6fa --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ + +import { ValueSource } from '../value-source.enum'; +import { ValueType } from '../value-type.enum'; + +export class Parameter { + constructor(public name: string, public value: string, public valueSource: string, + public type: string = ValueType[ValueType.String]) { + } +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow-node.ts b/sdc-workflow-designer-ui/src/app/model/workflow/position.ts index 21f366fa..b690f4d6 100644 --- a/sdc-workflow-designer-ui/src/app/model/workflow-node.ts +++ b/sdc-workflow-designer-ui/src/app/model/workflow/position.ts @@ -13,8 +13,9 @@ import { Injectable } from '@angular/core';
/**
- * WorkflowNode
+ * Position
+ * Workflow node position
*/
-export class WorkflowNode {
- constructor(public id: string, public name: string, public type: string, public top: number, public left: number) {}
+export class Position {
+ constructor(public top: number, public left: number, public width?: number, public height?: number) { }
}
diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts b/sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts new file mode 100644 index 00000000..492cc84d --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ + +export class SequenceFlow { + + constructor(public sourceRef: string, public targetRef: string, public name?: string, public condition?:string) { } +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts b/sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts new file mode 100644 index 00000000..d609f7ca --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +import { Parameter } from './parameter'; +import { WorkflowNode } from './workflow-node'; + +export class StartEvent extends WorkflowNode { + public parameters: Parameter[] = []; +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts b/sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts new file mode 100644 index 00000000..9e54be13 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +import { Position } from './position'; +import { SequenceFlow } from './sequence-flow'; + +export class WorkflowNode { + public constructor(public id: string, public name: string, public type: string, public position: Position, public sequenceFlows: SequenceFlow[]) {} +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow.ts b/sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts index 672396cf..672396cf 100644 --- a/sdc-workflow-designer-ui/src/app/model/workflow.ts +++ b/sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts |