Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
Permalink
Browse files Browse the repository at this point in the history
JBPM-6415 - Remove jPDL migration plugin and its use from jbpm-design…
…er (#658) (#673)
  • Loading branch information
psiroky authored and Tihomir Surdilovic committed Oct 10, 2017
1 parent 1e011a2 commit a143f3b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 290 deletions.
24 changes: 0 additions & 24 deletions jbpm-designer-backend/pom.xml
Expand Up @@ -143,30 +143,6 @@
<artifactId>jbpm-bpmn2-emfextmodel</artifactId>
</dependency>

<!-- jBPM Migration -->
<dependency>
<groupId>org.jbpm.jbpm5</groupId>
<artifactId>jbpmmigration</artifactId>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Drools -->
<dependency>
<groupId>org.drools</groupId>
Expand Down
Expand Up @@ -79,7 +79,6 @@
import org.jbpm.designer.web.profile.IDiagramProfile;
import org.jbpm.designer.web.profile.IDiagramProfileService;
import org.jbpm.designer.web.profile.impl.JbpmProfileImpl;
import org.jbpm.migration.JbpmMigration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -96,7 +95,6 @@ public class TransformerServlet extends HttpServlet {
private static final String TO_PDF = "pdf";
private static final String TO_PNG = "png";
private static final String TO_SVG = "svg";
private static final String JPDL_TO_BPMN2 = "jpdl2bpmn2";
private static final String BPMN2_TO_JSON = "bpmn2json";
private static final String JSON_TO_BPMN2 = "json2bpmn2";
private static final String HTML_TO_PDF = "html2pdf";
Expand Down Expand Up @@ -281,37 +279,8 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
}
} else if (transformto != null && transformto.equals(TO_SVG)) {
storeInRepository(uuid, formattedSvg, transformto, processid, repository);
} else if (transformto != null && transformto.equals(JPDL_TO_BPMN2)) {
try {
String bpmn2 = JbpmMigration.transform(jpdl);
Definitions def = ((JbpmProfileImpl) profile).getDefinitions(bpmn2);
// add bpmndi info to Definitions with help of gpd
addBpmnDiInfo(def, gpd);
// hack for now
revisitSequenceFlows(def, bpmn2);
// another hack if id == name
revisitNodeNames(def);

// get the xml from Definitions
ResourceSet rSet = new ResourceSetImpl();
rSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpmn2", new JBPMBpmn2ResourceFactoryImpl());
JBPMBpmn2ResourceImpl bpmn2resource = (JBPMBpmn2ResourceImpl) rSet.createResource(URI.createURI("virtual.bpmn2"));
rSet.getResources().add(bpmn2resource);
bpmn2resource.getContents().add(def);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
bpmn2resource.save(outputStream, new HashMap<Object, Object>());
String fullXmlModel = outputStream.toString();
// convert to json and write response
String json = profile.createUnmarshaller().parseModel(fullXmlModel, profile, pp);
resp.setCharacterEncoding("UTF-8");
resp.setContentType("application/json");
resp.getWriter().print(json);
} catch(Exception e) {
_logger.error(e.getMessage());
resp.setContentType("application/json");
resp.getWriter().print("{}");
}
} else if (transformto != null && transformto.equals(BPMN2_TO_JSON)) {
} else if (transformto != null && transformto.equals(BPMN2_TO_JSON)) {
try {
if(convertServiceTasks != null && convertServiceTasks.equals("true")) {
bpmn2in = bpmn2in.replaceAll("drools:taskName=\".*?\"", "drools:taskName=\"ReadOnlyService\"");
Expand Down
1 change: 0 additions & 1 deletion jbpm-designer-client/pom.xml
Expand Up @@ -348,7 +348,6 @@
<include>${project.build.directory}/classes/org/jbpm/designer/public/js/Plugins/selectssperspective-min.js</include>
<include>${project.build.directory}/classes/org/jbpm/designer/public/js/Plugins/toolbar-min.js</include>
<include>${project.build.directory}/classes/org/jbpm/designer/public/js/Plugins/processinfo-min.js</include>
<include>${project.build.directory}/classes/org/jbpm/designer/public/js/Plugins/jpdlmigration-min.js</include>
<include>${project.build.directory}/classes/org/jbpm/designer/public/js/Plugins/servicerepo-min.js</include>
<include>${project.build.directory}/classes/org/jbpm/designer/public/js/Plugins/saveplugin-min.js</include>
<include>${project.build.directory}/classes/org/jbpm/designer/public/js/Plugins/shapemenu-min.js</include>
Expand Down

This file was deleted.

Expand Up @@ -34,8 +34,7 @@
<requires namespace="http://b3mn.org/stencilset/bpmn1.1#" />
<!-- plugin loads dynamically the needed extension <requires namespace="http://oryx-editor.org/stencilsets/extensions/jbpm#"/> -->
</plugin>

<plugin source="jpdlmigration.js" name="ORYX.Plugins.JPDLMigration"/>

<plugin source="servicerepo.js" name="ORYX.Plugins.ServiceRepoIntegration"/>

<!-- User Interface Aggregation -->
Expand Down
Expand Up @@ -4,7 +4,6 @@
<profile name="jbpm" stencilset="bpmn2.0jbpm">
<plugin name="ORYX.Plugins.SelectStencilSetPerspective"/>
<plugin name="ORYX.Plugins.Toolbar"/>
<plugin name="ORYX.Plugins.JPDLMigration"/>
<plugin name="ORYX.Plugins.ServiceRepoIntegration"/>
<plugin name="ORYX.Plugins.SavePlugin"/>
<plugin name="ORYX.Plugins.ShapeMenuPlugin"/>
Expand Down

0 comments on commit a143f3b

Please sign in to comment.