diff options
Diffstat (limited to 'sdc-workflow-designer-server/src')
4 files changed, 87 insertions, 0 deletions
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/IntermediateCatchEvent.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/IntermediateCatchEvent.java new file mode 100644 index 00000000..ae6260c4 --- /dev/null +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/IntermediateCatchEvent.java @@ -0,0 +1,25 @@ +/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the Apache License, Version 2.0
+ * and the Eclipse Public License v1.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
+ */
+package org.onap.sdc.workflowdesigner.model;
+
+public class IntermediateCatchEvent extends Element {
+ private TimerEventDefinition timerEventDefinition;
+
+ public TimerEventDefinition getTimerEventDefinition() {
+ return timerEventDefinition;
+ }
+
+ public void setTimerEventDefinition(TimerEventDefinition timerEventDefinition) {
+ this.timerEventDefinition = timerEventDefinition;
+ }
+
+}
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/TimerEventDefinition.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/TimerEventDefinition.java new file mode 100644 index 00000000..c7b4b829 --- /dev/null +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/TimerEventDefinition.java @@ -0,0 +1,52 @@ +/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the Apache License, Version 2.0
+ * and the Eclipse Public License v1.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
+ */
+package org.onap.sdc.workflowdesigner.model;
+
+public class TimerEventDefinition {
+ private String type;
+ private String timeDuration;
+ private String timeDate;
+ private String timeCycle;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getTimeDuration() {
+ return timeDuration;
+ }
+
+ public void setTimeDuration(String timeDuration) {
+ this.timeDuration = timeDuration;
+ }
+
+ public String getTimeDate() {
+ return timeDate;
+ }
+
+ public void setTimeDate(String timeDate) {
+ this.timeDate = timeDate;
+ }
+
+ public String getTimeCycle() {
+ return timeCycle;
+ }
+
+ public void setTimeCycle(String timeCycle) {
+ this.timeCycle = timeCycle;
+ }
+
+}
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/parser/Bpmn4ToscaJsonParser.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/parser/Bpmn4ToscaJsonParser.java index 390dc0b9..dafe83f4 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/parser/Bpmn4ToscaJsonParser.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/parser/Bpmn4ToscaJsonParser.java @@ -21,6 +21,7 @@ import java.util.List; import org.onap.sdc.workflowdesigner.model.DataObject;
import org.onap.sdc.workflowdesigner.model.Element;
import org.onap.sdc.workflowdesigner.model.EndEvent;
+import org.onap.sdc.workflowdesigner.model.IntermediateCatchEvent;
import org.onap.sdc.workflowdesigner.model.Parameter;
import org.onap.sdc.workflowdesigner.model.Process;
import org.onap.sdc.workflowdesigner.model.SequenceFlow;
@@ -130,6 +131,9 @@ public class Bpmn4ToscaJsonParser { case "endEvent":
element = MAPPER.readValue(jsonObject, EndEvent.class);
break;
+ case "intermediateCatchEvent":
+ element = MAPPER.readValue(jsonObject, IntermediateCatchEvent.class);
+ break;
default:
log.warn("Ignoring node: type '" + nodeType + "' is unkown");
return null;
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml new file mode 100644 index 00000000..ee2365ec --- /dev/null +++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml @@ -0,0 +1,6 @@ +
+<intermediateCatchEvent id="${element.id}" name="${element.name}">
+ <timerEventDefinition>
+ <timeDuration><![CDATA[${element.timerEventDefinition.timeDuration}]]></timeDuration>
+ </timerEventDefinition>
+</intermediateCatchEvent>
|