Skip to content

Commit

Permalink
fixed - introduced constant
Browse files Browse the repository at this point in the history
Issue imixs#166
  • Loading branch information
rsoika committed Feb 5, 2023
1 parent 078962f commit f04453b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,12 @@
* implementation is identified via its diagram type.
*/
public class BPMNDiagramConfiguration extends BaseDiagramConfiguration {

public static String DIAGRAM_TYPE = "bpmn-diagram";

@Inject
protected Set<BPMNExtension> extensions;

/**
* Returns the diagram type of the diagram implementation that corresponds to
* this configuration.
*
* @return The diagram type.
*/
@Override
public String getDiagramType() {
return "BPMN 2.0";
}

/**
* Returns the type mappings for the diagram implementation. Type mappings are
* used by GSON to construct the correct {@link EClass} based on the "type"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ protected Class<? extends CommandPaletteActionProvider> bindCommandPaletteAction

@Override
public String getDiagramType() {
return "bpmn-diagram";
// return "bpmn-diagram";
return BPMNDiagramConfiguration.DIAGRAM_TYPE;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.openbpmn.bpmn.BPMNModel;
import org.openbpmn.bpmn.exceptions.BPMNModelException;
import org.openbpmn.bpmn.util.BPMNModelFactory;
import org.openbpmn.glsp.BPMNDiagramConfiguration;

import com.google.inject.Inject;

Expand Down Expand Up @@ -61,7 +62,7 @@ public void loadSourceModel(final RequestModelAction action) {
boolean bNeedsClientLayout = Boolean.parseBoolean(options.get("needsClientLayout"));
String uri = options.get("uri");
String diagramType = options.get("diagramType");
if (bNeedsClientLayout && uri != null && "bpmn-diagram".equals(diagramType)) {
if (bNeedsClientLayout && uri != null && BPMNDiagramConfiguration.DIAGRAM_TYPE.equals(diagramType)) {
final File file = convertToFile(modelState);
BPMNModel model;
try {
Expand Down

0 comments on commit f04453b

Please sign in to comment.