aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-server/src')
-rw-r--r--sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/converter/Bpmn4Tosca2Bpmn.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/converter/Bpmn4Tosca2Bpmn.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/converter/Bpmn4Tosca2Bpmn.java
new file mode 100644
index 00000000..e7d48ace
--- /dev/null
+++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/converter/Bpmn4Tosca2Bpmn.java
@@ -0,0 +1,50 @@
+/**
+ * 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
+ */
+package org.onap.sdc.workflowdesigner.converter;
+
+import java.io.IOException;
+import java.net.URI;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardOpenOption;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Bpmn4Tosca2Bpmn {
+
+ private static Logger log = LoggerFactory.getLogger(Bpmn4Tosca2Bpmn.class);
+
+ /**
+ * Transforms the given BPMN4Tosca Json management into a bpmn plan that can
+ * be excuted by activiti.
+ * <p>
+ *
+ * @param srcBpmn4ToscaJsonFile
+ * @param targetBpmnArchive
+ */
+ public void transform(URI srcBpmn4ToscaJsonFile, URI targetBpmnArchive) {
+ log.info("transform start");
+
+ // parse json object
+
+ // transform bpmn template
+
+ // write bpmn to file
+ log.info("transform end");
+ }
+
+ public static Path writeStringToFile(String content, Path targetPath) throws IOException {
+ return Files.write(targetPath, content.getBytes(), StandardOpenOption.CREATE_NEW);
+ }
+
+}