Skip to content

Commit 002f809

Browse files
committed
fixed typo in method name (Issue #406)
1 parent 5321375 commit 002f809

35 files changed

Lines changed: 146 additions & 138 deletions

open-bpmn.glsp-server/src/main/java/org/openbpmn/glsp/elements/CreateBPMNNodeOperationHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public CreateBPMNNodeOperationHandler(final List<String> handledElementTypeIds)
7777
protected BPMNProcess findProcessByCreateNodeOperation(final CreateNodeOperation operation)
7878
throws BPMNInvalidTypeException {
7979
if (!modelState.getBpmnModel().isCollaborationDiagram()) {
80-
return modelState.getBpmnModel().openDefaultProces();
80+
return modelState.getBpmnModel().openDefaultProcess();
8181
}
8282
GPoint dropPoint = operation.getLocation().orElse(null);
8383

open-bpmn.glsp-server/src/main/java/org/openbpmn/glsp/model/BPMNGModelFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public GGraph buildGGraph(final BPMNModel model) {
219219
List<GModelElement> gRootNodeList = new ArrayList<>();
220220
Map<String, PoolGNode> poolGNodeList = new HashMap<String, PoolGNode>();
221221

222-
BPMNProcess defaultProcess = model.openDefaultProces();
222+
BPMNProcess defaultProcess = model.openDefaultProcess();
223223
try {
224224
// In case we have collaboration diagram we iterate over all participants and
225225
// create a pool if the contained process is private. Otherwise we create the
@@ -259,7 +259,7 @@ public GGraph buildGGraph(final BPMNModel model) {
259259
} else {
260260
// We have a simple 'Process Diagram' type - build the GModel from default
261261
// process
262-
BPMNProcess bpmnProcess = model.openDefaultProces();
262+
BPMNProcess bpmnProcess = model.openDefaultProcess();
263263
gRootNodeList.addAll(computeGModelElements(bpmnProcess, null, gRootNodeList));
264264
}
265265

open-bpmn.glsp-server/src/main/java/org/openbpmn/glsp/operations/BPMNPropertiesApplyOperationHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private void executeOperation(final BPMNPropertiesApplyOperation operation) {
9696
// is the root element selected?
9797
if (modelState.getRoot().getId().equals(elementID)) {
9898
gModelElement = modelState.getRoot();
99-
bpmnElement = modelState.getBpmnModel().openDefaultProces();
99+
bpmnElement = modelState.getBpmnModel().openDefaultProcess();
100100
} else {
101101
// find the corresponding gModelElement and bpmnElement....
102102
gModelElement = modelState.getIndex().get(elementID).orElse(null);

open-bpmn.glsp-server/src/main/java/org/openbpmn/glsp/utils/BPMNGModelUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public static BPMNProcess findProcessByContainer(final BPMNGModelState modelStat
252252
BPMNProcess bpmnProcess = null;
253253
// is it the root?
254254
if (modelState.getRoot().getId().equals(containerId)) {
255-
bpmnProcess = modelState.getBpmnModel().openDefaultProces();
255+
bpmnProcess = modelState.getBpmnModel().openDefaultProcess();
256256
} else {
257257
// it should be a participant container
258258
if (containerId.startsWith("participant_")) {
@@ -280,7 +280,7 @@ public static BPMNProcess findProcessByContainer(final BPMNGModelState modelStat
280280
public static BPMNProcess findProcessByPoint(final BPMNGModelState modelState, final GPoint dropPoint)
281281
throws BPMNInvalidTypeException {
282282
if (!modelState.getBpmnModel().isCollaborationDiagram() || dropPoint == null) {
283-
return modelState.getBpmnModel().openDefaultProces();
283+
return modelState.getBpmnModel().openDefaultProcess();
284284
}
285285
Participant participant = modelState.getBpmnModel()
286286
.findParticipantByPoint(BPMNGModelUtil.createBPMNPoint(dropPoint));
@@ -289,7 +289,7 @@ public static BPMNProcess findProcessByPoint(final BPMNGModelState modelState, f
289289
return participant.getBpmnProcess();
290290
} else {
291291
// default to the default process
292-
return modelState.getBpmnModel().openDefaultProces();
292+
return modelState.getBpmnModel().openDefaultProcess();
293293
}
294294
}
295295

open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/BPMNModel.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ public BPMNProcess openProcess(String id) throws BPMNModelException {
765765
* elements of the Process. The default process always exists and is not
766766
* embedded in a Pool.
767767
*/
768-
public BPMNProcess openDefaultProces() {
768+
public BPMNProcess openDefaultProcess() {
769769
try {
770770
return openProcess(null);
771771
} catch (BPMNModelException e) {
@@ -986,7 +986,7 @@ public Message addMessage(String id, String name) throws BPMNModelException {
986986

987987
this.definitions.insertBefore(bpmnElement, this.getBpmnDiagram());
988988

989-
Message message = new Message(this, bpmnElement, BPMNTypes.MESSAGE, this.openDefaultProces());
989+
Message message = new Message(this, bpmnElement, BPMNTypes.MESSAGE, this.openDefaultProcess());
990990
getMessages().add(message);
991991

992992
return message;
@@ -1385,7 +1385,7 @@ public BPMNBounds findBPMNBoundsById(String id) {
13851385
}
13861386
} else {
13871387
// just analyze the default process
1388-
BPMNElementNode baseElement = openDefaultProces().findElementNodeById(id);
1388+
BPMNElementNode baseElement = openDefaultProcess().findElementNodeById(id);
13891389
if (baseElement != null) {
13901390
return baseElement.getBounds();
13911391
}
@@ -1434,7 +1434,7 @@ public Participant findParticipantByPoint(BPMNPoint point) throws BPMNInvalidTyp
14341434
}
14351435
}
14361436
// no participant - return the default Participant
1437-
Participant defaultParticipant = findParticipantByProcessId(this.openDefaultProces().getId());
1437+
Participant defaultParticipant = findParticipantByProcessId(this.openDefaultProcess().getId());
14381438
return defaultParticipant;
14391439
}
14401440

@@ -2137,7 +2137,7 @@ private void loadMessageList() throws BPMNModelException {
21372137
if (messageNodeList != null && messageNodeList.getLength() > 0) {
21382138
for (int i = 0; i < messageNodeList.getLength(); i++) {
21392139
Element item = (Element) messageNodeList.item(i);
2140-
Message message = new Message(this, item, BPMNTypes.MESSAGE, this.openDefaultProces());
2140+
Message message = new Message(this, item, BPMNTypes.MESSAGE, this.openDefaultProcess());
21412141
messages.add(message);
21422142
}
21432143
}

open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/BPMNTypes.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public class BPMNTypes {
3434
public static final String MANUAL_TASK = "manualTask";
3535
public static final String BUSINESSRULE_TASK = "businessRuleTask";
3636
public static final String RECEIVE_TASK = "receiveTask";
37+
public static final String SUB_PROCESS = "subProcess";
38+
public static final String ADHOC_SUB_PROCESS = "adHocSubProcess";
39+
public static final String TRANSACTION = "transaction";
40+
public static final String CALL_ACTIVITY = "callActivity";
3741

3842
// Events
3943
public static final String EVENT = "event";
@@ -104,7 +108,11 @@ public class BPMNTypes {
104108
BPMNTypes.SERVICE_TASK, //
105109
BPMNTypes.SEND_TASK, //
106110
BPMNTypes.RECEIVE_TASK, //
107-
"subProcess", "adHocSubProcess", "transaction", "callActivity" });
111+
BPMNTypes.SUB_PROCESS, //
112+
BPMNTypes.ADHOC_SUB_PROCESS, //
113+
BPMNTypes.TRANSACTION, //
114+
BPMNTypes.CALL_ACTIVITY
115+
});
108116

109117
public final static List<String> BPMN_EVENTS = Arrays.asList(new String[] { //
110118
BPMNTypes.EVENT, //

open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/elements/core/BPMNElementNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public void updateContainment() {
214214

215215
// first test if the participant need to be updated...
216216
Set<Participant> participants = this.model.getParticipants();
217-
BPMNProcess newProcess = this.model.openDefaultProces(); // default process
217+
BPMNProcess newProcess = this.model.openDefaultProcess(); // default process
218218
for (Participant participant : participants) {
219219
if (participant.bounds == null) {
220220
continue; // no bounds!

open-bpmn.metamodel/src/test/java/org/openbpmn/dom/TestCreateDom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void testCreateEmptyModel() throws BPMNModelException {
2323
logger.info("...creating new empty model");
2424

2525
BPMNModel model1 = BPMNModelFactory.createInstance("demo", "1.0.0", "http://org.openbpmn");
26-
model1.openDefaultProces().addTask("task-1", "Task", BPMNTypes.TASK);
26+
model1.openDefaultProcess().addTask("task-1", "Task", BPMNTypes.TASK);
2727

2828
model1.save("src/test/resources/output/process_1-empty-1.bpmn");
2929
logger.info("...model creation sucessful");

open-bpmn.metamodel/src/test/java/org/openbpmn/dom/TestModifyDom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void testModifiyEmptyModel() {
2929
model = BPMNModelFactory.read("/process_1-empty-1.bpmn");
3030

3131
// add a new task....
32-
model.openDefaultProces().addTask("task-2", "Task", BPMNTypes.TASK);
32+
model.openDefaultProcess().addTask("task-2", "Task", BPMNTypes.TASK);
3333
// store the model
3434
model.save("src/test/resources/output/process_1-update-1.bpmn");
3535
} catch (BPMNModelException e) {

open-bpmn.metamodel/src/test/java/org/openbpmn/dom/TestNameSpaces.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void testProcessExample01() throws BPMNModelException {
9191
// next validate the BPMN Default Namespaces
9292
assertEquals("http://www.omg.org/spec/BPMN/20100524/MODEL", model.getUri(BPMNNS.BPMN2));
9393

94-
BPMNProcess process = model.openDefaultProces();
94+
BPMNProcess process = model.openDefaultProcess();
9595
assertNotNull(process);
9696
assertEquals(2, process.getEvents().size()); // we expect 2 events (start and end event)
9797

@@ -100,7 +100,7 @@ public void testProcessExample01() throws BPMNModelException {
100100
// Now if we add a new task element to this model the xml namespace should be
101101
// created without a prefix
102102
// 'task' and not 'bpmn2:task'
103-
model.openDefaultProces().addTask("task-example-002", "Example Task 002", BPMNTypes.TASK);
103+
model.openDefaultProcess().addTask("task-example-002", "Example Task 002", BPMNTypes.TASK);
104104

105105
model.save(out);
106106
logger.info("...model update successful: " + out);
@@ -119,7 +119,7 @@ public void testProcessExample02() throws BPMNModelException {
119119

120120
BPMNModel model = BPMNModelFactory.read("/process_1_custom_namespace-2.bpmn");
121121

122-
BPMNProcess process = model.openDefaultProces();
122+
BPMNProcess process = model.openDefaultProcess();
123123

124124
assertNotNull(process);
125125

0 commit comments

Comments
 (0)