aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/model/workflow
diff options
context:
space:
mode:
authorLvbo163 <lv.bo163@zte.com.cn>2017-08-31 14:29:07 +0800
committerLvbo163 <lv.bo163@zte.com.cn>2017-08-31 14:29:07 +0800
commit626d74e4c51aa47da5d5d643b5b7a04188b5552a (patch)
tree8d074a6928b71950cfbe69261bfa156ceaea3d07 /sdc-workflow-designer-ui/src/app/model/workflow
parent97e19323bd1e9ee44a02173a5ba05d13219c4082 (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/workflow')
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts15
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts22
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts20
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/position.ts21
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts16
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts17
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts17
-rw-r--r--sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts21
8 files changed, 149 insertions, 0 deletions
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/position.ts b/sdc-workflow-designer-ui/src/app/model/workflow/position.ts
new file mode 100644
index 00000000..b690f4d6
--- /dev/null
+++ b/sdc-workflow-designer-ui/src/app/model/workflow/position.ts
@@ -0,0 +1,21 @@
+/**
+ * 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 { Injectable } from '@angular/core';
+
+/**
+ * Position
+ * Workflow node position
+ */
+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/workflow.ts b/sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts
new file mode 100644
index 00000000..672396cf
--- /dev/null
+++ b/sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts
@@ -0,0 +1,21 @@
+/**
+ * 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 { Injectable } from '@angular/core';
+import { WorkflowNode } from "./workflow-node";
+
+/**
+ * Workflow
+ */
+export class Workflow {
+ constructor(public id: string, public name: string, public nodes: WorkflowNode[]) {}
+}