Author: Grid.Qian
Date: 2008-10-16 03:13:49 -0400 (Thu, 16 Oct 2008)
New Revision: 10867
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
Log:
JBIDE-2901: fix the issue: not correctly generate jpdl files when multi-pools in a bpmn
diagram
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java 2008-10-16
06:02:13 UTC (rev 10866)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java 2008-10-16
07:13:49 UTC (rev 10867)
@@ -242,4 +242,12 @@
}
+ public List<Document> getGpdDefs() {
+ return gpdDefs;
+ }
+
+ public void setGpdDefs(List<Document> gpdDefs) {
+ this.gpdDefs = gpdDefs;
+ }
+
}
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2008-10-16
06:02:13 UTC (rev 10866)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2008-10-16
07:13:49 UTC (rev 10867)
@@ -35,20 +35,22 @@
private List<String> strForProcessList = new ArrayList<String>();
private List<String> strForGpdList = new ArrayList<String>();
private List<String> generatedFoldersList = new ArrayList<String>();
+ private List<String> generatedGpdFoldersList = new ArrayList<String>();
public void createGeneratedFile(boolean isOverWrite) {
String[] jpdlFolderNames = new String[this.generatedFoldersList.size()];
- int i = 0;
- for (String name : this.generatedFoldersList) {
- jpdlFolderNames[i] = name;
- i++;
- }
-
String location = super.getContainerPath((IContainer) super
.getTargetLocationSelection().getFirstElement());
+ int i = 0;
if (this.strForProcessList.size() > 0) {
+ // get a jpdl folders array from jpdl folder list
+ for (String name : this.generatedFoldersList) {
+ jpdlFolderNames[i] = name;
+ i++;
+ }
+
i = 0;
String[] strs = new String[strForProcessList.size()];
for (String pro : this.strForProcessList) {
@@ -66,6 +68,12 @@
if (this.strForGpdList.size() > 0) {
i = 0;
+ // get a gpd folders array from gpd folder list
+ for (String name : this.generatedGpdFoldersList) {
+ jpdlFolderNames[i] = name;
+ i++;
+ }
+ i = 0;
String[] strs = new String[strForGpdList.size()];
for (String pro : this.strForGpdList) {
strs[i] = pro;
@@ -105,6 +113,8 @@
warningList.addAll(translator.getWarnings());
errorList.addAll(translator.getErrors());
+
+
// generate jpdl gpd file from *.bpmn_diagram
Document bpmnDiagramDocument = null;
@@ -120,7 +130,11 @@
bpmnFileName);
this.setStrForGpdList(Arrays.asList(generator.translateToStrings()));
-
+
+ for (Document def : generator.getGpdDefs()) {
+ this.generatedGpdFoldersList.add(def.getRootElement().attributeValue(B2JMessages.Dom_Element_Name));
+ }
+
warningList.addAll(generator.getWarnings());
errorList.addAll(generator.getErrors());
Show replies by date