diff options
Diffstat (limited to 'sdc-workflow-designer-server/src')
5 files changed, 72 insertions, 0 deletions
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ErrorEndEvent.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ErrorEndEvent.java new file mode 100644 index 00000000..4ab9fd3a --- /dev/null +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ErrorEndEvent.java @@ -0,0 +1,28 @@ +/** + * 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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ErrorEndEvent extends Element { + @JsonProperty("parameter") + private Parameter parameter; + + public Parameter getParameter() { + return parameter; + } + + public void setParameter(Parameter parameter) { + this.parameter = parameter; + } + +} diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ErrorStartEvent.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ErrorStartEvent.java new file mode 100644 index 00000000..8e4fcd44 --- /dev/null +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ErrorStartEvent.java @@ -0,0 +1,28 @@ +/** + * 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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ErrorStartEvent extends Element { + @JsonProperty("parameter") + private Parameter parameter; + + public Parameter getParameter() { + return parameter; + } + + public void setParameter(Parameter parameter) { + this.parameter = parameter; + } + +} 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 4041a9ae..1b3a8779 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 @@ -23,6 +23,8 @@ import java.util.Map; 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.ErrorEndEvent;
+import org.onap.sdc.workflowdesigner.model.ErrorStartEvent;
import org.onap.sdc.workflowdesigner.model.ExclusiveGateway;
import org.onap.sdc.workflowdesigner.model.IntermediateCatchEvent;
import org.onap.sdc.workflowdesigner.model.ParallelGateway;
@@ -163,6 +165,12 @@ public class Bpmn4ToscaJsonParser { case "endEvent":
element = MAPPER.readValue(jsonObject, EndEvent.class);
break;
+ case "errorStartEvent":
+ element = MAPPER.readValue(jsonObject, ErrorStartEvent.class);
+ break;
+ case "errorEndEvent":
+ element = MAPPER.readValue(jsonObject, ErrorEndEvent.class);
+ break;
case "intermediateCatchEvent":
element = MAPPER.readValue(jsonObject, IntermediateCatchEvent.class);
break;
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml new file mode 100644 index 00000000..aef14d92 --- /dev/null +++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml @@ -0,0 +1,4 @@ + +<endEvent id="${element.id}" name="${element.name}"> + <errorEventDefinition errorRef="${element.parameter.value}" /> +</endEvent> diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml new file mode 100644 index 00000000..56b08479 --- /dev/null +++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml @@ -0,0 +1,4 @@ + +<startEvent id="${element.id}" name="${element.name}"> + <errorEventDefinition errorRef="${element.parameter.value}" /> +</startEvent> |