Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
Issue #823
  • Loading branch information
rsoika committed Sep 1, 2024
1 parent 0760741 commit e9447a9
Show file tree
Hide file tree
Showing 39 changed files with 840 additions and 1,420 deletions.
725 changes: 656 additions & 69 deletions imixs-workflow-core/src/main/java/org/imixs/workflow/ModelManager.java

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import java.security.Principal;

import org.imixs.workflow.bpmn.OpenBPMNModelManager;
import org.imixs.workflow.exceptions.PluginException;
import org.mockito.Mockito;

Expand All @@ -19,15 +18,15 @@
*/
public class MockWorkflowContext implements WorkflowContext {
private final SessionContext ctx;
private OpenBPMNModelManager openBPMNModelManager;
private ModelManager openBPMNModelManager;

/**
* Constructor creates a Mock Environment
*
* @throws PluginException
*/
public MockWorkflowContext() {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
ctx = Mockito.mock(SessionContext.class);
setupSessionContext();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.imixs.workflow;

import org.imixs.workflow.bpmn.OpenBPMNModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
import org.junit.Assert;
Expand Down Expand Up @@ -62,7 +61,7 @@ public WorkflowKernel getWorkflowKernel() {
return workflowKernel;
}

public OpenBPMNModelManager getOpenBPMNModelManager() {
return (OpenBPMNModelManager) workflowContext.getModelManager();
public ModelManager getOpenBPMNModelManager() {
return (ModelManager) workflowContext.getModelManager();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -25,11 +26,11 @@
public class TestBPMNModelBasic {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
try {
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/simple.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.List;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -20,11 +21,11 @@
public class TestBPMNModelInitEvents {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
try {
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/startevent_followup.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -24,11 +25,11 @@
public class TestBPMNParserAdapter {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -29,11 +30,11 @@
*/
public class TestBPMNParserAsyncEvent {
BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
try {
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/asyncEventSimple.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -25,11 +26,11 @@
*/
public class TestBPMNParserCollaboration {
BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
try {
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/collaboration.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -29,11 +30,11 @@
public class TestBPMNParserCollaborationMessageFlow {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -28,11 +29,11 @@
public class TestBPMNParserCollaborationMinutes {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
try {
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/minutes.bpmn"));
} catch (ModelException | BPMNModelException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -28,12 +29,12 @@
*/
public class TestBPMNParserDataObject {
BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
try {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/dataobject_example1.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Assert.assertNotNull(model);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -24,11 +25,11 @@
*/
public class TestBPMNParserGroups {
BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -24,11 +25,11 @@
*/
public class TestBPMNParserMessageText {
BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -25,11 +26,11 @@
public class TestBPMNParserSharedEvent {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -26,11 +27,11 @@
public class TestBPMNParserSharedLinkEvent {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -28,11 +29,11 @@
*/
public class TestBPMNParserTaskAnnotation {
BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
try {
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/annotation_example.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -25,12 +26,12 @@
public class TestBPMNParserTicket {

BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
try {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/ticket.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Assert.assertNotNull(model);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.xml.parsers.ParserConfigurationException;

import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ModelManager;
import org.imixs.workflow.exceptions.ModelException;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -24,11 +25,11 @@
*/
public class TestBPMNProperties {
BPMNModel model = null;
OpenBPMNModelManager openBPMNModelManager = null;
ModelManager openBPMNModelManager = null;

@Before
public void setup() throws ParseException, ParserConfigurationException, SAXException, IOException {
openBPMNModelManager = new OpenBPMNModelManager();
openBPMNModelManager = new ModelManager();
try {
openBPMNModelManager.addModel(BPMNModelFactory.read("/bpmn/properties.bpmn"));
model = openBPMNModelManager.getModel("1.0.0");
Expand Down
Loading

0 comments on commit e9447a9

Please sign in to comment.