diff --git a/OnlineSchuhDemo/dsl_matching/MatchingTestcollectionOld.bpmn-testgen b/OnlineSchuhDemo/dsl_matching/MatchingTestcollectionOld.bpmn-testgen
index 573d0905a7227d2d6dcfc94565f5346c053e65dc..e914ed3839c3c70ab71df1f1e654f86cb738f307 100644
--- a/OnlineSchuhDemo/dsl_matching/MatchingTestcollectionOld.bpmn-testgen
+++ b/OnlineSchuhDemo/dsl_matching/MatchingTestcollectionOld.bpmn-testgen
@@ -96,7 +96,7 @@ ExternalTopic customer ;
 ExternalTopic financial ;
 
 Flow Flow_0 for process
-with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , New_Task_1 , Flow_New_1 , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+with elements : [ Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , New_Task_1 , Flow_New_1 , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
 without elements : [ Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , New_Task_2 , New_Flow_2 , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
 Flow Flow_1 for process
 with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , New_Task_1 , Flow_New_1 , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
diff --git a/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/MatchingTestcollectionOld.java b/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/MatchingTestcollectionOld.java
index c4f1a978faa718fe8a0f2c403380dcf79e1c1819..d12572e23371f2aa42a9b3b402f4705c38ff8046 100644
--- a/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/MatchingTestcollectionOld.java
+++ b/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/MatchingTestcollectionOld.java
@@ -1,884 +1,874 @@
-package de.sample.onlineschuhdemo;
-
-import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.*;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.complete;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.runtimeService;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.task;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.withVariables;
-import static org.assertj.core.api.Assertions.entry;
-import static de.sample.onlineschuhdemo.TestUtils.*;
-
-import org.apache.ibatis.logging.LogFactory;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.camunda.bpm.engine.test.Deployment;
-import org.camunda.bpm.engine.test.ProcessEngineRule;
-import org.camunda.bpm.engine.externaltask.LockedExternalTask;
-import org.camunda.bpm.engine.test.mock.Mocks;
-import de.sample.onlineschuhdemo.externalaccess.LagerService;
-import de.sample.onlineschuhdemo.externalaccess.WarennummerErmittelnDelegate;
-import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import java.util.List;
-import java.util.Map;
-
-public class MatchingTestcollectionOld {
-
-	@ClassRule
-	@Rule
-	public static ProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();
-
-	private static final String VAR_KUNDENNUMMER = "kundennummer";
-	private static final String VAR_MARKE = "marke";
-	private static final String VAR_IBAN = "iban";
-	private static final String VAR_VORNAME = "vorname";
-	private static final String VAR_NACHNAME = "nachname";
-	private static final String VAR_PAKETTYP = "pakettyp";
-	private static final String VAR_EMAILGESENDET = "emailGesendet";
-	private static final String VAR_FIRSTNAME = "firstname";
-	private static final String VAR_LASTNAME = "lastname";
-	private static final String VAR_IBANREFUND = "ibanRefund";
-	private static final String VAR_CONFIRMATIONEMAILSENT = "confirmationEmailSent";
-	private static final String VAR_SERVICEIDENTIFIER = "serviceIdentifier";
-	private static final String VAR_PREIS = "preis";
-	private static final String VAR_ERSTATTUNG = "erstattung";
-	private static final String VAR_PAKET = "paket";
-	private static final String VAR_BESCHAEDIGT = "beschaedigt";
-
-	static {
-		LogFactory.useSlf4jLogging();
-	}
-
-	@Before
-	public void setup() {
-		init(rule.getProcessEngine());
-
-		LagerService lagerService = new LagerService();
-
-		WarennummerErmittelnDelegate warennummerErmittelnDelegate = new WarennummerErmittelnDelegate();
-		warennummerErmittelnDelegate.setLagerService(lagerService);
-
-		Mocks.register("warennummer", warennummerErmittelnDelegate);
-	}
-
-	@Test
-	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
-	public void normalverpackungAuspacken() {
-
-		ProcessInstance processInstance = runtimeService() //
-			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, false, VAR_ERSTATTUNG, false, VAR_KUNDENNUMMER, "C-123A456")); //
-
-		assertThat(processInstance) //
-			.isStarted() //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot0 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
-		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.MANUELLE_PRUEFUNG));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PACKEN), withVariables(VAR_PAKETTYP, "Normalverpackung"));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PRUEFEN), withVariables(VAR_PAKET, false));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PACKEN), withVariables(VAR_PAKETTYP, "Luxusverpackung"));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PRUEFEN), withVariables(VAR_PAKET, true));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_SENDEN));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(UserTasks.PAKET_SENDEN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isEnded() //
-			.variables() //
-				.contains(entry(VAR_KUNDENNUMMER, "C-123A456"), entry(VAR_VORNAME, "Max"), entry(VAR_ERSTATTUNG, false), entry(VAR_NACHNAME, "Mustermann"), entry(VAR_BESCHAEDIGT, false)); //
-
-	}
-
-	@Test
-	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
-	public void vernichtenErstattung() {
-
-		ProcessInstance processInstance = runtimeService() //
-			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, true, VAR_ERSTATTUNG, true, VAR_KUNDENNUMMER, "C-123A456")); //
-
-		assertThat(processInstance) //
-			.isStarted() //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(ManualTasks.NEW_TASK_1) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.WARENDATEN_ERFASSEN), withVariables(VAR_MARKE, "Luxury Foot", VAR_PREIS, 350));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(ManualTasks.NEW_TASK_1) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.WARE_VERNICHTEN));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(ManualTasks.NEW_TASK_1) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot0 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
-		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(ManualTasks.NEW_TASK_1) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot1 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot1.put(VAR_SERVICEIDENTIFIER, "getData");
-		List<LockedExternalTask> lockedTasks1 = lockTasks(lockedTasks0, "financial");
-		complete(getLockedTask(lockedTasks1, ServiceTasks.FINANZDATEN_ERMITTELN), ExternalServiceMockProvider.financialMock(variableSnapshot1));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(ManualTasks.NEW_TASK_1) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot2 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot2.put(VAR_SERVICEIDENTIFIER, "refund");
-		List<LockedExternalTask> lockedTasks2 = lockTasks(lockedTasks1, "financial");
-		complete(getLockedTask(lockedTasks2, ServiceTasks.ERSTATTUNG), ExternalServiceMockProvider.financialMock(variableSnapshot2));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasPassed(ServiceTasks.ERSTATTUNG) //
-			.hasPassed(ManualTasks.NEW_TASK_2) //
-			.hasPassed(ManualTasks.NEW_FLOW_2) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(ManualTasks.NEW_TASK_1) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isEnded() //
-			.variables() //
-				.contains(entry(VAR_KUNDENNUMMER, "C-123A456"), entry(VAR_EMAILGESENDET, "Nein"), entry(VAR_MARKE, "Luxury Foot"), entry(VAR_IBAN, "DE12345678900000123456"), entry(VAR_VORNAME, "Max"), entry(VAR_ERSTATTUNG, true), entry(VAR_NACHNAME, "Mustermann"), entry(VAR_BESCHAEDIGT, true)); //
-
-	}
-
-	@Test
-	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
-	public void casetill1() {
-
-		ProcessInstance processInstance = runtimeService() //
-			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, true, VAR_ERSTATTUNG, true, VAR_KUNDENNUMMER, "123")); //
-
-		assertThat(processInstance) //
-			.isStarted() //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot0 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
-		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.MANUELLE_PRUEFUNG));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PACKEN));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PRUEFEN));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_SENDEN));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(ManualTasks.NEW_TASK_1) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(UserTasks.PAKET_SENDEN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.NEW_TASK_2) //
-			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isEnded() //
-			.variables() //
-				.contains(entry(VAR_IBANREFUND, "DE80123084556"), entry(VAR_FIRSTNAME, "Till"), entry(VAR_VORNAME, "till"), entry(VAR_LASTNAME, "Brinkhus"), entry(VAR_SERVICEIDENTIFIER, "getData"), entry(VAR_BESCHAEDIGT, false), entry(VAR_KUNDENNUMMER, "123"), entry(VAR_EMAILGESENDET, "Ja"), entry(VAR_PREIS, 1234), entry(VAR_MARKE, "wer"), entry(VAR_IBAN, "DE80123084556"), entry(VAR_ERSTATTUNG, true), entry(VAR_CONFIRMATIONEMAILSENT, "Ja"), entry(VAR_NACHNAME, "Brinkhus"), entry(VAR_PAKETTYP, "Normalverpackung"), entry(VAR_PAKET, true)); //
-
-	}
-}
+package de.sample.onlineschuhdemo;
+
+import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.*;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.complete;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.runtimeService;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.task;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.withVariables;
+import static org.assertj.core.api.Assertions.entry;
+import static de.sample.onlineschuhdemo.TestUtils.*;
+
+import org.apache.ibatis.logging.LogFactory;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.test.ProcessEngineRule;
+import org.camunda.bpm.engine.externaltask.LockedExternalTask;
+import org.camunda.bpm.engine.test.mock.Mocks;
+import de.sample.onlineschuhdemo.externalaccess.LagerService;
+import de.sample.onlineschuhdemo.externalaccess.WarennummerErmittelnDelegate;
+import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import java.util.List;
+import java.util.Map;
+
+public class MatchingTestcollectionOld {
+
+	@ClassRule
+	@Rule
+	public static ProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();
+
+	private static final String VAR_KUNDENNUMMER = "kundennummer";
+	private static final String VAR_MARKE = "marke";
+	private static final String VAR_IBAN = "iban";
+	private static final String VAR_VORNAME = "vorname";
+	private static final String VAR_NACHNAME = "nachname";
+	private static final String VAR_PAKETTYP = "pakettyp";
+	private static final String VAR_EMAILGESENDET = "emailGesendet";
+	private static final String VAR_FIRSTNAME = "firstname";
+	private static final String VAR_LASTNAME = "lastname";
+	private static final String VAR_IBANREFUND = "ibanRefund";
+	private static final String VAR_CONFIRMATIONEMAILSENT = "confirmationEmailSent";
+	private static final String VAR_SERVICEIDENTIFIER = "serviceIdentifier";
+	private static final String VAR_PREIS = "preis";
+	private static final String VAR_ERSTATTUNG = "erstattung";
+	private static final String VAR_PAKET = "paket";
+	private static final String VAR_BESCHAEDIGT = "beschaedigt";
+
+	static {
+		LogFactory.useSlf4jLogging();
+	}
+
+	@Before
+	public void setup() {
+		init(rule.getProcessEngine());
+
+		LagerService lagerService = new LagerService();
+
+		WarennummerErmittelnDelegate warennummerErmittelnDelegate = new WarennummerErmittelnDelegate();
+		warennummerErmittelnDelegate.setLagerService(lagerService);
+
+		Mocks.register("warennummer", warennummerErmittelnDelegate);
+	}
+
+	@Test
+	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
+	public void normalverpackungAuspacken() {
+
+		ProcessInstance processInstance = runtimeService() //
+			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, false, VAR_ERSTATTUNG, false, VAR_KUNDENNUMMER, "C-123A456")); //
+
+		assertThat(processInstance) //
+			.isStarted() //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot0 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
+		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.MANUELLE_PRUEFUNG));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PACKEN), withVariables(VAR_PAKETTYP, "Normalverpackung"));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PRUEFEN), withVariables(VAR_PAKET, false));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PACKEN), withVariables(VAR_PAKETTYP, "Luxusverpackung"));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PRUEFEN), withVariables(VAR_PAKET, true));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_SENDEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasPassed(UserTasks.PAKET_SENDEN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isEnded() //
+			.variables() //
+				.contains(entry(VAR_KUNDENNUMMER, "C-123A456"), entry(VAR_VORNAME, "Max"), entry(VAR_ERSTATTUNG, false), entry(VAR_NACHNAME, "Mustermann"), entry(VAR_BESCHAEDIGT, false)); //
+
+	}
+
+	@Test
+	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
+	public void vernichtenErstattung() {
+
+		ProcessInstance processInstance = runtimeService() //
+			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, true, VAR_ERSTATTUNG, true, VAR_KUNDENNUMMER, "C-123A456")); //
+
+		assertThat(processInstance) //
+			.isStarted() //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasNotPassed(ManualTasks.NEW_TASK_1) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.WARENDATEN_ERFASSEN), withVariables(VAR_MARKE, "Luxury Foot", VAR_PREIS, 350));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasNotPassed(ManualTasks.NEW_TASK_1) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.WARE_VERNICHTEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasNotPassed(ManualTasks.NEW_TASK_1) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot0 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
+		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasNotPassed(ManualTasks.NEW_TASK_1) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot1 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		variableSnapshot1.put(VAR_SERVICEIDENTIFIER, "getData");
+		List<LockedExternalTask> lockedTasks1 = lockTasks(lockedTasks0, "financial");
+		complete(getLockedTask(lockedTasks1, ServiceTasks.FINANZDATEN_ERMITTELN), ExternalServiceMockProvider.financialMock(variableSnapshot1));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasNotPassed(ManualTasks.NEW_TASK_1) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot2 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		variableSnapshot2.put(VAR_SERVICEIDENTIFIER, "refund");
+		List<LockedExternalTask> lockedTasks2 = lockTasks(lockedTasks1, "financial");
+		complete(getLockedTask(lockedTasks2, ServiceTasks.ERSTATTUNG), ExternalServiceMockProvider.financialMock(variableSnapshot2));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasPassed(ServiceTasks.ERSTATTUNG) //
+			.hasPassed(ManualTasks.NEW_TASK_2) //
+			.hasPassed(ManualTasks.NEW_FLOW_2) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasNotPassed(ManualTasks.NEW_TASK_1) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isEnded() //
+			.variables() //
+				.contains(entry(VAR_KUNDENNUMMER, "C-123A456"), entry(VAR_EMAILGESENDET, "Nein"), entry(VAR_MARKE, "Luxury Foot"), entry(VAR_IBAN, "DE12345678900000123456"), entry(VAR_VORNAME, "Max"), entry(VAR_ERSTATTUNG, true), entry(VAR_NACHNAME, "Mustermann"), entry(VAR_BESCHAEDIGT, true)); //
+
+	}
+
+	@Test
+	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
+	public void casetill1() {
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot0 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
+		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.MANUELLE_PRUEFUNG));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PACKEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PRUEFEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_SENDEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(ManualTasks.NEW_TASK_1) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasPassed(UserTasks.PAKET_SENDEN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(ManualTasks.NEW_TASK_2) //
+			.hasNotPassed(ManualTasks.NEW_FLOW_2) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isEnded() //
+			.variables() //
+				.contains(entry(VAR_IBANREFUND, "DE80123084556"), entry(VAR_FIRSTNAME, "Till"), entry(VAR_VORNAME, "till"), entry(VAR_LASTNAME, "Brinkhus"), entry(VAR_SERVICEIDENTIFIER, "getData"), entry(VAR_BESCHAEDIGT, false), entry(VAR_KUNDENNUMMER, "123"), entry(VAR_EMAILGESENDET, "Ja"), entry(VAR_PREIS, 1234), entry(VAR_MARKE, "wer"), entry(VAR_IBAN, "DE80123084556"), entry(VAR_ERSTATTUNG, true), entry(VAR_CONFIRMATIONEMAILSENT, "Ja"), entry(VAR_NACHNAME, "Brinkhus"), entry(VAR_PAKETTYP, "Normalverpackung"), entry(VAR_PAKET, true)); //
+
+	}
+}
diff --git a/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection-old.java b/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection-old.java
index 98db40d2332dfa0b97b8d002d469d01870042901..94c502e2cd7c99ab20e2216f5b5f17ed0312287d 100644
--- a/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection-old.java
+++ b/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection-old.java
@@ -1,39 +1,39 @@
-package de.sample.onlineschuhdemo;
-
-import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.*;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.complete;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.runtimeService;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.task;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.withVariables;
-import static org.assertj.core.api.Assertions.entry;
-import static de.sample.onlineschuhdemo.TestUtils.*;
-
-import org.apache.ibatis.logging.LogFactory;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.camunda.bpm.engine.test.Deployment;
-import org.camunda.bpm.engine.test.ProcessEngineRule;
-import org.camunda.bpm.engine.externaltask.LockedExternalTask;
-import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import java.util.List;
-import java.util.Map;
-
-public class Testcollection-old {
-
-	@ClassRule
-	@Rule
-	public static ProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();
-
-
-	static {
-		LogFactory.useSlf4jLogging();
-	}
-
-	@Before
-	public void setup() {
-		init(rule.getProcessEngine());
-	}
-}
+package de.sample.onlineschuhdemo;
+
+import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.*;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.complete;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.runtimeService;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.task;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.withVariables;
+import static org.assertj.core.api.Assertions.entry;
+import static de.sample.onlineschuhdemo.TestUtils.*;
+
+import org.apache.ibatis.logging.LogFactory;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.test.ProcessEngineRule;
+import org.camunda.bpm.engine.externaltask.LockedExternalTask;
+import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import java.util.List;
+import java.util.Map;
+
+public class Testcollection-old {
+
+	@ClassRule
+	@Rule
+	public static ProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();
+
+
+	static {
+		LogFactory.useSlf4jLogging();
+	}
+
+	@Before
+	public void setup() {
+		init(rule.getProcessEngine());
+	}
+}
diff --git a/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection.java b/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection.java
index 1407139f5219546c9663eab3b8be16d2cd420309..c4f3f5da766175380b1050848585e24553fe6a27 100644
--- a/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection.java
+++ b/OnlineSchuhDemo/src-gen/de/sample/onlineschuhdemo/Testcollection.java
@@ -1,919 +1,429 @@
-package de.sample.onlineschuhdemo;
-
-import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.*;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.complete;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.runtimeService;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.task;
-import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.withVariables;
-import static org.assertj.core.api.Assertions.entry;
-import static de.sample.onlineschuhdemo.TestUtils.*;
-
-import org.apache.ibatis.logging.LogFactory;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.camunda.bpm.engine.test.Deployment;
-import org.camunda.bpm.engine.test.ProcessEngineRule;
-import org.camunda.bpm.engine.externaltask.LockedExternalTask;
-import org.camunda.bpm.engine.test.mock.Mocks;
-import de.sample.onlineschuhdemo.externalaccess.LagerService;
-import de.sample.onlineschuhdemo.externalaccess.WarennummerErmittelnDelegate;
-import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import java.util.List;
-import java.util.Map;
-
-public class Testcollection {
-
-	@ClassRule
-	@Rule
-	public static ProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();
-
-	private static final String VAR_KUNDENNUMMER = "kundennummer";
-	private static final String VAR_MARKE = "marke";
-	private static final String VAR_IBAN = "iban";
-	private static final String VAR_VORNAME = "vorname";
-	private static final String VAR_NACHNAME = "nachname";
-	private static final String VAR_PAKETTYP = "pakettyp";
-	private static final String VAR_EMAILGESENDET = "emailGesendet";
-	private static final String VAR_FIRSTNAME = "firstname";
-	private static final String VAR_LASTNAME = "lastname";
-	private static final String VAR_IBANREFUND = "ibanRefund";
-	private static final String VAR_CONFIRMATIONEMAILSENT = "confirmationEmailSent";
-	private static final String VAR_SERVICEIDENTIFIER = "serviceIdentifier";
-	private static final String VAR_PREIS = "preis";
-	private static final String VAR_ERSTATTUNG = "erstattung";
-	private static final String VAR_PAKET = "paket";
-	private static final String VAR_BESCHAEDIGT = "beschaedigt";
-
-	static {
-		LogFactory.useSlf4jLogging();
-	}
-
-	@Before
-	public void setup() {
-		init(rule.getProcessEngine());
-
-		LagerService lagerService = new LagerService();
-
-		WarennummerErmittelnDelegate warennummerErmittelnDelegate = new WarennummerErmittelnDelegate();
-		warennummerErmittelnDelegate.setLagerService(lagerService);
-
-		Mocks.register("warennummer", warennummerErmittelnDelegate);
-	}
-
-	@Test
-	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
-	public void normalverpackungAuspacken() {
-
-		ProcessInstance processInstance = runtimeService() //
-			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, false, VAR_ERSTATTUNG, false, VAR_KUNDENNUMMER, "C-123A456")); //
-
-		assertThat(processInstance) //
-			.isStarted() //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot0 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
-		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.MANUELLE_PRUEFUNG));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PACKEN), withVariables(VAR_PAKETTYP, "Normalverpackung"));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PRUEFEN), withVariables(VAR_PAKET, false));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PACKEN), withVariables(VAR_PAKETTYP, "Luxusverpackung"));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_PRUEFEN), withVariables(VAR_PAKET, true));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.PAKET_SENDEN));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasPassed(UserTasks.PAKET_PACKEN) //
-			.hasPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasPassed(UserTasks.PAKET_SENDEN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isEnded() //
-			.variables() //
-				.contains(entry(VAR_KUNDENNUMMER, "C-123A456"), entry(VAR_VORNAME, "Max"), entry(VAR_ERSTATTUNG, false), entry(VAR_NACHNAME, "Mustermann"), entry(VAR_BESCHAEDIGT, false)); //
-
-	}
-
-	@Test
-	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
-	public void vernichtenErstattung() {
-
-		ProcessInstance processInstance = runtimeService() //
-			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, true, VAR_ERSTATTUNG, true, VAR_KUNDENNUMMER, "C-123A456")); //
-
-		assertThat(processInstance) //
-			.isStarted() //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.WARENDATEN_ERFASSEN), withVariables(VAR_MARKE, "Luxury Foot", VAR_PREIS, 350));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		complete(task(UserTasks.WARE_VERNICHTEN));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot0 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
-		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot1 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot1.put(VAR_SERVICEIDENTIFIER, "getData");
-		List<LockedExternalTask> lockedTasks1 = lockTasks(lockedTasks0, "financial");
-		complete(getLockedTask(lockedTasks1, ServiceTasks.FINANZDATEN_ERMITTELN), ExternalServiceMockProvider.financialMock(variableSnapshot1));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot2 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot2.put(VAR_SERVICEIDENTIFIER, "refund");
-		List<LockedExternalTask> lockedTasks2 = lockTasks(lockedTasks1, "financial");
-		complete(getLockedTask(lockedTasks2, ServiceTasks.ERSTATTUNG), ExternalServiceMockProvider.financialMock(variableSnapshot2));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasPassed(ServiceTasks.ERSTATTUNG) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isEnded() //
-			.variables() //
-				.contains(entry(VAR_KUNDENNUMMER, "C-123A456"), entry(VAR_EMAILGESENDET, "Nein"), entry(VAR_MARKE, "Luxury Foot"), entry(VAR_IBAN, "DE12345678900000123456"), entry(VAR_VORNAME, "Max"), entry(VAR_ERSTATTUNG, true), entry(VAR_NACHNAME, "Mustermann"), entry(VAR_BESCHAEDIGT, true)); //
-
-	}
-
-	@Test
-	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
-	public void casetill1() {
-
-		ProcessInstance processInstance = runtimeService() //
-			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, true, VAR_ERSTATTUNG, true, VAR_KUNDENNUMMER, "123")); //
-
-		assertThat(processInstance) //
-			.isStarted() //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot0 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
-		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot1 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot1.put(VAR_SERVICEIDENTIFIER, "getData");
-		List<LockedExternalTask> lockedTasks1 = lockTasks(lockedTasks0, "financial");
-		complete(getLockedTask(lockedTasks1, ServiceTasks.FINANZDATEN_ERMITTELN), ExternalServiceMockProvider.financialMock(variableSnapshot1));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot2 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot2.put(VAR_SERVICEIDENTIFIER, "refund");
-		List<LockedExternalTask> lockedTasks2 = lockTasks(lockedTasks1, "financial");
-		complete(getLockedTask(lockedTasks2, ServiceTasks.ERSTATTUNG), ExternalServiceMockProvider.financialMock(variableSnapshot2));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasPassed(ServiceTasks.ERSTATTUNG) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isEnded() //
-			.variables() //
-				.contains(entry(VAR_IBANREFUND, "DE80123084556"), entry(VAR_FIRSTNAME, "Till"), entry(VAR_VORNAME, "till"), entry(VAR_LASTNAME, "Brinkhus"), entry(VAR_SERVICEIDENTIFIER, "getData"), entry(VAR_BESCHAEDIGT, false), entry(VAR_KUNDENNUMMER, "123"), entry(VAR_EMAILGESENDET, "Ja"), entry(VAR_PREIS, 1234), entry(VAR_MARKE, "wer"), entry(VAR_IBAN, "DE80123084556"), entry(VAR_ERSTATTUNG, true), entry(VAR_CONFIRMATIONEMAILSENT, "Ja"), entry(VAR_NACHNAME, "Brinkhus"), entry(VAR_PAKETTYP, "Normalverpackung"), entry(VAR_PAKET, true)); //
-
-	}
-
-	@Test
-	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
-	public void casetill2() {
-
-		ProcessInstance processInstance = runtimeService() //
-			.startProcessInstanceByKey("Retoure", withVariables(VAR_BESCHAEDIGT, true, VAR_ERSTATTUNG, true, VAR_KUNDENNUMMER, "12345")); //
-
-		assertThat(processInstance) //
-			.isStarted() //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot0 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
-		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot1 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot1.put(VAR_SERVICEIDENTIFIER, "getData");
-		List<LockedExternalTask> lockedTasks1 = lockTasks(lockedTasks0, "financial");
-		complete(getLockedTask(lockedTasks1, ServiceTasks.FINANZDATEN_ERMITTELN), ExternalServiceMockProvider.financialMock(variableSnapshot1));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
-			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasNotPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isNotEnded(); //
-
-		Map<String, Object> variableSnapshot2 = runtimeService() //
-			.getVariables(processInstance.getId()); //
-		variableSnapshot2.put(VAR_SERVICEIDENTIFIER, "refund");
-		List<LockedExternalTask> lockedTasks2 = lockTasks(lockedTasks1, "financial");
-		complete(getLockedTask(lockedTasks2, ServiceTasks.ERSTATTUNG), ExternalServiceMockProvider.financialMock(variableSnapshot2));
-
-		assertThat(processInstance) //
-			.hasPassed(Events.RETOURE_START) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
-			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
-			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
-			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
-			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
-			.hasPassed(ServiceTasks.ERSTATTUNG) //
-			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
-			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
-			.hasPassed(Events.RETOURE_ENDE) //
-			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
-			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
-			.hasNotPassed(UserTasks.PAKET_PACKEN) //
-			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
-			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
-			.hasNotPassed(UserTasks.PAKET_SENDEN) //
-			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
-			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
-			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
-			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
-			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
-			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
-			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
-			.hasNotPassed(UserTasks.WARE_SPENDEN) //
-			.isEnded(); //
-
-	}
-}
+package de.sample.onlineschuhdemo;
+
+import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.*;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.complete;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.runtimeService;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.task;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.withVariables;
+import static org.assertj.core.api.Assertions.entry;
+import static de.sample.onlineschuhdemo.TestUtils.*;
+
+import org.apache.ibatis.logging.LogFactory;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.test.ProcessEngineRule;
+import org.camunda.bpm.engine.externaltask.LockedExternalTask;
+import org.camunda.bpm.engine.test.mock.Mocks;
+import de.sample.onlineschuhdemo.externalaccess.LagerService;
+import de.sample.onlineschuhdemo.externalaccess.WarennummerErmittelnDelegate;
+import org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRuleBuilder;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import java.util.List;
+import java.util.Map;
+
+public class Testcollection {
+
+	@ClassRule
+	@Rule
+	public static ProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();
+
+	private static final String VAR_KUNDENNUMMER = "kundennummer";
+	private static final String VAR_MARKE = "marke";
+	private static final String VAR_IBAN = "iban";
+	private static final String VAR_VORNAME = "vorname";
+	private static final String VAR_NACHNAME = "nachname";
+	private static final String VAR_PAKETTYP = "pakettyp";
+	private static final String VAR_EMAILGESENDET = "emailGesendet";
+	private static final String VAR_FIRSTNAME = "firstname";
+	private static final String VAR_LASTNAME = "lastname";
+	private static final String VAR_IBANREFUND = "ibanRefund";
+	private static final String VAR_CONFIRMATIONEMAILSENT = "confirmationEmailSent";
+	private static final String VAR_SERVICEIDENTIFIER = "serviceIdentifier";
+	private static final String VAR_PREIS = "preis";
+	private static final String VAR_ERSTATTUNG = "erstattung";
+	private static final String VAR_PAKET = "paket";
+	private static final String VAR_BESCHAEDIGT = "beschaedigt";
+
+	static {
+		LogFactory.useSlf4jLogging();
+	}
+
+	@Before
+	public void setup() {
+		init(rule.getProcessEngine());
+
+		LagerService lagerService = new LagerService();
+
+		WarennummerErmittelnDelegate warennummerErmittelnDelegate = new WarennummerErmittelnDelegate();
+		warennummerErmittelnDelegate.setLagerService(lagerService);
+
+		Mocks.register("warennummer", warennummerErmittelnDelegate);
+	}
+
+	@Test
+	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
+	public void TestHenning() {
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot0 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
+		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot1 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		variableSnapshot1.put(VAR_SERVICEIDENTIFIER, "getData");
+		List<LockedExternalTask> lockedTasks1 = lockTasks(lockedTasks0, "financial");
+		complete(getLockedTask(lockedTasks1, ServiceTasks.FINANZDATEN_ERMITTELN), ExternalServiceMockProvider.financialMock(variableSnapshot1));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot2 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		variableSnapshot2.put(VAR_SERVICEIDENTIFIER, "refund");
+		List<LockedExternalTask> lockedTasks2 = lockTasks(lockedTasks1, "financial");
+		complete(getLockedTask(lockedTasks2, ServiceTasks.ERSTATTUNG), ExternalServiceMockProvider.financialMock(variableSnapshot2));
+
+		assertThat(processInstance) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasPassed(ServiceTasks.ERSTATTUNG) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isEnded() //
+			.variables() //
+				.contains(entry(VAR_KUNDENNUMMER, "123123123312")); //
+
+	}
+
+	@Test
+	@Deployment(resources = {"retoure.bpmn", "\\schuh_vernichtung_spende.dmn"})
+	public void Test2() {
+
+		ProcessInstance processInstance = runtimeService() //
+			.startProcessInstanceByKey("Retoure", withVariables(VAR_KUNDENNUMMER, "123132")); //
+
+		assertThat(processInstance) //
+			.isStarted() //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasNotPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		Map<String, Object> variableSnapshot0 = runtimeService() //
+			.getVariables(processInstance.getId()); //
+		List<LockedExternalTask> lockedTasks0 = lockTasks("customer");
+		complete(getLockedTask(lockedTasks0, ServiceTasks.KUNDENDATEN_ERMITTELN), ExternalServiceMockProvider.customerProvider(variableSnapshot0));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasNotPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasNotPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.MANUELLE_PRUEFUNG));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasNotPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PACKEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasNotPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasNotPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_PRUEFEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasNotPassed(UserTasks.PAKET_SENDEN) //
+			.hasNotPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasNotPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isNotEnded(); //
+
+		complete(task(UserTasks.PAKET_SENDEN));
+
+		assertThat(processInstance) //
+			.hasPassed(Events.RETOURE_START) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT) //
+			.hasPassed(ManualTasks.WARE_EINSORTIEREN) //
+			.hasPassed(Gateways.GATEWAY_BESCHAEDIGT_CLOSE) //
+			.hasPassed(ServiceTasks.KUNDENDATEN_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG) //
+			.hasPassed(UserTasks.MANUELLE_PRUEFUNG) //
+			.hasPassed(ServiceTasks.WARENNUMMER_ERMITTELN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT_CLOSED) //
+			.hasPassed(UserTasks.PAKET_PACKEN) //
+			.hasPassed(UserTasks.PAKET_PRUEFEN) //
+			.hasPassed(Gateways.GATEWAY_EINPACKUNG_FEHLERHAFT) //
+			.hasPassed(UserTasks.PAKET_SENDEN) //
+			.hasPassed(Gateways.GATEWAY_NEUSENDUNG_CLOSED) //
+			.hasPassed(Gateways.GATEWAY_PARALLEL_LAGER_NEUSENDUNG_CLOSED) //
+			.hasPassed(Events.RETOURE_ENDE) //
+			.hasNotPassed(ServiceTasks.FINANZDATEN_ERMITTELN) //
+			.hasNotPassed(ServiceTasks.ERSTATTUNG) //
+			.hasNotPassed(Gateways.GATEWAY_AUSPACKEN) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_NORMAL) //
+			.hasNotPassed(Gateways.GATEWAY_14EVKAP) //
+			.hasNotPassed(ManualTasks.WARE_AUSPACKEN_LUXUS) //
+			.hasNotPassed(UserTasks.WARENDATEN_ERFASSEN) //
+			.hasNotPassed(BusinessRuleTasks.VERNICHTUNG_ERMITTELN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG) //
+			.hasNotPassed(UserTasks.WARE_VERNICHTEN) //
+			.hasNotPassed(Gateways.GATEWAY_VERNICHTUNG_CLOSE) //
+			.hasNotPassed(UserTasks.WARE_SPENDEN) //
+			.isEnded(); //
+
+	}
+}
diff --git a/OnlineSchuhDemo/src/main/resources/backup/1636397161566.zip b/OnlineSchuhDemo/src/main/resources/backup/1636397161566.zip
new file mode 100644
index 0000000000000000000000000000000000000000..ae876b8a1740204f07917aea568da1df2649d9d1
Binary files /dev/null and b/OnlineSchuhDemo/src/main/resources/backup/1636397161566.zip differ
diff --git a/OnlineSchuhDemo/src/main/resources/backup/1636400003412.zip b/OnlineSchuhDemo/src/main/resources/backup/1636400003412.zip
new file mode 100644
index 0000000000000000000000000000000000000000..46cb7c81675ccd7e52eecd8515599d372f4ccc92
Binary files /dev/null and b/OnlineSchuhDemo/src/main/resources/backup/1636400003412.zip differ
diff --git a/OnlineSchuhDemo/src/main/resources/backup/1636632989310.zip b/OnlineSchuhDemo/src/main/resources/backup/1636632989310.zip
new file mode 100644
index 0000000000000000000000000000000000000000..63fd01fcb7e744234dc9b5a0696367e958012788
Binary files /dev/null and b/OnlineSchuhDemo/src/main/resources/backup/1636632989310.zip differ
diff --git a/OnlineSchuhDemo/src/main/resources/backup/1636637866368.zip b/OnlineSchuhDemo/src/main/resources/backup/1636637866368.zip
new file mode 100644
index 0000000000000000000000000000000000000000..be14658cf008db510e09957ddedcc42cc957ca00
Binary files /dev/null and b/OnlineSchuhDemo/src/main/resources/backup/1636637866368.zip differ
diff --git a/OnlineSchuhDemo/src/main/resources/backup/1636645800372.zip b/OnlineSchuhDemo/src/main/resources/backup/1636645800372.zip
new file mode 100644
index 0000000000000000000000000000000000000000..55d3681b4f9eca24e170146cd72954175de10917
Binary files /dev/null and b/OnlineSchuhDemo/src/main/resources/backup/1636645800372.zip differ
diff --git a/OnlineSchuhDemo/src/main/resources/backup/1636646099109.zip b/OnlineSchuhDemo/src/main/resources/backup/1636646099109.zip
new file mode 100644
index 0000000000000000000000000000000000000000..65391134162a9ee8cb8bbec3454eeb1e44e60ed6
Binary files /dev/null and b/OnlineSchuhDemo/src/main/resources/backup/1636646099109.zip differ
diff --git a/OnlineSchuhDemo/src/main/resources/backup/1636646289337.zip b/OnlineSchuhDemo/src/main/resources/backup/1636646289337.zip
new file mode 100644
index 0000000000000000000000000000000000000000..c5ec593c7be817a530016966012f4ba34c132512
Binary files /dev/null and b/OnlineSchuhDemo/src/main/resources/backup/1636646289337.zip differ
diff --git a/OnlineSchuhDemo/src/main/resources/backup/retoure.bpmn b/OnlineSchuhDemo/src/main/resources/backup/retoure.bpmn
index 74450c5c2a4a17c23cc06a38cb5cf365551da5a8..fd915bcb2432aec1210fcd7b2cacbb7dc93fb0f8 100644
--- a/OnlineSchuhDemo/src/main/resources/backup/retoure.bpmn
+++ b/OnlineSchuhDemo/src/main/resources/backup/retoure.bpmn
@@ -1,491 +1,491 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0b5ffl8" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0">
-  <bpmn:process id="Retoure" name="Schuh-Retoure" isExecutable="true">
-    <bpmn:startEvent id="Retoure_Start">
-      <bpmn:extensionElements>
-        <camunda:formData>
-          <camunda:formField id="FormField_beschaedigt" label="beschaedigt" type="boolean" defaultValue="false" />
-          <camunda:formField id="FormField_erstattung" label="erstattung" type="boolean" defaultValue="false" />
-          <camunda:formField id="FormField_kundennummer" label="kundennummer" type="string" />
-        </camunda:formData>
-      </bpmn:extensionElements>
-      <bpmn:outgoing>Flow_Start</bpmn:outgoing>
-    </bpmn:startEvent>
-    <bpmn:sequenceFlow id="Flow_Start" sourceRef="Retoure_Start" targetRef="Gateway_Parallel_Lager_Neusendung" />
-    <bpmn:parallelGateway id="Gateway_Parallel_Lager_Neusendung">
-      <bpmn:incoming>Flow_Start</bpmn:incoming>
-      <bpmn:outgoing>Flow_0eh02jo</bpmn:outgoing>
-      <bpmn:outgoing>Flow_1gu0k49</bpmn:outgoing>
-    </bpmn:parallelGateway>
-    <bpmn:exclusiveGateway id="Gateway_Beschaedigt" default="Flow_unbeschaedigt">
-      <bpmn:incoming>Flow_0eh02jo</bpmn:incoming>
-      <bpmn:outgoing>Flow_unbeschaedigt</bpmn:outgoing>
-      <bpmn:outgoing>Flow_beschaedigt</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_0eh02jo" sourceRef="Gateway_Parallel_Lager_Neusendung" targetRef="Gateway_Beschaedigt" />
-    <bpmn:exclusiveGateway id="Gateway_Neusendung" default="Flow_neusenden">
-      <bpmn:incoming>Flow_0iibopi</bpmn:incoming>
-      <bpmn:outgoing>Flow_Erstattung</bpmn:outgoing>
-      <bpmn:outgoing>Flow_neusenden</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_1gu0k49" sourceRef="Gateway_Parallel_Lager_Neusendung" targetRef="Kundendaten_ermitteln" />
-    <bpmn:sequenceFlow id="Flow_unbeschaedigt" name="Ware nicht beschädigt" sourceRef="Gateway_Beschaedigt" targetRef="Ware_einsortieren" />
-    <bpmn:sequenceFlow id="Flow_beschaedigt" name="Ware &#10;beschädigt" sourceRef="Gateway_Beschaedigt" targetRef="Warendaten_erfassen">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{beschaedigt == true}</bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
-    <bpmn:userTask id="Warendaten_erfassen" name="Warendaten erfassen" camunda:formKey="embedded:app:forms/warendaten-erfassen-form.html">
-      <bpmn:incoming>Flow_beschaedigt</bpmn:incoming>
-      <bpmn:outgoing>Flow_01lf19r</bpmn:outgoing>
-    </bpmn:userTask>
-    <bpmn:sequenceFlow id="Flow_01lf19r" sourceRef="Warendaten_erfassen" targetRef="Vernichtung_ermitteln" />
-    <bpmn:businessRuleTask id="Vernichtung_ermitteln" name="Vernichtung oder Spende ermitteln" camunda:resultVariable="vernichten" camunda:decisionRef="Schuh_Vernichtung_Spende" camunda:mapDecisionResult="singleEntry">
-      <bpmn:incoming>Flow_01lf19r</bpmn:incoming>
-      <bpmn:outgoing>Flow_0kgxxke</bpmn:outgoing>
-    </bpmn:businessRuleTask>
-    <bpmn:exclusiveGateway id="Gateway_Vernichtung">
-      <bpmn:incoming>Flow_0kgxxke</bpmn:incoming>
-      <bpmn:outgoing>Flow_vernichten</bpmn:outgoing>
-      <bpmn:outgoing>Flow_spenden</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_0kgxxke" sourceRef="Vernichtung_ermitteln" targetRef="Gateway_Vernichtung" />
-    <bpmn:sequenceFlow id="Flow_vernichten" name="vernichten" sourceRef="Gateway_Vernichtung" targetRef="Ware_vernichten">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{vernichten == true}</bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="Flow_spenden" name="spenden" sourceRef="Gateway_Vernichtung" targetRef="Ware_spenden">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{vernichten == false}</bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
-    <bpmn:exclusiveGateway id="Gateway_Vernichtung_Close">
-      <bpmn:incoming>Flow_0f171gg</bpmn:incoming>
-      <bpmn:incoming>Flow_0zkq7z5</bpmn:incoming>
-      <bpmn:outgoing>Flow_14jbtgw</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_0f171gg" sourceRef="Ware_spenden" targetRef="Gateway_Vernichtung_Close" />
-    <bpmn:sequenceFlow id="Flow_0zkq7z5" sourceRef="Ware_vernichten" targetRef="Gateway_Vernichtung_Close" />
-    <bpmn:exclusiveGateway id="Gateway_Beschaedigt_Close">
-      <bpmn:incoming>Flow_14jbtgw</bpmn:incoming>
-      <bpmn:incoming>Flow_0a9rzst</bpmn:incoming>
-      <bpmn:outgoing>Flow_1c2tfla</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_14jbtgw" sourceRef="Gateway_Vernichtung_Close" targetRef="Gateway_Beschaedigt_Close" />
-    <bpmn:userTask id="Ware_vernichten" name="Ware vernichten">
-      <bpmn:incoming>Flow_vernichten</bpmn:incoming>
-      <bpmn:outgoing>Flow_0zkq7z5</bpmn:outgoing>
-    </bpmn:userTask>
-    <bpmn:userTask id="Ware_spenden" name="Ware spenden">
-      <bpmn:incoming>Flow_spenden</bpmn:incoming>
-      <bpmn:outgoing>Flow_0f171gg</bpmn:outgoing>
-    </bpmn:userTask>
-    <bpmn:sequenceFlow id="Flow_Erstattung" name="Erstattung" sourceRef="Gateway_Neusendung" targetRef="Finanzdaten_ermitteln">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{erstattung}</bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="Flow_neusenden" name="Neusendung" sourceRef="Gateway_Neusendung" targetRef="Manuelle_Pruefung" />
-    <bpmn:serviceTask id="Erstattung" name="Erstattung ausführen" camunda:type="external" camunda:topic="financial">
-      <bpmn:extensionElements>
-        <camunda:inputOutput>
-          <camunda:inputParameter name="serviceIdentifier">refund</camunda:inputParameter>
-          <camunda:inputParameter name="ibanRefund">${iban}</camunda:inputParameter>
-          <camunda:inputParameter name="name">${vorname} ${nachname}</camunda:inputParameter>
-          <camunda:outputParameter name="emailGesendet">${confirmationEmailSent}</camunda:outputParameter>
-        </camunda:inputOutput>
-      </bpmn:extensionElements>
-      <bpmn:incoming>Flow_Erstattung_Datenermittlung</bpmn:incoming>
-      <bpmn:outgoing>Flow_Erstattung_abgeschlossen</bpmn:outgoing>
-    </bpmn:serviceTask>
-    <bpmn:userTask id="Manuelle_Pruefung" name="Manuelle Prüfung des Anliegens">
-      <bpmn:incoming>Flow_neusenden</bpmn:incoming>
-      <bpmn:outgoing>Flow_0u77zm0</bpmn:outgoing>
-    </bpmn:userTask>
-    <bpmn:sequenceFlow id="Flow_0u77zm0" sourceRef="Manuelle_Pruefung" targetRef="Warennummer_ermitteln" />
-    <bpmn:serviceTask id="Warennummer_ermitteln" name="Neue Warennummer ermitteln" camunda:delegateExpression="#{warennummer}">
-      <bpmn:incoming>Flow_0u77zm0</bpmn:incoming>
-      <bpmn:outgoing>Flow_03ubi3l</bpmn:outgoing>
-    </bpmn:serviceTask>
-    <bpmn:userTask id="Paket_packen" name="Paket packen">
-      <bpmn:extensionElements>
-        <camunda:inputOutput>
-          <camunda:outputParameter name="pakettyp">${pakettyp}</camunda:outputParameter>
-        </camunda:inputOutput>
-      </bpmn:extensionElements>
-      <bpmn:incoming>Flow_006t3wo</bpmn:incoming>
-      <bpmn:outgoing>Flow_0bhr7g8</bpmn:outgoing>
-    </bpmn:userTask>
-    <bpmn:sequenceFlow id="Flow_0bhr7g8" sourceRef="Paket_packen" targetRef="Paket_pruefen" />
-    <bpmn:userTask id="Paket_pruefen" name="Paket prüfen">
-      <bpmn:extensionElements>
-        <camunda:formData>
-          <camunda:formField id="FormField_Paket_Pruefung" label="paket" type="boolean" defaultValue="true" />
-        </camunda:formData>
-      </bpmn:extensionElements>
-      <bpmn:incoming>Flow_0bhr7g8</bpmn:incoming>
-      <bpmn:outgoing>Flow_1n6o3h6</bpmn:outgoing>
-    </bpmn:userTask>
-    <bpmn:exclusiveGateway id="Gateway_Einpackung_Fehlerhaft" default="Flow_paket_okay">
-      <bpmn:incoming>Flow_1n6o3h6</bpmn:incoming>
-      <bpmn:outgoing>Flow_paket_okay</bpmn:outgoing>
-      <bpmn:outgoing>Flow_fehlerhaft_eingepackt</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_1n6o3h6" sourceRef="Paket_pruefen" targetRef="Gateway_Einpackung_Fehlerhaft" />
-    <bpmn:sequenceFlow id="Flow_paket_okay" name="Paket okay" sourceRef="Gateway_Einpackung_Fehlerhaft" targetRef="Paket_senden" />
-    <bpmn:sequenceFlow id="Flow_fehlerhaft_eingepackt" name="Fehlerhaft eingepackt" sourceRef="Gateway_Einpackung_Fehlerhaft" targetRef="Gateway_Auspacken">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{paket==false}</bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
-    <bpmn:exclusiveGateway id="Gateway_Einpackung_Fehlerhaft_Closed">
-      <bpmn:incoming>Flow_03ubi3l</bpmn:incoming>
-      <bpmn:incoming>Flow_1bnro90</bpmn:incoming>
-      <bpmn:outgoing>Flow_006t3wo</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_03ubi3l" sourceRef="Warennummer_ermitteln" targetRef="Gateway_Einpackung_Fehlerhaft_Closed" />
-    <bpmn:sequenceFlow id="Flow_006t3wo" sourceRef="Gateway_Einpackung_Fehlerhaft_Closed" targetRef="Paket_packen" />
-    <bpmn:sequenceFlow id="Flow_1bnro90" sourceRef="Gateway_14evkap" targetRef="Gateway_Einpackung_Fehlerhaft_Closed" />
-    <bpmn:exclusiveGateway id="Gateway_Neusendung_Closed">
-      <bpmn:incoming>Flow_0u4n4gn</bpmn:incoming>
-      <bpmn:incoming>Flow_Erstattung_abgeschlossen</bpmn:incoming>
-      <bpmn:outgoing>Flow_0m33odz</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_0u4n4gn" sourceRef="Paket_senden" targetRef="Gateway_Neusendung_Closed" />
-    <bpmn:sequenceFlow id="Flow_Erstattung_abgeschlossen" sourceRef="Erstattung" targetRef="Gateway_Neusendung_Closed" />
-    <bpmn:sequenceFlow id="Flow_0m33odz" sourceRef="Gateway_Neusendung_Closed" targetRef="Gateway_Parallel_Lager_Neusendung_Closed" />
-    <bpmn:parallelGateway id="Gateway_Parallel_Lager_Neusendung_Closed">
-      <bpmn:incoming>Flow_0m33odz</bpmn:incoming>
-      <bpmn:incoming>Flow_1c2tfla</bpmn:incoming>
-      <bpmn:outgoing>Flow_Ende</bpmn:outgoing>
-    </bpmn:parallelGateway>
-    <bpmn:sequenceFlow id="Flow_1c2tfla" sourceRef="Gateway_Beschaedigt_Close" targetRef="Gateway_Parallel_Lager_Neusendung_Closed" />
-    <bpmn:endEvent id="Retoure_Ende">
-      <bpmn:incoming>Flow_Ende</bpmn:incoming>
-    </bpmn:endEvent>
-    <bpmn:sequenceFlow id="Flow_Ende" sourceRef="Gateway_Parallel_Lager_Neusendung_Closed" targetRef="Retoure_Ende" />
-    <bpmn:userTask id="Paket_senden" name="Paket senden">
-      <bpmn:incoming>Flow_paket_okay</bpmn:incoming>
-      <bpmn:outgoing>Flow_0u4n4gn</bpmn:outgoing>
-    </bpmn:userTask>
-    <bpmn:manualTask id="Ware_einsortieren" name="Ware einsortieren">
-      <bpmn:incoming>Flow_unbeschaedigt</bpmn:incoming>
-      <bpmn:outgoing>Flow_0a9rzst</bpmn:outgoing>
-    </bpmn:manualTask>
-    <bpmn:exclusiveGateway id="Gateway_Auspacken">
-      <bpmn:incoming>Flow_fehlerhaft_eingepackt</bpmn:incoming>
-      <bpmn:outgoing>Flow_normal_auspacken</bpmn:outgoing>
-      <bpmn:outgoing>Flow_luxus_auspacken</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:exclusiveGateway id="Gateway_14evkap">
-      <bpmn:incoming>Flow_04tyvq1</bpmn:incoming>
-      <bpmn:incoming>Flow_0d8lhxo</bpmn:incoming>
-      <bpmn:outgoing>Flow_1bnro90</bpmn:outgoing>
-    </bpmn:exclusiveGateway>
-    <bpmn:sequenceFlow id="Flow_04tyvq1" sourceRef="Ware_auspacken_luxus" targetRef="Gateway_14evkap" />
-    <bpmn:sequenceFlow id="Flow_0d8lhxo" sourceRef="Ware_auspacken_normal" targetRef="Gateway_14evkap" />
-    <bpmn:sequenceFlow id="Flow_normal_auspacken" name="Normal-verpackung" sourceRef="Gateway_Auspacken" targetRef="Ware_auspacken_normal">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{pakettyp=="Normalverpackung"}</bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="Flow_luxus_auspacken" name="Luxusverpackung" sourceRef="Gateway_Auspacken" targetRef="Ware_auspacken_luxus">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{pakettyp=="Luxusverpackung"}</bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="Flow_Erstattung_Datenermittlung" sourceRef="Finanzdaten_ermitteln" targetRef="Erstattung" />
-    <bpmn:serviceTask id="Finanzdaten_ermitteln" name="Finanzdaten ermitteln" camunda:type="external" camunda:topic="financial">
-      <bpmn:extensionElements>
-        <camunda:inputOutput>
-          <camunda:inputParameter name="serviceIdentifier">getData</camunda:inputParameter>
-          <camunda:inputParameter name="kundennummer">${kundennummer}</camunda:inputParameter>
-          <camunda:outputParameter name="iban">${ibanRefund}</camunda:outputParameter>
-        </camunda:inputOutput>
-      </bpmn:extensionElements>
-      <bpmn:incoming>Flow_Erstattung</bpmn:incoming>
-      <bpmn:outgoing>Flow_Erstattung_Datenermittlung</bpmn:outgoing>
-    </bpmn:serviceTask>
-    <bpmn:manualTask id="Ware_auspacken_luxus" name="Luxuspaket auspacken">
-      <bpmn:incoming>Flow_luxus_auspacken</bpmn:incoming>
-      <bpmn:outgoing>Flow_04tyvq1</bpmn:outgoing>
-    </bpmn:manualTask>
-    <bpmn:manualTask id="Ware_auspacken_normal" name="Normales Paket auspacken">
-      <bpmn:incoming>Flow_normal_auspacken</bpmn:incoming>
-      <bpmn:outgoing>Flow_0d8lhxo</bpmn:outgoing>
-    </bpmn:manualTask>
-    <bpmn:sequenceFlow id="Flow_0iibopi" sourceRef="Kundendaten_ermitteln" targetRef="Gateway_Neusendung" />
-    <bpmn:serviceTask id="Kundendaten_ermitteln" name="Kundendaten ermitteln" camunda:type="external" camunda:topic="customer">
-      <bpmn:extensionElements>
-        <camunda:inputOutput>
-          <camunda:inputParameter name="kundennummer">${kundennummer}</camunda:inputParameter>
-          <camunda:outputParameter name="vorname">${firstname}</camunda:outputParameter>
-          <camunda:outputParameter name="nachname">${lastname}</camunda:outputParameter>
-        </camunda:inputOutput>
-      </bpmn:extensionElements>
-      <bpmn:incoming>Flow_1gu0k49</bpmn:incoming>
-      <bpmn:outgoing>Flow_0iibopi</bpmn:outgoing>
-    </bpmn:serviceTask>
-    <bpmn:sequenceFlow id="Flow_0a9rzst" sourceRef="Ware_einsortieren" targetRef="Gateway_Beschaedigt_Close" />
-  </bpmn:process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
-    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Retoure">
-      <bpmndi:BPMNEdge id="Flow_0iibopi_di" bpmnElement="Flow_0iibopi">
-        <di:waypoint x="400" y="540" />
-        <di:waypoint x="445" y="540" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_01i7hk6_di" bpmnElement="Flow_Erstattung_Datenermittlung">
-        <di:waypoint x="690" y="540" />
-        <di:waypoint x="970" y="540" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0qjrxz7_di" bpmnElement="Flow_luxus_auspacken">
-        <di:waypoint x="1150" y="675" />
-        <di:waypoint x="1150" y="650" />
-        <di:waypoint x="1060" y="650" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1096" y="623" width="87" height="14" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1t3d53q_di" bpmnElement="Flow_normal_auspacken">
-        <di:waypoint x="1150" y="725" />
-        <di:waypoint x="1150" y="750" />
-        <di:waypoint x="1060" y="750" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1111" y="756" width="57" height="27" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0d8lhxo_di" bpmnElement="Flow_0d8lhxo">
-        <di:waypoint x="960" y="750" />
-        <di:waypoint x="880" y="750" />
-        <di:waypoint x="880" y="725" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_04tyvq1_di" bpmnElement="Flow_04tyvq1">
-        <di:waypoint x="960" y="650" />
-        <di:waypoint x="880" y="650" />
-        <di:waypoint x="880" y="675" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_02p7iio_di" bpmnElement="Flow_Ende">
-        <di:waypoint x="1656" y="660" />
-        <di:waypoint x="1705" y="660" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1c2tfla_di" bpmnElement="Flow_1c2tfla">
-        <di:waypoint x="1205" y="430" />
-        <di:waypoint x="1631" y="430" />
-        <di:waypoint x="1631" y="635" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0m33odz_di" bpmnElement="Flow_0m33odz">
-        <di:waypoint x="1555" y="660" />
-        <di:waypoint x="1606" y="660" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0pjcsuy_di" bpmnElement="Flow_Erstattung_abgeschlossen">
-        <di:waypoint x="1070" y="540" />
-        <di:waypoint x="1530" y="540" />
-        <di:waypoint x="1530" y="635" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0u4n4gn_di" bpmnElement="Flow_0u4n4gn">
-        <di:waypoint x="1500" y="870" />
-        <di:waypoint x="1530" y="870" />
-        <di:waypoint x="1530" y="685" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1bnro90_di" bpmnElement="Flow_1bnro90">
-        <di:waypoint x="855" y="700" />
-        <di:waypoint x="760" y="700" />
-        <di:waypoint x="760" y="845" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_006t3wo_di" bpmnElement="Flow_006t3wo">
-        <di:waypoint x="785" y="870" />
-        <di:waypoint x="870" y="870" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_03ubi3l_di" bpmnElement="Flow_03ubi3l">
-        <di:waypoint x="690" y="870" />
-        <di:waypoint x="735" y="870" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1ff93it_di" bpmnElement="Flow_fehlerhaft_eingepackt">
-        <di:waypoint x="1270" y="845" />
-        <di:waypoint x="1270" y="700" />
-        <di:waypoint x="1180" y="700" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1202" y="761" width="55" height="27" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_17na1xt_di" bpmnElement="Flow_paket_okay">
-        <di:waypoint x="1295" y="870" />
-        <di:waypoint x="1400" y="870" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1320" y="852" width="55" height="14" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1n6o3h6_di" bpmnElement="Flow_1n6o3h6">
-        <di:waypoint x="1160" y="870" />
-        <di:waypoint x="1245" y="870" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0bhr7g8_di" bpmnElement="Flow_0bhr7g8">
-        <di:waypoint x="970" y="870" />
-        <di:waypoint x="1060" y="870" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0u77zm0_di" bpmnElement="Flow_0u77zm0">
-        <di:waypoint x="520" y="870" />
-        <di:waypoint x="590" y="870" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_17xuhq0_di" bpmnElement="Flow_neusenden">
-        <di:waypoint x="470" y="565" />
-        <di:waypoint x="470" y="830" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="478" y="719" width="63" height="14" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0hwn7f3_di" bpmnElement="Flow_Erstattung">
-        <di:waypoint x="495" y="540" />
-        <di:waypoint x="590" y="540" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="507" y="522" width="51" height="14" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0a9rzst_di" bpmnElement="Flow_0a9rzst">
-        <di:waypoint x="820" y="160" />
-        <di:waypoint x="1180" y="160" />
-        <di:waypoint x="1180" y="405" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_14jbtgw_di" bpmnElement="Flow_14jbtgw">
-        <di:waypoint x="1085" y="430" />
-        <di:waypoint x="1155" y="430" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0zkq7z5_di" bpmnElement="Flow_0zkq7z5">
-        <di:waypoint x="970" y="320" />
-        <di:waypoint x="1060" y="320" />
-        <di:waypoint x="1060" y="405" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0f171gg_di" bpmnElement="Flow_0f171gg">
-        <di:waypoint x="970" y="430" />
-        <di:waypoint x="1035" y="430" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0t6w55x_di" bpmnElement="Flow_spenden">
-        <di:waypoint x="780" y="345" />
-        <di:waypoint x="780" y="430" />
-        <di:waypoint x="870" y="430" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="798" y="403" width="43" height="14" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0zzjxrn_di" bpmnElement="Flow_vernichten">
-        <di:waypoint x="805" y="320" />
-        <di:waypoint x="870" y="320" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="812" y="302" width="51" height="14" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0kgxxke_di" bpmnElement="Flow_0kgxxke">
-        <di:waypoint x="690" y="320" />
-        <di:waypoint x="755" y="320" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_01lf19r_di" bpmnElement="Flow_01lf19r">
-        <di:waypoint x="530" y="320" />
-        <di:waypoint x="590" y="320" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0rsh9gw_di" bpmnElement="Flow_beschaedigt">
-        <di:waypoint x="350" y="255" />
-        <di:waypoint x="350" y="320" />
-        <di:waypoint x="430" y="320" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="362" y="285" width="55" height="27" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1ffiujj_di" bpmnElement="Flow_unbeschaedigt">
-        <di:waypoint x="350" y="205" />
-        <di:waypoint x="350" y="160" />
-        <di:waypoint x="720" y="160" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="505" y="166" width="55" height="27" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1gu0k49_di" bpmnElement="Flow_1gu0k49">
-        <di:waypoint x="260" y="402" />
-        <di:waypoint x="260" y="540" />
-        <di:waypoint x="300" y="540" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0eh02jo_di" bpmnElement="Flow_0eh02jo">
-        <di:waypoint x="260" y="352" />
-        <di:waypoint x="260" y="230" />
-        <di:waypoint x="325" y="230" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_0emcbml_di" bpmnElement="Flow_Start">
-        <di:waypoint x="188" y="377" />
-        <di:waypoint x="235" y="377" />
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Retoure_Start">
-        <dc:Bounds x="152" y="359" width="36" height="36" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_0pbw15b_di" bpmnElement="Gateway_Parallel_Lager_Neusendung">
-        <dc:Bounds x="235" y="352" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_12gz2vz_di" bpmnElement="Gateway_Beschaedigt" isMarkerVisible="true">
-        <dc:Bounds x="325" y="205" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_1baqz4f_di" bpmnElement="Gateway_Neusendung" isMarkerVisible="true">
-        <dc:Bounds x="445" y="515" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1l943g0_di" bpmnElement="Warendaten_erfassen">
-        <dc:Bounds x="430" y="280" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_0axy9lw_di" bpmnElement="Vernichtung_ermitteln">
-        <dc:Bounds x="590" y="280" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_0tcbgt9_di" bpmnElement="Gateway_Vernichtung" isMarkerVisible="true">
-        <dc:Bounds x="755" y="295" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_1usozh0_di" bpmnElement="Gateway_Vernichtung_Close" isMarkerVisible="true">
-        <dc:Bounds x="1035" y="405" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_0nb41va_di" bpmnElement="Gateway_Beschaedigt_Close" isMarkerVisible="true">
-        <dc:Bounds x="1155" y="405" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1obx3f0_di" bpmnElement="Ware_vernichten">
-        <dc:Bounds x="870" y="280" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_0swadmc_di" bpmnElement="Ware_spenden">
-        <dc:Bounds x="870" y="390" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_0jhtgen_di" bpmnElement="Erstattung">
-        <dc:Bounds x="970" y="500" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_0dpq7jh_di" bpmnElement="Manuelle_Pruefung">
-        <dc:Bounds x="420" y="830" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_0fnre3x_di" bpmnElement="Warennummer_ermitteln">
-        <dc:Bounds x="590" y="830" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_01orosg_di" bpmnElement="Paket_packen">
-        <dc:Bounds x="870" y="830" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_0sg307t_di" bpmnElement="Paket_pruefen">
-        <dc:Bounds x="1060" y="830" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_0wlcnif_di" bpmnElement="Gateway_Einpackung_Fehlerhaft" isMarkerVisible="true">
-        <dc:Bounds x="1245" y="845" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_0pa451i_di" bpmnElement="Gateway_Einpackung_Fehlerhaft_Closed" isMarkerVisible="true">
-        <dc:Bounds x="735" y="845" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_0hqss9s_di" bpmnElement="Gateway_Neusendung_Closed" isMarkerVisible="true">
-        <dc:Bounds x="1505" y="635" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_05633xf_di" bpmnElement="Gateway_Parallel_Lager_Neusendung_Closed">
-        <dc:Bounds x="1606" y="635" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Event_1ihgrip_di" bpmnElement="Retoure_Ende">
-        <dc:Bounds x="1705" y="642" width="36" height="36" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1ma1os5_di" bpmnElement="Paket_senden">
-        <dc:Bounds x="1400" y="830" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1p3me1t_di" bpmnElement="Ware_einsortieren">
-        <dc:Bounds x="720" y="120" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_0bffnik_di" bpmnElement="Gateway_Auspacken" isMarkerVisible="true">
-        <dc:Bounds x="1125" y="675" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_14evkap_di" bpmnElement="Gateway_14evkap" isMarkerVisible="true">
-        <dc:Bounds x="855" y="675" width="50" height="50" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1t8f6i7_di" bpmnElement="Finanzdaten_ermitteln">
-        <dc:Bounds x="590" y="500" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1gpa5a1_di" bpmnElement="Ware_auspacken_luxus">
-        <dc:Bounds x="960" y="610" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1xfsrap_di" bpmnElement="Ware_auspacken_normal">
-        <dc:Bounds x="960" y="710" width="100" height="80" />
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Activity_1l3qzwt_di" bpmnElement="Kundendaten_ermitteln">
-        <dc:Bounds x="300" y="500" width="100" height="80" />
-      </bpmndi:BPMNShape>
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</bpmn:definitions>
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0b5ffl8" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0">
+  <bpmn:process id="Retoure" name="Schuh-Retoure" isExecutable="true">
+    <bpmn:startEvent id="Retoure_Start">
+      <bpmn:extensionElements>
+        <camunda:formData>
+          <camunda:formField id="FormField_beschaedigt" label="beschaedigt" type="boolean" defaultValue="false" />
+          <camunda:formField id="FormField_erstattung" label="erstattung" type="boolean" defaultValue="false" />
+          <camunda:formField id="FormField_kundennummer" label="kundennummer" type="string" />
+        </camunda:formData>
+      </bpmn:extensionElements>
+      <bpmn:outgoing>Flow_Start</bpmn:outgoing>
+    </bpmn:startEvent>
+    <bpmn:sequenceFlow id="Flow_Start" sourceRef="Retoure_Start" targetRef="Gateway_Parallel_Lager_Neusendung" />
+    <bpmn:parallelGateway id="Gateway_Parallel_Lager_Neusendung">
+      <bpmn:incoming>Flow_Start</bpmn:incoming>
+      <bpmn:outgoing>Flow_0eh02jo</bpmn:outgoing>
+      <bpmn:outgoing>Flow_1gu0k49</bpmn:outgoing>
+    </bpmn:parallelGateway>
+    <bpmn:exclusiveGateway id="Gateway_Beschaedigt" default="Flow_unbeschaedigt">
+      <bpmn:incoming>Flow_0eh02jo</bpmn:incoming>
+      <bpmn:outgoing>Flow_unbeschaedigt</bpmn:outgoing>
+      <bpmn:outgoing>Flow_beschaedigt</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_0eh02jo" sourceRef="Gateway_Parallel_Lager_Neusendung" targetRef="Gateway_Beschaedigt" />
+    <bpmn:exclusiveGateway id="Gateway_Neusendung" default="Flow_neusenden">
+      <bpmn:incoming>Flow_0iibopi</bpmn:incoming>
+      <bpmn:outgoing>Flow_Erstattung</bpmn:outgoing>
+      <bpmn:outgoing>Flow_neusenden</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_1gu0k49" sourceRef="Gateway_Parallel_Lager_Neusendung" targetRef="Kundendaten_ermitteln" />
+    <bpmn:sequenceFlow id="Flow_unbeschaedigt" name="Ware nicht beschädigt" sourceRef="Gateway_Beschaedigt" targetRef="Ware_einsortieren" />
+    <bpmn:sequenceFlow id="Flow_beschaedigt" name="Ware &#10;beschädigt" sourceRef="Gateway_Beschaedigt" targetRef="Warendaten_erfassen">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{beschaedigt == true}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:userTask id="Warendaten_erfassen" name="Warendaten erfassen" camunda:formKey="embedded:app:forms/warendaten-erfassen-form.html">
+      <bpmn:incoming>Flow_beschaedigt</bpmn:incoming>
+      <bpmn:outgoing>Flow_01lf19r</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:sequenceFlow id="Flow_01lf19r" sourceRef="Warendaten_erfassen" targetRef="Vernichtung_ermitteln" />
+    <bpmn:businessRuleTask id="Vernichtung_ermitteln" name="Vernichtung oder Spende ermitteln" camunda:resultVariable="vernichten" camunda:decisionRef="Schuh_Vernichtung_Spende" camunda:mapDecisionResult="singleEntry">
+      <bpmn:incoming>Flow_01lf19r</bpmn:incoming>
+      <bpmn:outgoing>Flow_0kgxxke</bpmn:outgoing>
+    </bpmn:businessRuleTask>
+    <bpmn:exclusiveGateway id="Gateway_Vernichtung">
+      <bpmn:incoming>Flow_0kgxxke</bpmn:incoming>
+      <bpmn:outgoing>Flow_vernichten</bpmn:outgoing>
+      <bpmn:outgoing>Flow_spenden</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_0kgxxke" sourceRef="Vernichtung_ermitteln" targetRef="Gateway_Vernichtung" />
+    <bpmn:sequenceFlow id="Flow_vernichten" name="vernichten" sourceRef="Gateway_Vernichtung" targetRef="Ware_vernichten">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{vernichten == true}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="Flow_spenden" name="spenden" sourceRef="Gateway_Vernichtung" targetRef="Ware_spenden">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{vernichten == false}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:exclusiveGateway id="Gateway_Vernichtung_Close">
+      <bpmn:incoming>Flow_0f171gg</bpmn:incoming>
+      <bpmn:incoming>Flow_0zkq7z5</bpmn:incoming>
+      <bpmn:outgoing>Flow_14jbtgw</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_0f171gg" sourceRef="Ware_spenden" targetRef="Gateway_Vernichtung_Close" />
+    <bpmn:sequenceFlow id="Flow_0zkq7z5" sourceRef="Ware_vernichten" targetRef="Gateway_Vernichtung_Close" />
+    <bpmn:exclusiveGateway id="Gateway_Beschaedigt_Close">
+      <bpmn:incoming>Flow_14jbtgw</bpmn:incoming>
+      <bpmn:incoming>Flow_0a9rzst</bpmn:incoming>
+      <bpmn:outgoing>Flow_1c2tfla</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_14jbtgw" sourceRef="Gateway_Vernichtung_Close" targetRef="Gateway_Beschaedigt_Close" />
+    <bpmn:userTask id="Ware_vernichten" name="Ware vernichten">
+      <bpmn:incoming>Flow_vernichten</bpmn:incoming>
+      <bpmn:outgoing>Flow_0zkq7z5</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:userTask id="Ware_spenden" name="Ware spenden">
+      <bpmn:incoming>Flow_spenden</bpmn:incoming>
+      <bpmn:outgoing>Flow_0f171gg</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:sequenceFlow id="Flow_Erstattung" name="Erstattung" sourceRef="Gateway_Neusendung" targetRef="Finanzdaten_ermitteln">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{erstattung}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="Flow_neusenden" name="Neusendung" sourceRef="Gateway_Neusendung" targetRef="Manuelle_Pruefung" />
+    <bpmn:serviceTask id="Erstattung" name="Erstattung ausführen" camunda:type="external" camunda:topic="financial">
+      <bpmn:extensionElements>
+        <camunda:inputOutput>
+          <camunda:inputParameter name="serviceIdentifier">refund</camunda:inputParameter>
+          <camunda:inputParameter name="ibanRefund">${iban}</camunda:inputParameter>
+          <camunda:inputParameter name="name">${vorname} ${nachname}</camunda:inputParameter>
+          <camunda:outputParameter name="emailGesendet">${confirmationEmailSent}</camunda:outputParameter>
+        </camunda:inputOutput>
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_Erstattung_Datenermittlung</bpmn:incoming>
+      <bpmn:outgoing>Flow_Erstattung_abgeschlossen</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:userTask id="Manuelle_Pruefung" name="Manuelle Prüfung des Anliegens">
+      <bpmn:incoming>Flow_neusenden</bpmn:incoming>
+      <bpmn:outgoing>Flow_0u77zm0</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:sequenceFlow id="Flow_0u77zm0" sourceRef="Manuelle_Pruefung" targetRef="Warennummer_ermitteln" />
+    <bpmn:serviceTask id="Warennummer_ermitteln" name="Neue Warennummer ermitteln" camunda:delegateExpression="#{warennummer}">
+      <bpmn:incoming>Flow_0u77zm0</bpmn:incoming>
+      <bpmn:outgoing>Flow_03ubi3l</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:userTask id="Paket_packen" name="Paket packen">
+      <bpmn:extensionElements>
+        <camunda:inputOutput>
+          <camunda:outputParameter name="pakettyp">${pakettyp}</camunda:outputParameter>
+        </camunda:inputOutput>
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_006t3wo</bpmn:incoming>
+      <bpmn:outgoing>Flow_0bhr7g8</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:sequenceFlow id="Flow_0bhr7g8" sourceRef="Paket_packen" targetRef="Paket_pruefen" />
+    <bpmn:userTask id="Paket_pruefen" name="Paket prüfen">
+      <bpmn:extensionElements>
+        <camunda:formData>
+          <camunda:formField id="FormField_Paket_Pruefung" label="paket" type="boolean" defaultValue="true" />
+        </camunda:formData>
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_0bhr7g8</bpmn:incoming>
+      <bpmn:outgoing>Flow_1n6o3h6</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:exclusiveGateway id="Gateway_Einpackung_Fehlerhaft" default="Flow_paket_okay">
+      <bpmn:incoming>Flow_1n6o3h6</bpmn:incoming>
+      <bpmn:outgoing>Flow_paket_okay</bpmn:outgoing>
+      <bpmn:outgoing>Flow_fehlerhaft_eingepackt</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_1n6o3h6" sourceRef="Paket_pruefen" targetRef="Gateway_Einpackung_Fehlerhaft" />
+    <bpmn:sequenceFlow id="Flow_paket_okay" name="Paket okay" sourceRef="Gateway_Einpackung_Fehlerhaft" targetRef="Paket_senden" />
+    <bpmn:sequenceFlow id="Flow_fehlerhaft_eingepackt" name="Fehlerhaft eingepackt" sourceRef="Gateway_Einpackung_Fehlerhaft" targetRef="Gateway_Auspacken">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{paket==false}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:exclusiveGateway id="Gateway_Einpackung_Fehlerhaft_Closed">
+      <bpmn:incoming>Flow_03ubi3l</bpmn:incoming>
+      <bpmn:incoming>Flow_1bnro90</bpmn:incoming>
+      <bpmn:outgoing>Flow_006t3wo</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_03ubi3l" sourceRef="Warennummer_ermitteln" targetRef="Gateway_Einpackung_Fehlerhaft_Closed" />
+    <bpmn:sequenceFlow id="Flow_006t3wo" sourceRef="Gateway_Einpackung_Fehlerhaft_Closed" targetRef="Paket_packen" />
+    <bpmn:sequenceFlow id="Flow_1bnro90" sourceRef="Gateway_14evkap" targetRef="Gateway_Einpackung_Fehlerhaft_Closed" />
+    <bpmn:exclusiveGateway id="Gateway_Neusendung_Closed">
+      <bpmn:incoming>Flow_0u4n4gn</bpmn:incoming>
+      <bpmn:incoming>Flow_Erstattung_abgeschlossen</bpmn:incoming>
+      <bpmn:outgoing>Flow_0m33odz</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_0u4n4gn" sourceRef="Paket_senden" targetRef="Gateway_Neusendung_Closed" />
+    <bpmn:sequenceFlow id="Flow_Erstattung_abgeschlossen" sourceRef="Erstattung" targetRef="Gateway_Neusendung_Closed" />
+    <bpmn:sequenceFlow id="Flow_0m33odz" sourceRef="Gateway_Neusendung_Closed" targetRef="Gateway_Parallel_Lager_Neusendung_Closed" />
+    <bpmn:parallelGateway id="Gateway_Parallel_Lager_Neusendung_Closed">
+      <bpmn:incoming>Flow_0m33odz</bpmn:incoming>
+      <bpmn:incoming>Flow_1c2tfla</bpmn:incoming>
+      <bpmn:outgoing>Flow_Ende</bpmn:outgoing>
+    </bpmn:parallelGateway>
+    <bpmn:sequenceFlow id="Flow_1c2tfla" sourceRef="Gateway_Beschaedigt_Close" targetRef="Gateway_Parallel_Lager_Neusendung_Closed" />
+    <bpmn:endEvent id="Retoure_Ende">
+      <bpmn:incoming>Flow_Ende</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:sequenceFlow id="Flow_Ende" sourceRef="Gateway_Parallel_Lager_Neusendung_Closed" targetRef="Retoure_Ende" />
+    <bpmn:userTask id="Paket_senden" name="Paket senden">
+      <bpmn:incoming>Flow_paket_okay</bpmn:incoming>
+      <bpmn:outgoing>Flow_0u4n4gn</bpmn:outgoing>
+    </bpmn:userTask>
+    <bpmn:manualTask id="Ware_einsortieren" name="Ware einsortieren">
+      <bpmn:incoming>Flow_unbeschaedigt</bpmn:incoming>
+      <bpmn:outgoing>Flow_0a9rzst</bpmn:outgoing>
+    </bpmn:manualTask>
+    <bpmn:exclusiveGateway id="Gateway_Auspacken">
+      <bpmn:incoming>Flow_fehlerhaft_eingepackt</bpmn:incoming>
+      <bpmn:outgoing>Flow_normal_auspacken</bpmn:outgoing>
+      <bpmn:outgoing>Flow_luxus_auspacken</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:exclusiveGateway id="Gateway_14evkap">
+      <bpmn:incoming>Flow_04tyvq1</bpmn:incoming>
+      <bpmn:incoming>Flow_0d8lhxo</bpmn:incoming>
+      <bpmn:outgoing>Flow_1bnro90</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="Flow_04tyvq1" sourceRef="Ware_auspacken_luxus" targetRef="Gateway_14evkap" />
+    <bpmn:sequenceFlow id="Flow_0d8lhxo" sourceRef="Ware_auspacken_normal" targetRef="Gateway_14evkap" />
+    <bpmn:sequenceFlow id="Flow_normal_auspacken" name="Normal-verpackung" sourceRef="Gateway_Auspacken" targetRef="Ware_auspacken_normal">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{pakettyp=="Normalverpackung"}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="Flow_luxus_auspacken" name="Luxusverpackung" sourceRef="Gateway_Auspacken" targetRef="Ware_auspacken_luxus">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{pakettyp=="Luxusverpackung"}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="Flow_Erstattung_Datenermittlung" sourceRef="Finanzdaten_ermitteln" targetRef="Erstattung" />
+    <bpmn:serviceTask id="Finanzdaten_ermitteln" name="Finanzdaten ermitteln" camunda:type="external" camunda:topic="financial">
+      <bpmn:extensionElements>
+        <camunda:inputOutput>
+          <camunda:inputParameter name="serviceIdentifier">getData</camunda:inputParameter>
+          <camunda:inputParameter name="kundennummer">${kundennummer}</camunda:inputParameter>
+          <camunda:outputParameter name="iban">${ibanRefund}</camunda:outputParameter>
+        </camunda:inputOutput>
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_Erstattung</bpmn:incoming>
+      <bpmn:outgoing>Flow_Erstattung_Datenermittlung</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:manualTask id="Ware_auspacken_luxus" name="Luxuspaket auspacken">
+      <bpmn:incoming>Flow_luxus_auspacken</bpmn:incoming>
+      <bpmn:outgoing>Flow_04tyvq1</bpmn:outgoing>
+    </bpmn:manualTask>
+    <bpmn:manualTask id="Ware_auspacken_normal" name="Normales Paket auspacken">
+      <bpmn:incoming>Flow_normal_auspacken</bpmn:incoming>
+      <bpmn:outgoing>Flow_0d8lhxo</bpmn:outgoing>
+    </bpmn:manualTask>
+    <bpmn:sequenceFlow id="Flow_0iibopi" sourceRef="Kundendaten_ermitteln" targetRef="Gateway_Neusendung" />
+    <bpmn:serviceTask id="Kundendaten_ermitteln" name="Kundendaten ermitteln" camunda:type="external" camunda:topic="customer">
+      <bpmn:extensionElements>
+        <camunda:inputOutput>
+          <camunda:inputParameter name="kundennummer">${kundennummer}</camunda:inputParameter>
+          <camunda:outputParameter name="vorname">${firstname}</camunda:outputParameter>
+          <camunda:outputParameter name="nachname">${lastname}</camunda:outputParameter>
+        </camunda:inputOutput>
+      </bpmn:extensionElements>
+      <bpmn:incoming>Flow_1gu0k49</bpmn:incoming>
+      <bpmn:outgoing>Flow_0iibopi</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:sequenceFlow id="Flow_0a9rzst" sourceRef="Ware_einsortieren" targetRef="Gateway_Beschaedigt_Close" />
+  </bpmn:process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Retoure">
+      <bpmndi:BPMNEdge id="Flow_0iibopi_di" bpmnElement="Flow_0iibopi">
+        <di:waypoint x="400" y="540" />
+        <di:waypoint x="445" y="540" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_01i7hk6_di" bpmnElement="Flow_Erstattung_Datenermittlung">
+        <di:waypoint x="690" y="540" />
+        <di:waypoint x="970" y="540" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0qjrxz7_di" bpmnElement="Flow_luxus_auspacken">
+        <di:waypoint x="1150" y="675" />
+        <di:waypoint x="1150" y="650" />
+        <di:waypoint x="1060" y="650" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1096" y="623" width="87" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1t3d53q_di" bpmnElement="Flow_normal_auspacken">
+        <di:waypoint x="1150" y="725" />
+        <di:waypoint x="1150" y="750" />
+        <di:waypoint x="1060" y="750" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1111" y="756" width="57" height="27" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0d8lhxo_di" bpmnElement="Flow_0d8lhxo">
+        <di:waypoint x="960" y="750" />
+        <di:waypoint x="880" y="750" />
+        <di:waypoint x="880" y="725" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_04tyvq1_di" bpmnElement="Flow_04tyvq1">
+        <di:waypoint x="960" y="650" />
+        <di:waypoint x="880" y="650" />
+        <di:waypoint x="880" y="675" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_02p7iio_di" bpmnElement="Flow_Ende">
+        <di:waypoint x="1656" y="660" />
+        <di:waypoint x="1705" y="660" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1c2tfla_di" bpmnElement="Flow_1c2tfla">
+        <di:waypoint x="1205" y="430" />
+        <di:waypoint x="1631" y="430" />
+        <di:waypoint x="1631" y="635" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0m33odz_di" bpmnElement="Flow_0m33odz">
+        <di:waypoint x="1555" y="660" />
+        <di:waypoint x="1606" y="660" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0pjcsuy_di" bpmnElement="Flow_Erstattung_abgeschlossen">
+        <di:waypoint x="1070" y="540" />
+        <di:waypoint x="1530" y="540" />
+        <di:waypoint x="1530" y="635" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0u4n4gn_di" bpmnElement="Flow_0u4n4gn">
+        <di:waypoint x="1500" y="870" />
+        <di:waypoint x="1530" y="870" />
+        <di:waypoint x="1530" y="685" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1bnro90_di" bpmnElement="Flow_1bnro90">
+        <di:waypoint x="855" y="700" />
+        <di:waypoint x="760" y="700" />
+        <di:waypoint x="760" y="845" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_006t3wo_di" bpmnElement="Flow_006t3wo">
+        <di:waypoint x="785" y="870" />
+        <di:waypoint x="870" y="870" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_03ubi3l_di" bpmnElement="Flow_03ubi3l">
+        <di:waypoint x="690" y="870" />
+        <di:waypoint x="735" y="870" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1ff93it_di" bpmnElement="Flow_fehlerhaft_eingepackt">
+        <di:waypoint x="1270" y="845" />
+        <di:waypoint x="1270" y="700" />
+        <di:waypoint x="1180" y="700" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1202" y="761" width="55" height="27" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_17na1xt_di" bpmnElement="Flow_paket_okay">
+        <di:waypoint x="1295" y="870" />
+        <di:waypoint x="1400" y="870" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1320" y="852" width="55" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1n6o3h6_di" bpmnElement="Flow_1n6o3h6">
+        <di:waypoint x="1160" y="870" />
+        <di:waypoint x="1245" y="870" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0bhr7g8_di" bpmnElement="Flow_0bhr7g8">
+        <di:waypoint x="970" y="870" />
+        <di:waypoint x="1060" y="870" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0u77zm0_di" bpmnElement="Flow_0u77zm0">
+        <di:waypoint x="520" y="870" />
+        <di:waypoint x="590" y="870" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_17xuhq0_di" bpmnElement="Flow_neusenden">
+        <di:waypoint x="470" y="565" />
+        <di:waypoint x="470" y="830" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="478" y="719" width="63" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0hwn7f3_di" bpmnElement="Flow_Erstattung">
+        <di:waypoint x="495" y="540" />
+        <di:waypoint x="590" y="540" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="507" y="522" width="51" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0a9rzst_di" bpmnElement="Flow_0a9rzst">
+        <di:waypoint x="820" y="160" />
+        <di:waypoint x="1180" y="160" />
+        <di:waypoint x="1180" y="405" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_14jbtgw_di" bpmnElement="Flow_14jbtgw">
+        <di:waypoint x="1085" y="430" />
+        <di:waypoint x="1155" y="430" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0zkq7z5_di" bpmnElement="Flow_0zkq7z5">
+        <di:waypoint x="970" y="320" />
+        <di:waypoint x="1060" y="320" />
+        <di:waypoint x="1060" y="405" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0f171gg_di" bpmnElement="Flow_0f171gg">
+        <di:waypoint x="970" y="430" />
+        <di:waypoint x="1035" y="430" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0t6w55x_di" bpmnElement="Flow_spenden">
+        <di:waypoint x="780" y="345" />
+        <di:waypoint x="780" y="430" />
+        <di:waypoint x="870" y="430" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="798" y="403" width="43" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0zzjxrn_di" bpmnElement="Flow_vernichten">
+        <di:waypoint x="805" y="320" />
+        <di:waypoint x="870" y="320" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="812" y="302" width="51" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0kgxxke_di" bpmnElement="Flow_0kgxxke">
+        <di:waypoint x="690" y="320" />
+        <di:waypoint x="755" y="320" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_01lf19r_di" bpmnElement="Flow_01lf19r">
+        <di:waypoint x="530" y="320" />
+        <di:waypoint x="590" y="320" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0rsh9gw_di" bpmnElement="Flow_beschaedigt">
+        <di:waypoint x="350" y="255" />
+        <di:waypoint x="350" y="320" />
+        <di:waypoint x="430" y="320" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="362" y="285" width="55" height="27" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1ffiujj_di" bpmnElement="Flow_unbeschaedigt">
+        <di:waypoint x="350" y="205" />
+        <di:waypoint x="350" y="160" />
+        <di:waypoint x="720" y="160" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="505" y="166" width="55" height="27" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1gu0k49_di" bpmnElement="Flow_1gu0k49">
+        <di:waypoint x="260" y="402" />
+        <di:waypoint x="260" y="540" />
+        <di:waypoint x="300" y="540" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0eh02jo_di" bpmnElement="Flow_0eh02jo">
+        <di:waypoint x="260" y="352" />
+        <di:waypoint x="260" y="230" />
+        <di:waypoint x="325" y="230" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0emcbml_di" bpmnElement="Flow_Start">
+        <di:waypoint x="188" y="377" />
+        <di:waypoint x="235" y="377" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Retoure_Start">
+        <dc:Bounds x="152" y="359" width="36" height="36" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_0pbw15b_di" bpmnElement="Gateway_Parallel_Lager_Neusendung">
+        <dc:Bounds x="235" y="352" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_12gz2vz_di" bpmnElement="Gateway_Beschaedigt" isMarkerVisible="true">
+        <dc:Bounds x="325" y="205" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_1baqz4f_di" bpmnElement="Gateway_Neusendung" isMarkerVisible="true">
+        <dc:Bounds x="445" y="515" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1l943g0_di" bpmnElement="Warendaten_erfassen">
+        <dc:Bounds x="430" y="280" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_0axy9lw_di" bpmnElement="Vernichtung_ermitteln">
+        <dc:Bounds x="590" y="280" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_0tcbgt9_di" bpmnElement="Gateway_Vernichtung" isMarkerVisible="true">
+        <dc:Bounds x="755" y="295" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_1usozh0_di" bpmnElement="Gateway_Vernichtung_Close" isMarkerVisible="true">
+        <dc:Bounds x="1035" y="405" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_0nb41va_di" bpmnElement="Gateway_Beschaedigt_Close" isMarkerVisible="true">
+        <dc:Bounds x="1155" y="405" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1obx3f0_di" bpmnElement="Ware_vernichten">
+        <dc:Bounds x="870" y="280" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_0swadmc_di" bpmnElement="Ware_spenden">
+        <dc:Bounds x="870" y="390" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_0jhtgen_di" bpmnElement="Erstattung">
+        <dc:Bounds x="970" y="500" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_0dpq7jh_di" bpmnElement="Manuelle_Pruefung">
+        <dc:Bounds x="420" y="830" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_0fnre3x_di" bpmnElement="Warennummer_ermitteln">
+        <dc:Bounds x="590" y="830" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_01orosg_di" bpmnElement="Paket_packen">
+        <dc:Bounds x="870" y="830" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_0sg307t_di" bpmnElement="Paket_pruefen">
+        <dc:Bounds x="1060" y="830" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_0wlcnif_di" bpmnElement="Gateway_Einpackung_Fehlerhaft" isMarkerVisible="true">
+        <dc:Bounds x="1245" y="845" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_0pa451i_di" bpmnElement="Gateway_Einpackung_Fehlerhaft_Closed" isMarkerVisible="true">
+        <dc:Bounds x="735" y="845" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_0hqss9s_di" bpmnElement="Gateway_Neusendung_Closed" isMarkerVisible="true">
+        <dc:Bounds x="1505" y="635" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_05633xf_di" bpmnElement="Gateway_Parallel_Lager_Neusendung_Closed">
+        <dc:Bounds x="1606" y="635" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Event_1ihgrip_di" bpmnElement="Retoure_Ende">
+        <dc:Bounds x="1705" y="642" width="36" height="36" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1ma1os5_di" bpmnElement="Paket_senden">
+        <dc:Bounds x="1400" y="830" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1p3me1t_di" bpmnElement="Ware_einsortieren">
+        <dc:Bounds x="720" y="120" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_0bffnik_di" bpmnElement="Gateway_Auspacken" isMarkerVisible="true">
+        <dc:Bounds x="1125" y="675" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Gateway_14evkap_di" bpmnElement="Gateway_14evkap" isMarkerVisible="true">
+        <dc:Bounds x="855" y="675" width="50" height="50" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1t8f6i7_di" bpmnElement="Finanzdaten_ermitteln">
+        <dc:Bounds x="590" y="500" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1gpa5a1_di" bpmnElement="Ware_auspacken_luxus">
+        <dc:Bounds x="960" y="610" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1xfsrap_di" bpmnElement="Ware_auspacken_normal">
+        <dc:Bounds x="960" y="710" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Activity_1l3qzwt_di" bpmnElement="Kundendaten_ermitteln">
+        <dc:Bounds x="300" y="500" width="100" height="80" />
+      </bpmndi:BPMNShape>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/OnlineSchuhDemo/src/test/java/de/sample/onlineschuhdemo/Testcollection-old.bpmn-testgen b/OnlineSchuhDemo/src/test/java/de/sample/onlineschuhdemo/Testcollection-old.bpmn-testgen
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cf3d82569e8ff8ff34e524b5549dcabf82d6563c 100644
--- a/OnlineSchuhDemo/src/test/java/de/sample/onlineschuhdemo/Testcollection-old.bpmn-testgen
+++ b/OnlineSchuhDemo/src/test/java/de/sample/onlineschuhdemo/Testcollection-old.bpmn-testgen
@@ -0,0 +1,168 @@
+BPMNDiagram process
+with testpackage "de.sample.onlineschuhdemo" with bpmn "retoure.bpmn" with key "Retoure" with dmn : [ "\\schuh_vernichtung_spende.dmn" ] with embedded : [ "\\forms\\warendaten-erfassen-form.html" ] ;
+
+Loop Loop0
+starts with "Gateway_Einpackung_Fehlerhaft"
+follows by "Gateway_Auspacken"
+ends with "Gateway_Einpackung_Fehlerhaft_Closed"
+has complexity 2 passed : [ 0 , 1 ] ;
+
+FlowElement Retoure_Start : StartEvent with inputVariables : [ kundennummer , erstattung , beschaedigt ] ;
+FlowElement Flow_Start : SequenceFlow ;
+FlowElement Gateway_Parallel_Lager_Neusendung : Gateway ;
+FlowElement Flow_0eh02jo : SequenceFlow ;
+FlowElement Gateway_Beschaedigt : Gateway ;
+FlowElement Flow_unbeschaedigt : SequenceFlow ;
+FlowElement Ware_einsortieren : ManualTask ;
+FlowElement Flow_0a9rzst : SequenceFlow ;
+FlowElement Gateway_Beschaedigt_Close : Gateway ;
+FlowElement Flow_1c2tfla : SequenceFlow ;
+FlowElement Flow_1gu0k49 : SequenceFlow ;
+FlowElement Kundendaten_ermitteln : ServiceTask with external : customer ;
+FlowElement Flow_0iibopi : SequenceFlow ;
+FlowElement Gateway_Neusendung : Gateway ;
+FlowElement Flow_Erstattung : SequenceFlow with expression : "#{erstattung}" ;
+FlowElement Finanzdaten_ermitteln : ServiceTask with external : financial with hardcoded inputs : [ serviceIdentifier = "getData" ] ;
+FlowElement Flow_Erstattung_Datenermittlung : SequenceFlow ;
+FlowElement Erstattung : ServiceTask with external : financial with hardcoded inputs : [ serviceIdentifier = "refund" ] ;
+FlowElement Flow_Erstattung_abgeschlossen : SequenceFlow ;
+FlowElement Gateway_Neusendung_Closed : Gateway ;
+FlowElement Flow_0m33odz : SequenceFlow ;
+FlowElement Gateway_Parallel_Lager_Neusendung_Closed : Gateway ;
+FlowElement Flow_Ende : SequenceFlow ;
+FlowElement Retoure_Ende : EndEvent ;
+FlowElement Flow_neusenden : SequenceFlow ;
+FlowElement Manuelle_Pruefung : UserTask ;
+FlowElement Flow_0u77zm0 : SequenceFlow ;
+FlowElement Warennummer_ermitteln : ServiceTask with delegate : "warennummer" ;
+FlowElement Flow_03ubi3l : SequenceFlow ;
+FlowElement Gateway_Einpackung_Fehlerhaft_Closed : Gateway ;
+FlowElement Flow_006t3wo : SequenceFlow ;
+FlowElement Paket_packen : UserTask with inputVariables : [ pakettyp ] ;
+FlowElement Flow_0bhr7g8 : SequenceFlow ;
+FlowElement Paket_pruefen : UserTask with inputVariables : [ paket ] ;
+FlowElement Flow_1n6o3h6 : SequenceFlow ;
+FlowElement Gateway_Einpackung_Fehlerhaft : Gateway ;
+FlowElement Flow_paket_okay : SequenceFlow ;
+FlowElement Paket_senden : UserTask ;
+FlowElement Flow_0u4n4gn : SequenceFlow ;
+FlowElement Flow_fehlerhaft_eingepackt : SequenceFlow with expression : "#{paket==false}" ;
+FlowElement Gateway_Auspacken : Gateway ;
+FlowElement Flow_normal_auspacken : SequenceFlow with expression : "#{pakettyp==\"Normalverpackung\"}" ;
+FlowElement Ware_auspacken_normal : ManualTask ;
+FlowElement Flow_0d8lhxo : SequenceFlow ;
+FlowElement Gateway_14evkap : Gateway ;
+FlowElement Flow_1bnro90 : SequenceFlow ;
+FlowElement Flow_luxus_auspacken : SequenceFlow with expression : "#{pakettyp==\"Luxusverpackung\"}" ;
+FlowElement Ware_auspacken_luxus : ManualTask ;
+FlowElement Flow_04tyvq1 : SequenceFlow ;
+FlowElement Flow_beschaedigt : SequenceFlow with expression : "#{beschaedigt == true}" ;
+FlowElement Warendaten_erfassen : UserTask with inputVariables : [ marke , preis ] ;
+FlowElement Flow_01lf19r : SequenceFlow ;
+FlowElement Vernichtung_ermitteln : BusinessRuleTask ;
+FlowElement Flow_0kgxxke : SequenceFlow ;
+FlowElement Gateway_Vernichtung : Gateway ;
+FlowElement Flow_vernichten : SequenceFlow with expression : "#{vernichten == true}" ;
+FlowElement Ware_vernichten : UserTask ;
+FlowElement Flow_0zkq7z5 : SequenceFlow ;
+FlowElement Gateway_Vernichtung_Close : Gateway ;
+FlowElement Flow_14jbtgw : SequenceFlow ;
+FlowElement Flow_spenden : SequenceFlow with expression : "#{vernichten == false}" ;
+FlowElement Ware_spenden : UserTask ;
+FlowElement Flow_0f171gg : SequenceFlow ;
+
+String kundennummer with proposals : [ ] ;
+String marke with proposals : [ "Luxury Foot" , "Simply Shoe" , "Shoe One" ] ;
+String iban with proposals : [ ] ;
+String vorname with proposals : [ ] ;
+String nachname with proposals : [ ] ;
+String pakettyp with proposals : [ "Normalverpackung" , "Luxusverpackung" ] ;
+String emailGesendet with proposals : [ ] ;
+String firstname with proposals : [ ] ;
+String lastname with proposals : [ ] ;
+String ibanRefund with proposals : [ ] ;
+String confirmationEmailSent with proposals : [ ] ;
+String serviceIdentifier with proposals : [ "getData" , "refund" ] ;
+Integer preis with proposals : [ 350 , 349 , 70 , 71 ] ;
+Boolean erstattung with proposals : [ true , false ] ;
+Boolean paket with proposals : [ true , false ] ;
+Boolean beschaedigt with proposals : [ true , false ] ;
+
+ExternalTopic customer ;
+ExternalTopic financial ;
+
+Flow Flow_0 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_1 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_2 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_3 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Gateway_14evkap , Flow_1bnro90 , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_4 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_5 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_6 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_7 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Gateway_14evkap , Flow_1bnro90 , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Flow_spenden , Ware_spenden , Flow_0f171gg ] ;
+Flow Flow_8 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_spenden , Ware_spenden , Flow_0f171gg , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 ] ;
+Flow Flow_9 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_spenden , Ware_spenden , Flow_0f171gg , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 ] ;
+Flow Flow_10 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_spenden , Ware_spenden , Flow_0f171gg , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Gateway_14evkap , Flow_1bnro90 , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 ] ;
+Flow Flow_11 for process
+with elements : [ Retoure_Start , Flow_Start , Gateway_Parallel_Lager_Neusendung , Flow_0eh02jo , Gateway_Beschaedigt , Flow_beschaedigt , Warendaten_erfassen , Flow_01lf19r , Vernichtung_ermitteln , Flow_0kgxxke , Gateway_Vernichtung , Flow_spenden , Ware_spenden , Flow_0f171gg , Gateway_Vernichtung_Close , Flow_14jbtgw , Gateway_Beschaedigt_Close , Flow_1c2tfla , Flow_1gu0k49 , Kundendaten_ermitteln , Flow_0iibopi , Gateway_Neusendung , Flow_neusenden , Manuelle_Pruefung , Flow_0u77zm0 , Warennummer_ermitteln , Flow_03ubi3l , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_fehlerhaft_eingepackt , Gateway_Auspacken , Flow_luxus_auspacken , Ware_auspacken_luxus , Flow_04tyvq1 , Gateway_14evkap , Flow_1bnro90 , Gateway_Einpackung_Fehlerhaft_Closed , Flow_006t3wo , Paket_packen , Flow_0bhr7g8 , Paket_pruefen , Flow_1n6o3h6 , Gateway_Einpackung_Fehlerhaft , Flow_paket_okay , Paket_senden , Flow_0u4n4gn , Gateway_Neusendung_Closed , Flow_0m33odz , Gateway_Parallel_Lager_Neusendung_Closed , Flow_Ende , Retoure_Ende ]
+without elements : [ Flow_unbeschaedigt , Ware_einsortieren , Flow_0a9rzst , Flow_Erstattung , Finanzdaten_ermitteln , Flow_Erstattung_Datenermittlung , Erstattung , Flow_Erstattung_abgeschlossen , Flow_normal_auspacken , Ware_auspacken_normal , Flow_0d8lhxo , Flow_vernichten , Ware_vernichten , Flow_0zkq7z5 ] ;
+
+DelegateMock Warennummer_ermitteln for Warennummer_ermitteln with delegate "de.sample.onlineschuhdemo.externalaccess.WarennummerErmittelnDelegate" with manual "de.sample.onlineschuhdemo.externalaccess.LagerService" by setter "setLagerService" ;
+
+ExternalServiceMock customerProvider for topic customer
+with rule : if [ kundennummer == "C-123A456" ] set [ firstname = "Max" , lastname = "Mustermann" ] ,
+with rule : if [ kundennummer == "C-987A654" ] set [ firstname = "Erika" , lastname = "Mustermann" ] ;
+
+ExternalServiceMock financialMock for topic financial
+with rule : if [ serviceIdentifier == "getData" , kundennummer == "C-123A456" ] set [ ibanRefund = "DE12345678900000123456" ] ,
+with rule : if [ serviceIdentifier == "getData" , kundennummer == "C-987A654" ] set [ ibanRefund = "DE12345678900000987654" ] ,
+with rule : if [ serviceIdentifier == "refund" , iban == "DE12345678900000123456" ] set [ confirmationEmailSent = "Nein" ] ,
+with rule : if [ serviceIdentifier == "refund" ] set [ confirmationEmailSent = "Ja" ] ;
+
+Test normalverpackungAuspacken for Flow_2
+with variables for Retoure_Start : [ kundennummer = "C-123A456" , erstattung = false , beschaedigt = false ] ,
+with variables for Paket_packen : [ pakettyp = "Normalverpackung" ] ,
+with variables for Paket_pruefen : [ paket = false ] ,
+with variables for Paket_packen : [ pakettyp = "Luxusverpackung" ] ,
+with variables for Paket_pruefen : [ paket = true ]
+with check : [ kundennummer == "C-123A456" , vorname == "Max" , nachname == "Mustermann" , erstattung == false , beschaedigt == false ]
+with mocks : [ Warennummer_ermitteln , customerProvider ] ;
+
+Test vernichtenErstattung for Flow_4
+with variables for Retoure_Start : [ kundennummer = "C-123A456" , erstattung = true , beschaedigt = true ] ,
+with variables for Warendaten_erfassen : [ marke = "Luxury Foot" , preis = 350 ]
+with check : [ kundennummer == "C-123A456" , marke == "Luxury Foot" , iban == "DE12345678900000123456" , vorname == "Max" , nachname == "Mustermann" , emailGesendet == "Nein" , erstattung == true , beschaedigt == true ]
+with mocks : [ financialMock , customerProvider ] ;
+
+Test casetill1 for Flow_0
+with variables for Retoure_Start : [ kundennummer = "123" , erstattung = true , beschaedigt = true ]
+with check : [ kundennummer == "123" , marke == "wer" , iban == "DE80123084556" , vorname == "till" , nachname == "Brinkhus" , pakettyp == "Normalverpackung" , emailGesendet == "Ja" , firstname == "Till" , lastname == "Brinkhus" , ibanRefund == "DE80123084556" , confirmationEmailSent == "Ja" , serviceIdentifier == "getData" , preis == 1234 , erstattung == true , paket == true , beschaedigt == false ]
+with mocks : [ financialMock , customerProvider ] ;
+
+Test casetill2 for Flow_0
+with variables for Retoure_Start : [ kundennummer = "12345" , erstattung = true , beschaedigt = true ]
+with mocks : [ financialMock , customerProvider ] ;
+
+Test TestHenninh for Flow_1
+with mocks : [ Warennummer_ermitteln , customerProvider ] ;
diff --git a/OnlineSchuhDemo/testgen.json b/OnlineSchuhDemo/testgen.json
index e57c02b124c1c1dcd8290c590f329806051395f0..7b2803e1e7d82a1accb295b4259438cce4fdd982 100644
--- a/OnlineSchuhDemo/testgen.json
+++ b/OnlineSchuhDemo/testgen.json
@@ -4,7 +4,7 @@
     "testPath": "\\src\\test\\java\\de\\sample\\onlineschuhdemo\\",
     "modelPath": "\\src\\main\\resources",
     "embeddedFilePath": "\\src\\main\\webapp",
-    "projectRootPath": "C:\\Users\\tillb\\Desktop\\fe_projekt\\fe-pda-testing-tool\\OnlineSchuhDemo"
+    "projectRootPath": "D:\\VSProjects\\fe-pda-testing-tool\\OnlineSchuhDemo"
   },
   "bpmnFiles": [
     {
diff --git a/TestOnlineSchuh/.project b/TestOnlineSchuh/.project
new file mode 100644
index 0000000000000000000000000000000000000000..f12c666e13fd92efe89fb3dbf75dc83252e63e7b
--- /dev/null
+++ b/TestOnlineSchuh/.project
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>OnlineSchuhDemo</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+	</natures>
+</projectDescription>
diff --git a/TestOnlineSchuh/bin/.project b/TestOnlineSchuh/bin/.project
new file mode 100644
index 0000000000000000000000000000000000000000..f12c666e13fd92efe89fb3dbf75dc83252e63e7b
--- /dev/null
+++ b/TestOnlineSchuh/bin/.project
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>OnlineSchuhDemo</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+	</natures>
+</projectDescription>
diff --git a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/bpmn/data/BPMNTestcase.java b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/bpmn/data/BPMNTestcase.java
index 4df2c271ca64ed7c37f91ecd89563edce05ffba3..325c88590c151e7151b934dbb86ef37d78e55e6c 100644
--- a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/bpmn/data/BPMNTestcase.java
+++ b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/bpmn/data/BPMNTestcase.java
@@ -1,65 +1,74 @@
-package de.fhmuenster.masterthesis.Testgenerator.bpmn.data;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class BPMNTestcase {
-
-	private String name;
-	private String flow;
-	private List<TaskVariables> taskVariableList;
-	private List<EndCheck> endChecks;
-	private List<String> mocks;
-	
-	public BPMNTestcase() {
-		this.taskVariableList = new ArrayList<>();
-	}
-	
-	public String getName() {
-		return name;
-	}
-	
-	public void setName(String name) {
-		this.name = name;
-	}
-	
-	public String getFlow() {
-		return flow;
-	}
-	
-	public void setFlow(String flow) {
-		this.flow = flow;
-	}
-	
-	public List<TaskVariables> getTaskVariableList() {
-		return taskVariableList;
-	}
-	
-	public void setTaskVariableList(List<TaskVariables> taskVariableList) {
-		this.taskVariableList = taskVariableList;
-	}
-	
-	public void addTaskVariables(TaskVariables taskVariables) {
-		taskVariableList.add(taskVariables);
-	}
-	
-	public List<EndCheck> getEndChecks() {
-		return endChecks;
-	}
-	
-	public void setEndChecks(List<EndCheck> endChecks) {
-		this.endChecks = endChecks;
-	}
-	
-	public void addEndCheck(EndCheck endCheck) {
-		this.endChecks.add(endCheck);
-	}
-	
-	public List<String> getMocks() {
-		return mocks;
-	}
-	
-	public void setMocks(List<String> mocks) {
-		this.mocks = mocks;
-	}
-}
+package de.fhmuenster.masterthesis.Testgenerator.bpmn.data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BPMNTestcase {
+
+	private String name;
+	private String flow;
+	private List<TaskVariables> taskVariableList;
+	private List<EndCheck> endChecks;
+	private List<String> mocks;
+	private int priority;
+	
+	public BPMNTestcase() {
+		this.taskVariableList = new ArrayList<>();
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	public String getFlow() {
+		return flow;
+	}	
+	
+	public void setFlow(String flow) {
+		this.flow = flow;
+	}
+	
+	public List<TaskVariables> getTaskVariableList() {
+		return taskVariableList;
+	}
+	
+	public void setTaskVariableList(List<TaskVariables> taskVariableList) {
+		this.taskVariableList = taskVariableList;
+	}
+	
+	public void addTaskVariables(TaskVariables taskVariables) {
+		taskVariableList.add(taskVariables);
+	}
+	
+	public List<EndCheck> getEndChecks() {
+		return endChecks;
+	}
+	
+	public void setEndChecks(List<EndCheck> endChecks) {
+		this.endChecks = endChecks;
+	}
+	
+	public void addEndCheck(EndCheck endCheck) {
+		this.endChecks.add(endCheck);
+	}
+	
+	public List<String> getMocks() {
+		return mocks;
+	}
+	
+	public void setMocks(List<String> mocks) {
+		this.mocks = mocks;
+	}
+
+	public int getPriority() {
+		return priority;
+	}
+
+	public void setPriority(int priority) {
+		this.priority = priority;
+	}
+}
diff --git a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/prioritization/PrioritizationMetrics.java b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/prioritization/PrioritizationMetrics.java
new file mode 100644
index 0000000000000000000000000000000000000000..9a8b7f25286e048c6c509339f2434e7f77b4e28d
--- /dev/null
+++ b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/prioritization/PrioritizationMetrics.java
@@ -0,0 +1,201 @@
+package de.fhmuenster.masterthesis.Testgenerator.prioritization;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.test.TestService;
+import de.fhmuenster.masterthesis.serialization.TestgeneratorDSLSerializer;
+import de.fhmuenster.masterthesis.testgeneratorDSL.EndCheck;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Flow;
+import de.fhmuenster.masterthesis.testgeneratorDSL.FlowElementReference;
+import de.fhmuenster.masterthesis.testgeneratorDSL.MockReference;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Test;
+import de.fhmuenster.masterthesis.testgeneratorDSL.VariableDeclaration;
+import de.fhmuenster.masterthesis.testgeneratorDSL.VariableDeclarations;
+
+public class PrioritizationMetrics {
+	
+	@Autowired
+	private TestService testService;
+		
+	public PrioritizationMetrics() {
+		
+	}
+	
+	/**
+	 * Metric 1 (m1)
+	 * @author Tim Flicke, Henning Schmeink
+	 */
+	public List<Flow> m1_flowAffected(List<Flow> newFlows, List<Flow> oldFlows) {
+		List<Flow> affectedFlows = new  ArrayList<Flow>();
+		
+		try
+		{
+			
+			// NEU SCHREIBEN! Objekte iterieren
+			for(int i = 0; i < newFlows.size(); i++)
+			{
+				Flow newFlow = newFlows.get(i);
+				Flow oldFlow = oldFlows.get(i);
+				
+				StringBuilder sNewWith = new StringBuilder();
+				StringBuilder sOldWith = new StringBuilder();
+				
+				StringBuilder sNewWithout = new StringBuilder();
+				StringBuilder sOldWithout = new StringBuilder();
+				
+				// Building strings to compare the elements of each flow	
+				
+				// with Elements = [..]
+				for(FlowElementReference newRefWith : newFlow.getInclElements())
+					sNewWith.append(newRefWith.getRef().getName()).append(", ");
+				
+				for(FlowElementReference oldRefWith : oldFlow.getInclElements())
+					sOldWith.append(oldRefWith.getRef().getName()).append(", ");
+				
+				// without Elements = [..]			
+				for(FlowElementReference newRefWithout : newFlow.getExclElements())
+					sNewWithout.append(newRefWithout.getRef().getName()).append(", ");
+				
+				for(FlowElementReference oldRefWithout : oldFlow.getExclElements())
+					sOldWithout.append(oldRefWithout.getRef().getName()).append(", ");
+				
+				
+				// Console output
+				System.out.println("=========================================");
+				System.out.println("++ Comparing [NEW] Flow " + newFlow.getName() + " with [OLD] Flow " + oldFlow.getName() + " ++");
+				
+				// Included and excluded elements are the same
+				if(sNewWith.toString().equals(sOldWith.toString()) && sNewWithout.toString().equals(sOldWithout.toString()))
+					System.out.println("Equal");
+				else 
+				{
+					affectedFlows.add(newFlow);
+					System.out.println("Not Equal");
+					
+				}
+			}
+
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+		}
+		
+		return affectedFlows;
+	}
+	
+	/**
+	 * Metric 1 (m1)
+	 * @author Tim Flicke, Henning Schmeink
+	 */
+	public void m1_getTestsOfAffectedFlows(List<Flow> affectedFlows, TestgeneratorDSLSerializer newDSL) {
+		List<Test> resultList = new ArrayList<Test>();
+		
+		for(Flow flow : affectedFlows) {
+			resultList = newDSL.getTestsForFlow(flow);
+			
+			for(Test test: resultList) {
+				System.out.println("Priority for Test " + test.getName() + " + 1 (for Flow: " + flow.getName() + ")");
+			}
+		}
+	}
+	
+	
+	/**
+	 * Metric 2 (m1)
+	 * @author Tim Flicke, Henning Schmeink
+	 */
+	public void m2_testsAffected(TestgeneratorDSLSerializer newDSL, TestgeneratorDSLSerializer oldDSL) {
+				
+		try 
+		{
+			List<Test> resultNewTests = new ArrayList<Test>();
+			List<Test> resultOldTests = new ArrayList<Test>();
+			
+			// Lists with flows
+			List<Flow> newFlows = newDSL.getFlows();
+			List<Flow> oldFlows = oldDSL.getFlows();
+			
+			// New Tests from new DSL 
+			for(Flow flow : newFlows) {
+				List<Test> tests = newDSL.getTestsForFlow(flow);
+				resultNewTests.addAll(tests);
+			}
+			
+			// Old Tests from old DSL 
+			for(Flow flow : oldFlows) {
+				List<Test> tests = oldDSL.getTestsForFlow(flow);
+				resultOldTests.addAll(tests);
+			}
+			
+			for(Test newTest : resultNewTests) {
+				
+				for(Test oldTest : resultOldTests) {
+					
+					if(newTest.getName().equals(oldTest.getName()))
+					{
+						System.out.println("COMPARE TEST [NEW]" +  newTest.getName() + " to [OLD] " + oldTest.getName());
+						
+						// ==================================================================================================
+						
+						// Compare Mocks
+						Collection<String> newMocks = new ArrayList<String>();
+						Collection<String> oldMocks = new ArrayList<String>();
+						
+						for(MockReference ref : newTest.getMocks())
+							newMocks.add(ref.getRef().getName());
+						
+						for(MockReference ref : oldTest.getMocks())
+							oldMocks.add(ref.getRef().getName());
+						
+						// Compare size of Mocks
+						if(newMocks.size() != oldMocks.size())
+							System.out.println("Deleted/Added Mock - Change detected");	// change detected 
+						
+						// NewMocks contains all Mocks from old DSL
+						if(!newMocks.containsAll(oldMocks))
+							System.out.println("New DSL doesnt contains all mocks from old DSL"); // change detected
+						
+						// ==================================================================================================					
+						
+						// Compare Checks						
+						Collection<String> newChecks = new ArrayList<String>();
+						Collection<String> oldChecks = new ArrayList<String>();
+						
+						
+
+						for(EndCheck ref : newTest.getEndCheck().getEndChecks())
+							System.out.println(ref); 	// Nur Value brauchen den Key
+							
+						// ==================================================================================================
+						
+						// Compare Variables
+						Collection<String> newVar = new ArrayList<String>();
+						Collection<String> oldVar = new ArrayList<String>();
+						
+						for(VariableDeclarations ref : newTest.getDeclarations())
+						{
+							System.out.println(ref);
+							
+							for(VariableDeclaration var : ref.getVariables())
+							{
+								System.out.println(var);
+							}
+						}
+					}
+				}				
+			}
+			
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+		}
+
+	}	
+}
diff --git a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/prioritization/PrioritizationService.java b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/prioritization/PrioritizationService.java
new file mode 100644
index 0000000000000000000000000000000000000000..6c870f57e0534d69cd2684f10d7cdc76f5111bbc
--- /dev/null
+++ b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/prioritization/PrioritizationService.java
@@ -0,0 +1,55 @@
+package de.fhmuenster.masterthesis.Testgenerator.prioritization;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import de.fhmuenster.masterthesis.Testgenerator.rest.mapper.ObjectMapper;
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.flow.FlowService;
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.project.ProjectService;
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.test.TestService;
+import de.fhmuenster.masterthesis.serialization.TestgeneratorDSLSerializer;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Flow;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Test;
+
+public class PrioritizationService {
+
+	private static final ObjectMapper MAPPER_FLOW = new ObjectMapper()
+			.withFlowConverter();
+	
+	@Autowired
+	private ProjectService projectService;
+	
+	@Autowired
+	private FlowService flowService;
+	
+	@Autowired
+	private TestService testService;
+
+	private PrioritizationMetrics metrics;
+	private TestgeneratorDSLSerializer oldDSL;
+	private TestgeneratorDSLSerializer newDSL;
+	
+	public PrioritizationService(TestgeneratorDSLSerializer oldDSL, TestgeneratorDSLSerializer newDSL) {
+		this.oldDSL = oldDSL;
+		this.newDSL = newDSL;
+		this.metrics = new PrioritizationMetrics();
+	}
+
+	public void prioritize() {
+		
+		// Affected Flows
+		List<Flow> affectedFlows = new ArrayList<Flow>();
+		List<Test> affectedTests = new ArrayList<Test>();
+		
+		// compare old and new flows
+		affectedFlows = this.metrics.m1_flowAffected(newDSL.getFlows(), oldDSL.getFlows());	
+		this.metrics.m1_getTestsOfAffectedFlows(affectedFlows, newDSL);
+		
+		// compare old and new tests
+		this.metrics.m2_testsAffected(newDSL, oldDSL);
+		
+		//testService.get
+	}
+		
+}
diff --git a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/dto/BPMNTestcaseDTO.java b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/dto/BPMNTestcaseDTO.java
index 3e5dd3abfe78738e6ad3b2053bb208c4a938ee91..a5f29b5c1d26d5b4e8fa34d994287b79693b10f0 100644
--- a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/dto/BPMNTestcaseDTO.java
+++ b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/dto/BPMNTestcaseDTO.java
@@ -1,57 +1,66 @@
-package de.fhmuenster.masterthesis.Testgenerator.rest.dto;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class BPMNTestcaseDTO {
-
-	private String name;
-	private String flow;
-	private List<TaskVariablesDTO> taskVariableList;
-	private List<EndCheckDTO> endChecks;
-	private List<String> mocks;
-	
-	public BPMNTestcaseDTO() {
-		this.taskVariableList = new ArrayList<>();
-	}
-	
-	public String getName() {
-		return name;
-	}
-	
-	public void setName(String name) {
-		this.name = name;
-	}
-	
-	public String getFlow() {
-		return flow;
-	}
-	
-	public void setFlow(String flow) {
-		this.flow = flow;
-	}
-	
-	public List<TaskVariablesDTO> getTaskVariableList() {
-		return taskVariableList;
-	}
-	
-	public void setTaskVariableList(List<TaskVariablesDTO> taskVariableList) {
-		this.taskVariableList = taskVariableList;
-	}
-	
-	public List<EndCheckDTO> getEndChecks() {
-		return endChecks;
-	}
-	
-	public void setEndChecks(List<EndCheckDTO> endChecks) {
-		this.endChecks = endChecks;
-	}
-	
-	public List<String> getMocks() {
-		return mocks;
-	}
-	
-	public void setMocks(List<String> mocks) {
-		this.mocks = mocks;
-	}
-}
+package de.fhmuenster.masterthesis.Testgenerator.rest.dto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BPMNTestcaseDTO {
+
+	private String name;
+	private String flow;
+	private List<TaskVariablesDTO> taskVariableList;
+	private List<EndCheckDTO> endChecks;
+	private List<String> mocks;
+	private int priority;
+	
+	public BPMNTestcaseDTO() {
+		this.taskVariableList = new ArrayList<>();
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	public String getFlow() {
+		return flow;
+	}
+	
+	public void setFlow(String flow) {
+		this.flow = flow;
+	}
+	
+	public List<TaskVariablesDTO> getTaskVariableList() {
+		return taskVariableList;
+	}
+	
+	public void setTaskVariableList(List<TaskVariablesDTO> taskVariableList) {
+		this.taskVariableList = taskVariableList;
+	}
+	
+	public List<EndCheckDTO> getEndChecks() {
+		return endChecks;
+	}
+	
+	public void setEndChecks(List<EndCheckDTO> endChecks) {
+		this.endChecks = endChecks;
+	}
+	
+	public List<String> getMocks() {
+		return mocks;
+	}
+	
+	public void setMocks(List<String> mocks) {
+		this.mocks = mocks;
+	}
+
+	public int getPriority() {
+		return priority;
+	}
+
+	public void setPriority(int priority) {
+		this.priority = priority;
+	}
+}
diff --git a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/change/ChangeController.java b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/change/ChangeController.java
index c5d0fafca5adb8824298a84b7dc4fdfd02299ffb..847feecf0a5bef497a8e008bf799bd9224ca1f9d 100644
--- a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/change/ChangeController.java
+++ b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/change/ChangeController.java
@@ -25,6 +25,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
 
 import de.fhmuenster.masterthesis.Testgenerator.migration.MigrationResultWrapper;
 import de.fhmuenster.masterthesis.Testgenerator.migration.MigrationService;
+import de.fhmuenster.masterthesis.Testgenerator.prioritization.PrioritizationService;
 import de.fhmuenster.masterthesis.Testgenerator.rest.dto.MigrationResultWrapperDTO;
 import de.fhmuenster.masterthesis.Testgenerator.rest.dto.BPMNFlowDTO;
 import de.fhmuenster.masterthesis.Testgenerator.rest.dto.BPMNFlowSetDTO;
@@ -72,8 +73,13 @@ public class ChangeController {
 		List<Flow> newFlows = flowService.getFlows(projectForId.getProjectDirectories());		
 		
 
-		//Pfad zu alten Flows und Speichern aller alten Flows
-		String pathOld = "C:\\Users\\tillb\\Desktop\\fe_projekt\\fe-pda-testing-tool\\OnlineSchuhDemo\\dsl_matching\\MatchingTestcollectionOld.bpmn-testgen";
+//		System.out.println("new: " +newFlowsElements);
+		
+		
+//		System.out.println("old flow --------------------------------------------");
+
+		//für alte Flows
+		String pathOld = "D:\\VSProjects\\fe-pda-testing-tool\\OnlineSchuhDemo\\dsl_matching\\MatchingTestcollectionOld.bpmn-testgen";
 		List<Flow> oldFlows = flowService.getOldFlows(pathOld);
 		
 
@@ -138,6 +144,37 @@ public class ChangeController {
 		}
 		
 		return migrationResultWrapperDTO;
+	}
+	
+	/**
+	 *	Function to map the restcall for the frontend. The function will run the prioritization service
+	 *	to prioritize the tests
+	 *	@author Tim Flicke, Henning Schmeink
+	 *	@return ?
+	 */
+	@RequestMapping(path = "/project/{projectId}/prioritization", method = RequestMethod.GET)
+	public void prioritization(@PathVariable(required = true) Long projectId) {
+		
+		Project project = projectService.getProjectForId(projectId);
+		Path testFilePath = ProjectDirectoryUtils.getTestspecificationPath(project.getProjectDirectories());
+				
+		// DSL-Dateien einlesen
+		Path newDSLFile = Paths.get(testFilePath.toString());
+		Path oldDSLFile = Paths.get(project.getProjectDirectories().resolveTestPath(), "Testcollection-old.bpmn-testgen");
 		
+		try {
+			
+			// TODO: Anpassen an das Versionierungskonzept
+			TestgeneratorDSLSerializer oldDSL = new TestgeneratorDSLSerializer(oldDSLFile.toString());
+			TestgeneratorDSLSerializer newDSL = new TestgeneratorDSLSerializer(newDSLFile.toString());	
+			
+			// PrioritizationService erzeugen anhand der alten und neuen DSL
+			PrioritizationService prioritizationService = new PrioritizationService(oldDSL, newDSL);
+			prioritizationService.prioritize();
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}
+
 	}
 }
diff --git a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/converters/TestConverter.java b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/converters/TestConverter.java
index 4bacc7c4498dc3fad3b65df988791bfe132ca7d8..54436ae158000466fd1039fb300fc800d7d0bd40 100644
--- a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/converters/TestConverter.java
+++ b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/converters/TestConverter.java
@@ -1,170 +1,173 @@
-package de.fhmuenster.masterthesis.Testgenerator.rest.service.converters;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.BPMNTestcase;
-import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.EndCheck;
-import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.EndCheckCompareOperator;
-import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.TaskVariables;
-import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.VariableValue;
-import de.fhmuenster.masterthesis.serialization.TestgeneratorDSLObjectCreator;
-import de.fhmuenster.masterthesis.testgeneratorDSL.BooleanVariableEquals;
-import de.fhmuenster.masterthesis.testgeneratorDSL.BooleanVariableNotEquals;
-import de.fhmuenster.masterthesis.testgeneratorDSL.EndChecks;
-import de.fhmuenster.masterthesis.testgeneratorDSL.Flow;
-import de.fhmuenster.masterthesis.testgeneratorDSL.FlowElement;
-import de.fhmuenster.masterthesis.testgeneratorDSL.IntVariableEquals;
-import de.fhmuenster.masterthesis.testgeneratorDSL.IntVariableNotEquals;
-import de.fhmuenster.masterthesis.testgeneratorDSL.Mock;
-import de.fhmuenster.masterthesis.testgeneratorDSL.StringVariableEquals;
-import de.fhmuenster.masterthesis.testgeneratorDSL.StringVariableNotEquals;
-import de.fhmuenster.masterthesis.testgeneratorDSL.Test;
-import de.fhmuenster.masterthesis.testgeneratorDSL.Variable;
-import de.fhmuenster.masterthesis.testgeneratorDSL.VariableDeclaration;
-import de.fhmuenster.masterthesis.testgeneratorDSL.VariableDeclarations;
-import de.fhmuenster.masterthesis.utils.TestgeneratorDSLUtils;
-
-public class TestConverter {
-
-	public static Test getTest(BPMNTestcase testcase, Flow flow, List<FlowElement> flowElements,
-			List<Variable> variables, List<Mock> mocks) {
-		List<VariableDeclarations> variableDeclarationsList = new ArrayList<>();
-		for (TaskVariables entry : testcase.getTaskVariableList()) {
-			String taskName = entry.getTask();
-			FlowElement task = getFlowElement(flowElements, taskName);
-			List<VariableValue> variableValues = entry.getVariableValues();
-
-			List<VariableDeclaration> variableDeclaration = new ArrayList<>();
-			for (VariableValue variableEntry : variableValues) {
-				String variableName = variableEntry.getVariable();
-				Object variableValue = variableEntry.getValue();
-				variableDeclaration.add(VariableConverter.getVariableDeclaration(variables, variableName, variableValue));
-			}
-
-			VariableDeclarations variableDeclarations = TestgeneratorDSLObjectCreator.createVariableDeclarations(task,
-					variableDeclaration);
-			variableDeclarationsList.add(variableDeclarations);
-		}
-		
-		List<de.fhmuenster.masterthesis.testgeneratorDSL.EndCheck> endChecks = new ArrayList<>();
-		for (EndCheck endCheck : testcase.getEndChecks()) {
-			if(EndCheckCompareOperator.EQUALS.equals(endCheck.getCompareOperator())) {
-				String variableName = endCheck.getVariable();
-				Object variableValue = endCheck.getValue();
-				endChecks.add(VariableConverter.getVariableEquals(variables, variableName, variableValue));
-			} 
-			
-			if(EndCheckCompareOperator.NOT_EQUALS.equals(endCheck.getCompareOperator())) {
-				String variableName = endCheck.getVariable();
-				Object variableValue = endCheck.getValue();
-				endChecks.add(VariableConverter.getVariableNotEquals(variables, variableName, variableValue));
-			}
-		}
-
-		EndChecks endCheckDeclaration = TestgeneratorDSLObjectCreator.createEndChecks(endChecks);
-		
-		return TestgeneratorDSLObjectCreator.createTest(testcase.getName(), flow, variableDeclarationsList, endCheckDeclaration, mocks);
-	}
-
-	public static FlowElement getFlowElement(List<FlowElement> flowElements, String name) {
-		Optional<FlowElement> flowElementOpt = flowElements.stream() //
-				.filter(flowElement -> flowElement.getName().equals(name)) //
-				.findAny();
-
-		return flowElementOpt.isPresent() ? flowElementOpt.get() : null;
-	}
-
-	public static BPMNTestcase getBPMNTestcase(Test testcase) {
-		List<TaskVariables> taskVariableList = new ArrayList<>();
-		for (VariableDeclarations variableDeclarations : TestgeneratorDSLUtils.getVariableDeclarations(testcase)) {
-			List<VariableValue> variableValues = new ArrayList<>();
-			for (VariableDeclaration variableDeclaration : TestgeneratorDSLUtils.getVariables(variableDeclarations)) {
-				variableValues.add(VariableConverter.getVariableValue(variableDeclaration));
-			}
-
-			TaskVariables taskVariables = new TaskVariables();
-			taskVariables.setTask(variableDeclarations.getTaskReference().getRef().getName());
-			taskVariables.setVariableValues(variableValues);
-			taskVariableList.add(taskVariables);
-		}
-		
-		List<EndCheck> endCheckList = new ArrayList<>();
-		for (de.fhmuenster.masterthesis.testgeneratorDSL.EndCheck endCheck : TestgeneratorDSLUtils.getEndChecks(testcase)) {
-			endCheckList.add(getEndCheck(endCheck));
-		}
-		
-		List<String> mocks = new ArrayList<>();
-		for(Mock mock : TestgeneratorDSLUtils.getMocks(testcase)) {
-			mocks.add(mock.getName());
-		}
-		
-		BPMNTestcase bpmnTestcase = new BPMNTestcase();
-		bpmnTestcase.setName(testcase.getName());
-		bpmnTestcase.setFlow(testcase.getFlowReference().getRef().getName());
-		bpmnTestcase.setTaskVariableList(taskVariableList);
-		bpmnTestcase.setEndChecks(endCheckList);
-		bpmnTestcase.setMocks(mocks);
-
-		return bpmnTestcase;
-	}
-
-	private static EndCheck getEndCheck(de.fhmuenster.masterthesis.testgeneratorDSL.EndCheck endCheck) {
-		EndCheck endCheckResult = new EndCheck();
-
-		if (endCheck instanceof StringVariableEquals) {
-			String name = ((StringVariableEquals) endCheck).getKey().getName();
-			String value = ((StringVariableEquals) endCheck).getValue();
-			endCheckResult.setVariable(name);
-			endCheckResult.setValue(value);
-			endCheckResult.setCompareOperator(EndCheckCompareOperator.EQUALS);
-		}
-
-		if (endCheck instanceof IntVariableEquals) {
-			String name = ((IntVariableEquals) endCheck).getKey().getName();
-			int value = ((IntVariableEquals) endCheck).getValue();
-			endCheckResult.setVariable(name);
-			endCheckResult.setValue(value);
-			endCheckResult.setCompareOperator(EndCheckCompareOperator.EQUALS);
-		}
-
-		if (endCheck instanceof BooleanVariableEquals) {
-			String name = ((BooleanVariableEquals) endCheck).getKey().getName();
-			de.fhmuenster.masterthesis.testgeneratorDSL.Boolean valueDSL = ((BooleanVariableEquals) endCheck)
-					.getValue();
-			Boolean value = TestgeneratorDSLUtils.mapDSLBoolean(valueDSL);
-			endCheckResult.setVariable(name);
-			endCheckResult.setValue(value);
-			endCheckResult.setCompareOperator(EndCheckCompareOperator.EQUALS);
-		}
-
-		if (endCheck instanceof StringVariableNotEquals) {
-			String name = ((StringVariableNotEquals) endCheck).getKey().getName();
-			String value = ((StringVariableNotEquals) endCheck).getValue();
-			endCheckResult.setVariable(name);
-			endCheckResult.setValue(value);
-			endCheckResult.setCompareOperator(EndCheckCompareOperator.NOT_EQUALS);
-		}
-
-		if (endCheck instanceof IntVariableNotEquals) {
-			String name = ((IntVariableNotEquals) endCheck).getKey().getName();
-			int value = ((IntVariableNotEquals) endCheck).getValue();
-			endCheckResult.setVariable(name);
-			endCheckResult.setValue(value);
-			endCheckResult.setCompareOperator(EndCheckCompareOperator.NOT_EQUALS);
-		}
-
-		if (endCheck instanceof BooleanVariableNotEquals) {
-			String name = ((BooleanVariableNotEquals) endCheck).getKey().getName();
-			de.fhmuenster.masterthesis.testgeneratorDSL.Boolean valueDSL = ((BooleanVariableNotEquals) endCheck)
-					.getValue();
-			Boolean value = TestgeneratorDSLUtils.mapDSLBoolean(valueDSL);
-			endCheckResult.setVariable(name);
-			endCheckResult.setValue(value);
-			endCheckResult.setCompareOperator(EndCheckCompareOperator.NOT_EQUALS);
-		}
-		
-		return endCheckResult;
-	}
-}
+package de.fhmuenster.masterthesis.Testgenerator.rest.service.converters;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.BPMNTestcase;
+import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.EndCheck;
+import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.EndCheckCompareOperator;
+import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.TaskVariables;
+import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.VariableValue;
+import de.fhmuenster.masterthesis.serialization.TestgeneratorDSLObjectCreator;
+import de.fhmuenster.masterthesis.testgeneratorDSL.BooleanVariableEquals;
+import de.fhmuenster.masterthesis.testgeneratorDSL.BooleanVariableNotEquals;
+import de.fhmuenster.masterthesis.testgeneratorDSL.EndChecks;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Flow;
+import de.fhmuenster.masterthesis.testgeneratorDSL.FlowElement;
+import de.fhmuenster.masterthesis.testgeneratorDSL.IntVariableEquals;
+import de.fhmuenster.masterthesis.testgeneratorDSL.IntVariableNotEquals;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Mock;
+import de.fhmuenster.masterthesis.testgeneratorDSL.StringVariableEquals;
+import de.fhmuenster.masterthesis.testgeneratorDSL.StringVariableNotEquals;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Test;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Variable;
+import de.fhmuenster.masterthesis.testgeneratorDSL.VariableDeclaration;
+import de.fhmuenster.masterthesis.testgeneratorDSL.VariableDeclarations;
+import de.fhmuenster.masterthesis.utils.TestgeneratorDSLUtils;
+
+public class TestConverter {
+
+	public static Test getTest(BPMNTestcase testcase, Flow flow, List<FlowElement> flowElements,
+			List<Variable> variables, List<Mock> mocks) {
+		List<VariableDeclarations> variableDeclarationsList = new ArrayList<>();
+		for (TaskVariables entry : testcase.getTaskVariableList()) {
+			String taskName = entry.getTask();
+			FlowElement task = getFlowElement(flowElements, taskName);
+			List<VariableValue> variableValues = entry.getVariableValues();
+
+			List<VariableDeclaration> variableDeclaration = new ArrayList<>();
+			for (VariableValue variableEntry : variableValues) {
+				String variableName = variableEntry.getVariable();
+				Object variableValue = variableEntry.getValue();
+				variableDeclaration.add(VariableConverter.getVariableDeclaration(variables, variableName, variableValue));
+			}
+
+			VariableDeclarations variableDeclarations = TestgeneratorDSLObjectCreator.createVariableDeclarations(task,
+					variableDeclaration);
+			variableDeclarationsList.add(variableDeclarations);
+		}
+		
+		List<de.fhmuenster.masterthesis.testgeneratorDSL.EndCheck> endChecks = new ArrayList<>();
+		for (EndCheck endCheck : testcase.getEndChecks()) {
+			if(EndCheckCompareOperator.EQUALS.equals(endCheck.getCompareOperator())) {
+				String variableName = endCheck.getVariable();
+				Object variableValue = endCheck.getValue();
+				endChecks.add(VariableConverter.getVariableEquals(variables, variableName, variableValue));
+			} 
+			
+			if(EndCheckCompareOperator.NOT_EQUALS.equals(endCheck.getCompareOperator())) {
+				String variableName = endCheck.getVariable();
+				Object variableValue = endCheck.getValue();
+				endChecks.add(VariableConverter.getVariableNotEquals(variables, variableName, variableValue));
+			}
+		}
+
+		EndChecks endCheckDeclaration = TestgeneratorDSLObjectCreator.createEndChecks(endChecks);
+		
+		// @Tim, @Henning Priorität hier hinzufügen
+		int prio = testcase.getPriority();
+		return TestgeneratorDSLObjectCreator.createTest(testcase.getName(), flow, variableDeclarationsList, endCheckDeclaration, mocks, prio);
+	}
+
+	public static FlowElement getFlowElement(List<FlowElement> flowElements, String name) {
+		Optional<FlowElement> flowElementOpt = flowElements.stream() //
+				.filter(flowElement -> flowElement.getName().equals(name)) //
+				.findAny();
+
+		return flowElementOpt.isPresent() ? flowElementOpt.get() : null;
+	}
+
+	public static BPMNTestcase getBPMNTestcase(Test testcase) {
+		List<TaskVariables> taskVariableList = new ArrayList<>();
+		for (VariableDeclarations variableDeclarations : TestgeneratorDSLUtils.getVariableDeclarations(testcase)) {
+			List<VariableValue> variableValues = new ArrayList<>();
+			for (VariableDeclaration variableDeclaration : TestgeneratorDSLUtils.getVariables(variableDeclarations)) {
+				variableValues.add(VariableConverter.getVariableValue(variableDeclaration));
+			}
+
+			TaskVariables taskVariables = new TaskVariables();
+			taskVariables.setTask(variableDeclarations.getTaskReference().getRef().getName());
+			taskVariables.setVariableValues(variableValues);
+			taskVariableList.add(taskVariables);
+		}
+		
+		List<EndCheck> endCheckList = new ArrayList<>();
+		for (de.fhmuenster.masterthesis.testgeneratorDSL.EndCheck endCheck : TestgeneratorDSLUtils.getEndChecks(testcase)) {
+			endCheckList.add(getEndCheck(endCheck));
+		}
+		
+		List<String> mocks = new ArrayList<>();
+		for(Mock mock : TestgeneratorDSLUtils.getMocks(testcase)) {
+			mocks.add(mock.getName());
+		}
+		
+		BPMNTestcase bpmnTestcase = new BPMNTestcase();
+		bpmnTestcase.setName(testcase.getName());
+		bpmnTestcase.setFlow(testcase.getFlowReference().getRef().getName());
+		bpmnTestcase.setTaskVariableList(taskVariableList);
+		bpmnTestcase.setEndChecks(endCheckList);
+		bpmnTestcase.setMocks(mocks);
+		bpmnTestcase.setPriority(testcase.getPriority());
+
+		return bpmnTestcase;
+	}
+
+	private static EndCheck getEndCheck(de.fhmuenster.masterthesis.testgeneratorDSL.EndCheck endCheck) {
+		EndCheck endCheckResult = new EndCheck();
+
+		if (endCheck instanceof StringVariableEquals) {
+			String name = ((StringVariableEquals) endCheck).getKey().getName();
+			String value = ((StringVariableEquals) endCheck).getValue();
+			endCheckResult.setVariable(name);
+			endCheckResult.setValue(value);
+			endCheckResult.setCompareOperator(EndCheckCompareOperator.EQUALS);
+		}
+
+		if (endCheck instanceof IntVariableEquals) {
+			String name = ((IntVariableEquals) endCheck).getKey().getName();
+			int value = ((IntVariableEquals) endCheck).getValue();
+			endCheckResult.setVariable(name);
+			endCheckResult.setValue(value);
+			endCheckResult.setCompareOperator(EndCheckCompareOperator.EQUALS);
+		}
+
+		if (endCheck instanceof BooleanVariableEquals) {
+			String name = ((BooleanVariableEquals) endCheck).getKey().getName();
+			de.fhmuenster.masterthesis.testgeneratorDSL.Boolean valueDSL = ((BooleanVariableEquals) endCheck)
+					.getValue();
+			Boolean value = TestgeneratorDSLUtils.mapDSLBoolean(valueDSL);
+			endCheckResult.setVariable(name);
+			endCheckResult.setValue(value);
+			endCheckResult.setCompareOperator(EndCheckCompareOperator.EQUALS);
+		}
+
+		if (endCheck instanceof StringVariableNotEquals) {
+			String name = ((StringVariableNotEquals) endCheck).getKey().getName();
+			String value = ((StringVariableNotEquals) endCheck).getValue();
+			endCheckResult.setVariable(name);
+			endCheckResult.setValue(value);
+			endCheckResult.setCompareOperator(EndCheckCompareOperator.NOT_EQUALS);
+		}
+
+		if (endCheck instanceof IntVariableNotEquals) {
+			String name = ((IntVariableNotEquals) endCheck).getKey().getName();
+			int value = ((IntVariableNotEquals) endCheck).getValue();
+			endCheckResult.setVariable(name);
+			endCheckResult.setValue(value);
+			endCheckResult.setCompareOperator(EndCheckCompareOperator.NOT_EQUALS);
+		}
+
+		if (endCheck instanceof BooleanVariableNotEquals) {
+			String name = ((BooleanVariableNotEquals) endCheck).getKey().getName();
+			de.fhmuenster.masterthesis.testgeneratorDSL.Boolean valueDSL = ((BooleanVariableNotEquals) endCheck)
+					.getValue();
+			Boolean value = TestgeneratorDSLUtils.mapDSLBoolean(valueDSL);
+			endCheckResult.setVariable(name);
+			endCheckResult.setValue(value);
+			endCheckResult.setCompareOperator(EndCheckCompareOperator.NOT_EQUALS);
+		}
+		
+		return endCheckResult;
+	}
+}
diff --git a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/test/TestController.java b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/test/TestController.java
index 5a16edc0e992a02ccf6509dc5a9e025621b692a4..744767d1172c075f33b2d66f11d3aea4034b0e3c 100644
--- a/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/test/TestController.java
+++ b/Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/rest/service/test/TestController.java
@@ -1,143 +1,142 @@
-package de.fhmuenster.masterthesis.Testgenerator.rest.service.test;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-
-import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.BPMNServiceWithMocks;
-import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.BPMNTestcase;
-import de.fhmuenster.masterthesis.Testgenerator.rest.dto.BPMNTestcaseDTO;
-import de.fhmuenster.masterthesis.Testgenerator.rest.dto.ExternalTopicWithMockDTO;
-import de.fhmuenster.masterthesis.Testgenerator.rest.dto.FlowElementEnhancedDTO;
-import de.fhmuenster.masterthesis.Testgenerator.rest.dto.FlowInfoDTO;
-import de.fhmuenster.masterthesis.Testgenerator.rest.dto.LoopDTO;
-import de.fhmuenster.masterthesis.Testgenerator.rest.dto.ServiceWithMockDTO;
-import de.fhmuenster.masterthesis.Testgenerator.rest.dto.VariableProposalDTO;
-import de.fhmuenster.masterthesis.Testgenerator.rest.mapper.ObjectMapper;
-import de.fhmuenster.masterthesis.Testgenerator.rest.service.flow.FlowService;
-import de.fhmuenster.masterthesis.Testgenerator.rest.service.mock.MockService;
-import de.fhmuenster.masterthesis.Testgenerator.rest.service.project.Project;
-import de.fhmuenster.masterthesis.Testgenerator.rest.service.project.ProjectService;
-import de.fhmuenster.masterthesis.serialization.VariableProposal;
-import de.fhmuenster.masterthesis.testgeneratorDSL.Flow;
-import de.fhmuenster.masterthesis.testgeneratorDSL.FlowElement;
-import de.fhmuenster.masterthesis.testgeneratorDSL.Loop;
-
-@RestController
-@EnableWebMvc
-public class TestController {
-
-	@Autowired
-	private ProjectService projectService;
-	@Autowired
-	private FlowService flowService;
-	@Autowired
-	private TestService testService;
-	@Autowired
-	private MockService mockService;
-
-	private static final ObjectMapper MAPPER = new ObjectMapper() //
-			.withVariableConverter() //
-			.withCompareOperatorConverter(); //
-
-	public TestController() {
-	}
-
-	@RequestMapping(path = "/project/{projectId}/initLoop", method = RequestMethod.POST)
-	public List<LoopDTO> initLoops(@PathVariable(required = true) Long projectId) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		List<Loop> loops = testService.initLoops(projectForId);
-		
-		return MAPPER.mapToList(loops, LoopDTO.class);
-	}
-	
-	@RequestMapping(path = "/project/{projectId}/initTest", method = RequestMethod.POST)
-	public void initTestcollection(@PathVariable(required = true) Long projectId) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		testService.initTestcollection(projectForId);
-	}
-
-	@RequestMapping(path = "/project/{projectId}/test/{testId}", method = RequestMethod.PUT)
-	public void updateTest(@PathVariable(required = true) Long projectId, @PathVariable(required = true) String testId,
-			@RequestBody(required = true) BPMNTestcaseDTO testcaseDTO) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		BPMNTestcase testcase = MAPPER.map(testcaseDTO, BPMNTestcase.class);
-
-		testService.updateTest(testId, testcase, projectForId.getProjectDirectories());
-	}
-
-	@RequestMapping(path = "/project/{projectId}/test", method = RequestMethod.POST)
-	public void addTest(@PathVariable(required = true) Long projectId,
-			@RequestBody(required = true) BPMNTestcaseDTO testcaseDTO) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		BPMNTestcase testcase = MAPPER.map(testcaseDTO, BPMNTestcase.class);
-
-		testService.addTest(testcase, projectForId.getProjectDirectories());
-	}
-
-	@RequestMapping(path = "/project/{projectId}/flow/{flowId}/test", method = RequestMethod.GET)
-	public List<BPMNTestcaseDTO> getTests(@PathVariable(required = true) Long projectId,
-			@PathVariable(required = true) String flowId) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		Flow flow = flowService.getFlow(projectForId.getProjectDirectories(), flowId);
-		List<BPMNTestcase> tests = testService.getTests(projectForId.getProjectDirectories(), flow);
-
-		List<BPMNTestcaseDTO> dtos = MAPPER.mapToList(tests, BPMNTestcaseDTO.class);
-		return dtos;
-	}
-
-	@RequestMapping(path = "/project/{projectId}/test/{testId}", method = RequestMethod.GET)
-	public BPMNTestcaseDTO getTest(@PathVariable(required = true) Long projectId,
-			@PathVariable(required = true) String testId) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		BPMNTestcase test = testService.getTest(projectForId.getProjectDirectories(), testId);
-		return MAPPER.map(test, BPMNTestcaseDTO.class);
-	}
-
-	@RequestMapping(path = "/project/{projectId}/test/{testId}", method = RequestMethod.DELETE)
-	public void deleteTest(@PathVariable(required = true) Long projectId,
-			@PathVariable(required = true) String testId) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		testService.deleteTest(projectForId.getProjectDirectories(), testId);
-	}
-
-	@SuppressWarnings("rawtypes")
-	@RequestMapping(path = "/project/{projectId}/flow/{flowId}/info", method = RequestMethod.GET)
-	public FlowInfoDTO getInfo(@PathVariable(required = true) Long projectId,
-			@PathVariable(required = true) String flowId) {
-		Project projectForId = projectService.getProjectForId(projectId);
-
-		Flow flow = flowService.getFlow(projectForId.getProjectDirectories(), flowId);
-		List<FlowElement> userInputTasks = testService.getUserInputTasks(flow);
-		List<FlowElementEnhancedDTO> userInputDtos = MAPPER.mapToList(userInputTasks, FlowElementEnhancedDTO.class);
-
-		List<VariableProposal<?>> variableProposals = testService
-				.getVariableProposals(projectForId.getProjectDirectories());
-		List<VariableProposalDTO> variableDtos = MAPPER.mapToList(variableProposals, VariableProposalDTO.class);
-
-		BPMNServiceWithMocks servicesWithMocks = mockService.getServicesWithMocks(projectForId.getProjectDirectories(), flow);
-		List<ServiceWithMockDTO> delegateServices = MAPPER.mapToList(servicesWithMocks.getDelegateServices(), ServiceWithMockDTO.class);
-		List<ExternalTopicWithMockDTO> externalTopics = MAPPER.mapToList(servicesWithMocks.getExternalTopics(), ExternalTopicWithMockDTO.class);
-		
-		FlowInfoDTO flowInfoDTO = new FlowInfoDTO();
-		flowInfoDTO.setUserInputs(userInputDtos);
-		flowInfoDTO.setVariables(variableDtos);
-		flowInfoDTO.setDelegateServices(delegateServices);
-		flowInfoDTO.setExternalTopics(externalTopics);
-
-		return flowInfoDTO;
-	}
-}
+package de.fhmuenster.masterthesis.Testgenerator.rest.service.test;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+
+import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.BPMNServiceWithMocks;
+import de.fhmuenster.masterthesis.Testgenerator.bpmn.data.BPMNTestcase;
+import de.fhmuenster.masterthesis.Testgenerator.rest.dto.BPMNTestcaseDTO;
+import de.fhmuenster.masterthesis.Testgenerator.rest.dto.ExternalTopicWithMockDTO;
+import de.fhmuenster.masterthesis.Testgenerator.rest.dto.FlowElementEnhancedDTO;
+import de.fhmuenster.masterthesis.Testgenerator.rest.dto.FlowInfoDTO;
+import de.fhmuenster.masterthesis.Testgenerator.rest.dto.LoopDTO;
+import de.fhmuenster.masterthesis.Testgenerator.rest.dto.ServiceWithMockDTO;
+import de.fhmuenster.masterthesis.Testgenerator.rest.dto.VariableProposalDTO;
+import de.fhmuenster.masterthesis.Testgenerator.rest.mapper.ObjectMapper;
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.flow.FlowService;
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.mock.MockService;
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.project.Project;
+import de.fhmuenster.masterthesis.Testgenerator.rest.service.project.ProjectService;
+import de.fhmuenster.masterthesis.serialization.VariableProposal;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Flow;
+import de.fhmuenster.masterthesis.testgeneratorDSL.FlowElement;
+import de.fhmuenster.masterthesis.testgeneratorDSL.Loop;
+
+@RestController
+@EnableWebMvc
+public class TestController {
+
+	@Autowired
+	private ProjectService projectService;
+	@Autowired
+	private FlowService flowService;
+	@Autowired
+	private TestService testService;
+	@Autowired
+	private MockService mockService;
+
+	private static final ObjectMapper MAPPER = new ObjectMapper() //
+			.withVariableConverter() //
+			.withCompareOperatorConverter(); //
+
+	public TestController() {
+	}
+
+	@RequestMapping(path = "/project/{projectId}/initLoop", method = RequestMethod.POST)
+	public List<LoopDTO> initLoops(@PathVariable(required = true) Long projectId) {
+		Project projectForId = projectService.getProjectForId(projectId);
+
+		List<Loop> loops = testService.initLoops(projectForId);
+		
+		return MAPPER.mapToList(loops, LoopDTO.class);
+	}
+	
+	@RequestMapping(path = "/project/{projectId}/initTest", method = RequestMethod.POST)
+	public void initTestcollection(@PathVariable(required = true) Long projectId) {
+		Project projectForId = projectService.getProjectForId(projectId);
+
+		testService.initTestcollection(projectForId);
+	}
+
+	@RequestMapping(path = "/project/{projectId}/test/{testId}", method = RequestMethod.PUT)
+	public void updateTest(@PathVariable(required = true) Long projectId, @PathVariable(required = true) String testId,
+			@RequestBody(required = true) BPMNTestcaseDTO testcaseDTO) {
+		Project projectForId = projectService.getProjectForId(projectId);
+
+		BPMNTestcase testcase = MAPPER.map(testcaseDTO, BPMNTestcase.class);
+
+		testService.updateTest(testId, testcase, projectForId.getProjectDirectories());
+	}
+
+	@RequestMapping(path = "/project/{projectId}/test", method = RequestMethod.POST)
+	public void addTest(@PathVariable(required = true) Long projectId,
+			@RequestBody(required = true) BPMNTestcaseDTO testcaseDTO) {
+		Project projectForId = projectService.getProjectForId(projectId);
+
+		BPMNTestcase testcase = MAPPER.map(testcaseDTO, BPMNTestcase.class);
+
+		testService.addTest(testcase, projectForId.getProjectDirectories());
+	}
+
+	@RequestMapping(path = "/project/{projectId}/flow/{flowId}/test", method = RequestMethod.GET)
+	public List<BPMNTestcaseDTO> getTests(@PathVariable(required = true) Long projectId,
+			@PathVariable(required = true) String flowId) {
+		Project projectForId = projectService.getProjectForId(projectId);
+
+		Flow flow = flowService.getFlow(projectForId.getProjectDirectories(), flowId);
+		List<BPMNTestcase> tests = testService.getTests(projectForId.getProjectDirectories(), flow);
+
+		List<BPMNTestcaseDTO> dtos = MAPPER.mapToList(tests, BPMNTestcaseDTO.class);
+		return dtos;
+	}
+
+	@RequestMapping(path = "/project/{projectId}/test/{testId}", method = RequestMethod.GET)
+	public BPMNTestcaseDTO getTest(@PathVariable(required = true) Long projectId,
+			@PathVariable(required = true) String testId) {
+		Project projectForId = projectService.getProjectForId(projectId);
+		BPMNTestcase test = testService.getTest(projectForId.getProjectDirectories(), testId);
+		return MAPPER.map(test, BPMNTestcaseDTO.class);
+	}
+
+	@RequestMapping(path = "/project/{projectId}/test/{testId}", method = RequestMethod.DELETE)
+	public void deleteTest(@PathVariable(required = true) Long projectId,
+			@PathVariable(required = true) String testId) {
+		Project projectForId = projectService.getProjectForId(projectId);
+
+		testService.deleteTest(projectForId.getProjectDirectories(), testId);
+	}
+
+	@SuppressWarnings("rawtypes")
+	@RequestMapping(path = "/project/{projectId}/flow/{flowId}/info", method = RequestMethod.GET)
+	public FlowInfoDTO getInfo(@PathVariable(required = true) Long projectId,
+			@PathVariable(required = true) String flowId) {
+		Project projectForId = projectService.getProjectForId(projectId);
+
+		Flow flow = flowService.getFlow(projectForId.getProjectDirectories(), flowId);
+		List<FlowElement> userInputTasks = testService.getUserInputTasks(flow);
+		List<FlowElementEnhancedDTO> userInputDtos = MAPPER.mapToList(userInputTasks, FlowElementEnhancedDTO.class);
+
+		List<VariableProposal<?>> variableProposals = testService
+				.getVariableProposals(projectForId.getProjectDirectories());
+		List<VariableProposalDTO> variableDtos = MAPPER.mapToList(variableProposals, VariableProposalDTO.class);
+
+		BPMNServiceWithMocks servicesWithMocks = mockService.getServicesWithMocks(projectForId.getProjectDirectories(), flow);
+		List<ServiceWithMockDTO> delegateServices = MAPPER.mapToList(servicesWithMocks.getDelegateServices(), ServiceWithMockDTO.class);
+		List<ExternalTopicWithMockDTO> externalTopics = MAPPER.mapToList(servicesWithMocks.getExternalTopics(), ExternalTopicWithMockDTO.class);
+		
+		FlowInfoDTO flowInfoDTO = new FlowInfoDTO();
+		flowInfoDTO.setUserInputs(userInputDtos);
+		flowInfoDTO.setVariables(variableDtos);
+		flowInfoDTO.setDelegateServices(delegateServices);
+		flowInfoDTO.setExternalTopics(externalTopics);
+
+		return flowInfoDTO;
+	}
+}
diff --git a/testgenerator-web/testgenerator-web/src/app/app-routing.module.ts b/testgenerator-web/testgenerator-web/src/app/app-routing.module.ts
index d47aafc67706640a512b32be088991e329b06a66..a8cf4d27a33c7dd0e032beee777ee418ff9c7dd1 100644
--- a/testgenerator-web/testgenerator-web/src/app/app-routing.module.ts
+++ b/testgenerator-web/testgenerator-web/src/app/app-routing.module.ts
@@ -16,7 +16,8 @@ import { DeleteProjectComponent } from './components/delete-project/delete-proje
 import { LoopsComponent } from './components/loops/loops.component';
 import { LoopComponent } from './components/loop/loop.component';
 import { UpdateProjectComponent } from './components/update-project/update-project.component';
-import { MigrationOverviewComponent } from './components/migration-overview/migration-overview.component';
+import { MigrationOverviewComponent } from './migration-overview/migration-overview.component';
+import { PrioritizationOverviewComponent } from './prioritization-overview/prioritization-overview.component';
 
 
 const routes: Routes = [
@@ -36,6 +37,7 @@ const routes: Routes = [
       { path: 'project/:projectId/mocks/manual', component: NewManualMockComponent },
       { path: 'project/:projectId/mocks/manual/:mockId', component: NewManualMockComponent },
       { path: 'project/:projectId/update/migration', component: MigrationOverviewComponent },
+      { path: 'project/:projectId/update/prio', component: PrioritizationOverviewComponent },
       { path: 'project/:projectId/update', component: UpdateProjectComponent }, // new Update Component
       { path: 'impressum', component: ImprintComponent },
       { path: 'notfound', component: NotfoundComponent },
diff --git a/testgenerator-web/testgenerator-web/src/app/app.module.ts b/testgenerator-web/testgenerator-web/src/app/app.module.ts
index 015a77f4c8fad5baca81f563ec59a10eab2e7c8a..ae5cb5cad8d5065563d353f52b3bbe5bddb90209 100644
--- a/testgenerator-web/testgenerator-web/src/app/app.module.ts
+++ b/testgenerator-web/testgenerator-web/src/app/app.module.ts
@@ -30,7 +30,8 @@ import { DeleteProjectComponent } from './components/delete-project/delete-proje
 import { LoopsComponent } from './components/loops/loops.component';
 import { LoopComponent } from './components/loop/loop.component';
 import { UpdateProjectComponent } from './components/update-project/update-project.component';
-import { MigrationOverviewComponent } from './components/migration-overview/migration-overview.component';
+import { MigrationOverviewComponent } from './migration-overview/migration-overview.component';
+import { PrioritizationOverviewComponent } from './prioritization-overview/prioritization-overview.component';
 
 @NgModule({
   declarations: [
@@ -58,7 +59,8 @@ import { MigrationOverviewComponent } from './components/migration-overview/migr
     LoopsComponent,
     LoopComponent,
     UpdateProjectComponent,
-    MigrationOverviewComponent
+    MigrationOverviewComponent,
+    PrioritizationOverviewComponent
   ],
   imports: [
     BrowserModule,
diff --git a/testgenerator-web/testgenerator-web/src/app/components/test/test.component.css b/testgenerator-web/testgenerator-web/src/app/components/test/test.component.css
index f74d5f59860be6711f6c5d05a77e732b6dd79d2c..4c468e72e37bc11eabba9b899cbe357e5af6f137 100644
--- a/testgenerator-web/testgenerator-web/src/app/components/test/test.component.css
+++ b/testgenerator-web/testgenerator-web/src/app/components/test/test.component.css
@@ -1,35 +1,39 @@
-.testgen-taskvariable-container {
-    margin-top: 2rem;
-    margin-bottom: 2rem;
-}
-
-.testgen-testtask {
-    border: 2px solid #4b515d;
-    margin-bottom: 1rem;
-    padding: 1rem;
-    border-radius: 25px;
-}
-
-.testgen-form-radio {
-    margin-top: 1.5rem;
-    margin-bottom: 2rem
-}
-
-.testgen-endcheck-container {
-    margin-top: 2rem;
-    margin-bottom: 2rem;
-}
-
-.testgen-endcheck {
-    border: 2px solid #4b515d;
-    margin-bottom: 1rem;
-    padding: 1rem;
-    border-radius: 25px;
-}
-
-.testgen-mock-container {
-    border: 2px solid #4b515d;
-    margin-bottom: 1rem;
-    padding: 1rem;
-    border-radius: 25px;
+.testgen-taskvariable-container {
+    margin-top: 2rem;
+    margin-bottom: 2rem;
+}
+
+.testgen-testtask {
+    border: 2px solid #4b515d;
+    margin-bottom: 1rem;
+    padding: 1rem;
+    border-radius: 25px;
+}
+
+.testgen-form-radio {
+    margin-top: 1.5rem;
+    margin-bottom: 2rem
+}
+
+.testgen-endcheck-container {
+    margin-top: 2rem;
+    margin-bottom: 2rem;
+}
+
+.testgen-endcheck {
+    border: 2px solid #4b515d;
+    margin-bottom: 1rem;
+    padding: 1rem;
+    border-radius: 25px;
+}
+
+.testgen-mock-container {
+    border: 2px solid #4b515d;
+    margin-bottom: 1rem;
+    padding: 1rem;
+    border-radius: 25px;
+}
+
+.testPrioTitle {
+    line-height: 28px;
 }
\ No newline at end of file
diff --git a/testgenerator-web/testgenerator-web/src/app/components/test/test.component.html b/testgenerator-web/testgenerator-web/src/app/components/test/test.component.html
index 062b56e4b08ce74152cc7c51f022a51cab94c2d7..443775716d9d15f7c662c4fc6787d501e5c5edb1 100644
--- a/testgenerator-web/testgenerator-web/src/app/components/test/test.component.html
+++ b/testgenerator-web/testgenerator-web/src/app/components/test/test.component.html
@@ -1,152 +1,159 @@
-<div class="container">
-    <div class="row row mt-5">
-
-        <div class="col" *ngIf="!isLoading && !isTestLoading && testcase">
-            <h2 class="testgen-headline-message" *ngIf="isEdit" i18n="edit test">Edit test</h2>
-            <h2 class="testgen-headline-message" *ngIf="!isEdit" i18n="create test">Create test</h2>
-
-            <form [formGroup]="formGroup">
-                <div class="md-form form-group">
-                    <input mdbInput mdbValidate type="text" class="form-control" id="name" formControlName="name">
-                    <label for="name" i18n="testcase name" i18n="test name">Testcase name</label>
-                    <p class="text-danger" *ngIf="formGroup.get('name').touched && formGroup.get('name').hasError('required')" i18n="test name required">Testcase name is required.</p>
-                    <p class="text-danger" *ngIf="formGroup.get('name').hasError('testIdTaken')" i18n="test name taken">Testcase name is already taken.</p>
-                </div>
-
-                <div [formGroupName]="'mocks'" class="testgen-mock-container">
-                    <h3 i18n="mock header">Mocks</h3>
-                    <div *ngFor="let delegateService of flowInfo.delegateServices; let i=index">
-                        <div class="form-row">
-                            <div class="col-md-6">
-                                <label for="{{delegateService.serviceName}}"  i18n="mock for service">Mock for {{delegateService.serviceName}}</label>
-                                <select class="browser-default custom-select" formControlName="{{delegateService.serviceName}}">
-                                    <option *ngFor="let mockName of mocks.get(delegateService.serviceName); let mockIndex=index" value="{{mockName}}">{{mockName}}</option>
-                                </select>
-                            </div>
-                        </div>
-                    </div>
-
-                    <div *ngFor="let externalTopic of flowInfo.externalTopics; let i=index">
-                        <div class="form-row">
-                            <div class="col-md-6">
-                                <label for="{{externalTopic.externalTopicName}}" i18n="mock for topic">Mock for {{externalTopic.externalTopicName}}</label>
-                                <select class="browser-default custom-select" formControlName="{{externalTopic.externalTopicName}}">
-                                    <option *ngFor="let mockName of mocks.get(externalTopic.externalTopicName); let mockIndex=index" value="{{mockName}}">{{mockName}}</option>
-                                </select>
-                            </div>
-                        </div>
-                    </div>
-
-                    <div *ngIf="flowInfo.delegateServices.length == 0 && flowInfo.externalTopics.length == 0">
-                        <p i18n="no mocks created">No service tasks were detected for which mocks were already created.</p>
-                    </div>
-                </div>
-
-                <div formArrayName="taskVariableList">
-                    <div class="testgen-taskvariable-container" *ngFor="let taskVariable of testcase.taskVariableList; let i=index">
-                        <hr *ngIf="i > 0">
-                        <div class="testgen-testtask" [formGroupName]="i">
-                            <h3>{{taskVariable.task}}</h3>
-
-                            <div *ngFor="let variableValue of taskVariable.variableValues; let v=index">
-                                <!--String and Integer Fields-->
-                                <div class="md-form form-group" *ngIf="(dataTypes.get(variableValue.variable) == 'java.lang.Integer') || dataTypes.get(variableValue.variable) == 'java.lang.String'">
-                                    <input mdbInput mdbValidate type="number" class="form-control" id="{{variableValue.variable}}-{{i}}-{{v}}"
-                                        formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Integer'">
-                                    <input mdbInput mdbValidate type="text" class="form-control" id="{{variableValue.variable}}-{{i}}-{{v}}"
-                                        formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.String'">
-                                    <label for="{{variableValue.variable}}-{{i}}-{{v}}">{{variableValue.variable}}</label>
-                                    <p *ngIf="getVariableProposals(variableValue.variable).proposals.length > 0" i18n="proposals">Proposals : [{{getVariableProposals(variableValue.variable) | variableProposals}}]</p>
-                                    <p *ngIf="getVariableProposals(variableValue.variable).proposals.length == 0" i18n="no proposals">No proposals</p>
-                                </div>
-
-                                <!--Boolean Checkboxes-->
-                                <div class="testgen-form-radio" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Boolean'">
-                                    <label for="{{variableValue.variable}}-{{i}}-{{v}}">{{variableValue.variable}}</label>
-                                    <div class="custom-control custom-radio">
-                                        <input type="radio" class="custom-control-input" id="{{variableValue.variable}}Yes-{{i}}-{{v}}"
-                                            value="true" formControlName="{{variableValue.variable}}" mdbInput>
-                                        <label class="custom-control-label" for="{{variableValue.variable}}Yes-{{i}}-{{v}}">true</label>
-                                    </div>
-
-                                    <div class="custom-control custom-radio">
-                                        <input type="radio" class="custom-control-input" id="{{variableValue.variable}}No-{{i}}-{{v}}"
-                                            value="false" formControlName="{{variableValue.variable}}" mdbInput>
-                                        <label class="custom-control-label" for="{{variableValue.variable}}No-{{i}}-{{v}}">false</label>
-                                    </div>
-
-                                    <div class="custom-control custom-radio">
-                                        <input type="radio" class="custom-control-input" id="{{variableValue.variable}}Null-{{i}}-{{v}}"
-                                            value="null" formControlName="{{variableValue.variable}}" mdbInput>
-                                        <label class="custom-control-label" for="{{variableValue.variable}}Null-{{i}}-{{v}}">null</label>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <hr>
-
-                <div>
-                    <div class="testgen-endcheck-container">
-                        <div class="testgen-endcheck">
-                            <h3 i18n="end check">Target-Actual-Comparison of the variables</h3>
-
-                            <div formGroupName="endChecks">
-                                <div *ngFor="let variableValue of testcase.endChecks; let i=index">
-
-                                    <!--String and Integer Fields-->
-                                    <div class="md-form form-group" *ngIf="(dataTypes.get(variableValue.variable) == 'java.lang.Integer') || dataTypes.get(variableValue.variable) == 'java.lang.String'">
-                                        <input mdbInput mdbValidate type="number" class="form-control" id="{{variableValue.variable}}"
-                                            formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Integer'">
-                                        <input mdbInput mdbValidate type="text" class="form-control" id="{{variableValue.variable}}"
-                                            formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.String'">
-                                        <label for="{{variableValue.variable}}">{{variableValue.variable}}</label>
-                                    </div>
-
-                                    <!--Boolean Checkboxes-->
-                                    <div class="testgen-form-radio" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Boolean'">
-                                        <label for="{{variableValue.variable}}">{{variableValue.variable}}</label>
-                                        <div class="custom-control custom-radio">
-                                            <input type="radio" class="custom-control-input" id="{{variableValue.variable}}YesEndCheck"
-                                                value="true" formControlName="{{variableValue.variable}}" mdbInput>
-                                            <label class="custom-control-label" for="{{variableValue.variable}}YesEndCheck">true</label>
-                                        </div>
-
-                                        <div class="custom-control custom-radio">
-                                            <input type="radio" class="custom-control-input" id="{{variableValue.variable}}NoEndCheck"
-                                                value="false" formControlName="{{variableValue.variable}}" mdbInput>
-                                            <label class="custom-control-label" for="{{variableValue.variable}}NoEndCheck">false</label>
-                                        </div>
-
-                                        <div class="custom-control custom-radio">
-                                            <input type="radio" class="custom-control-input" id="{{variableValue.variable}}NullEndCheck"
-                                                value="null" formControlName="{{variableValue.variable}}" mdbInput>
-                                            <label class="custom-control-label" for="{{variableValue.variable}}NullEndCheck">null</label>
-                                        </div>
-                                    </div>
-
-                                    <select class="browser-default custom-select" formControlName="{{variableValue.variable}}Compare">
-                                        <option value="==" [attr.selected]="variableValue.compareOperator == '==' ? 'selected' : null" i18n="equals">Equals</option>
-                                        <option value="!=" [attr.selected]="variableValue.compareOperator == '!=' ? 'selected' : null" i18n="not equals">Not equals</option>
-                                    </select>
-
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </form>
-            <div class="testgen-actionbar testgen-actionbar-right">
-                <a class="btn btn-md waves-effect waves-light testgen-danger testgen-btn-rounded" [routerLink]="['../']"
-                    *ngIf="!isEdit" i18n="cancel">Cancel</a>
-                <a class="btn btn-md waves-effect waves-light testgen-danger testgen-btn-rounded" [routerLink]="['../../']"
-                    *ngIf="isEdit" i18n="cancel">Cancel</a>
-                <a class="btn btn-md waves-effect waves-light testgen-primary testgen-btn-rounded" (click)="save()" i18n="save testcase">Save testcase</a>
-            </div>
-        </div>
-    </div>
-</div>
-
+<div class="container">
+    <div class="row row mt-5">
+
+        <div class="col" *ngIf="!isLoading && !isTestLoading && testcase">
+            <h2 class="testgen-headline-message" *ngIf="isEdit" i18n="edit test">Edit test</h2>
+            <h2 class="testgen-headline-message" *ngIf="!isEdit" i18n="create test">Create test</h2>
+
+            <form [formGroup]="formGroup">
+                    <div class="md-form form-group">
+                        <div class="col">
+                            <input mdbInput mdbValidate type="text" class="form-control" id="name" formControlName="name">
+                            <label for="name" i18n="testcase name" i18n="test name">Testcase name</label>
+                            <p class="text-danger" *ngIf="formGroup.get('name').touched && formGroup.get('name').hasError('required')" i18n="test name required">Testcase name is required.</p>
+                            <p class="text-danger" *ngIf="formGroup.get('name').hasError('testIdTaken')" i18n="test name taken">Testcase name is already taken.</p>
+                        </div>
+                        <br>
+                        <div class="col">
+                            <label for="testPriority" i18n="testcase priority">Test priority</label>
+                            <input mdbInput type="number" class="form-control" id="testPriority" value="{{testcase.priority}}">
+                        </div>
+                    </div>
+        
+                <div [formGroupName]="'mocks'" class="testgen-mock-container">
+                    <h3 i18n="mock header">Mocks</h3>
+                    <div *ngFor="let delegateService of flowInfo.delegateServices; let i=index">
+                        <div class="form-row">
+                            <div class="col-md-6">
+                                <label for="{{delegateService.serviceName}}"  i18n="mock for service">Mock for {{delegateService.serviceName}}</label>
+                                <select class="browser-default custom-select" formControlName="{{delegateService.serviceName}}">
+                                    <option *ngFor="let mockName of mocks.get(delegateService.serviceName); let mockIndex=index" value="{{mockName}}">{{mockName}}</option>
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+
+                    <div *ngFor="let externalTopic of flowInfo.externalTopics; let i=index">
+                        <div class="form-row">
+                            <div class="col-md-6">
+                                <label for="{{externalTopic.externalTopicName}}" i18n="mock for topic">Mock for {{externalTopic.externalTopicName}}</label>
+                                <select class="browser-default custom-select" formControlName="{{externalTopic.externalTopicName}}">
+                                    <option *ngFor="let mockName of mocks.get(externalTopic.externalTopicName); let mockIndex=index" value="{{mockName}}">{{mockName}}</option>
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+
+                    <div *ngIf="flowInfo.delegateServices.length == 0 && flowInfo.externalTopics.length == 0">
+                        <p i18n="no mocks created">No service tasks were detected for which mocks were already created.</p>
+                    </div>
+                </div>
+
+                <div formArrayName="taskVariableList">
+                    <div class="testgen-taskvariable-container" *ngFor="let taskVariable of testcase.taskVariableList; let i=index">
+                        <hr *ngIf="i > 0">
+                        <div class="testgen-testtask" [formGroupName]="i">
+                            <h3>{{taskVariable.task}}</h3>
+
+                            <div *ngFor="let variableValue of taskVariable.variableValues; let v=index">
+                                <!--String and Integer Fields-->
+                                <div class="md-form form-group" *ngIf="(dataTypes.get(variableValue.variable) == 'java.lang.Integer') || dataTypes.get(variableValue.variable) == 'java.lang.String'">
+                                    <input mdbInput mdbValidate type="number" class="form-control" id="{{variableValue.variable}}-{{i}}-{{v}}"
+                                        formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Integer'">
+                                    <input mdbInput mdbValidate type="text" class="form-control" id="{{variableValue.variable}}-{{i}}-{{v}}"
+                                        formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.String'">
+                                    <label for="{{variableValue.variable}}-{{i}}-{{v}}">{{variableValue.variable}}</label>
+                                    <p *ngIf="getVariableProposals(variableValue.variable).proposals.length > 0" i18n="proposals">Proposals : [{{getVariableProposals(variableValue.variable) | variableProposals}}]</p>
+                                    <p *ngIf="getVariableProposals(variableValue.variable).proposals.length == 0" i18n="no proposals">No proposals</p>
+                                </div>
+
+                                <!--Boolean Checkboxes-->
+                                <div class="testgen-form-radio" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Boolean'">
+                                    <label for="{{variableValue.variable}}-{{i}}-{{v}}">{{variableValue.variable}}</label>
+                                    <div class="custom-control custom-radio">
+                                        <input type="radio" class="custom-control-input" id="{{variableValue.variable}}Yes-{{i}}-{{v}}"
+                                            value="true" formControlName="{{variableValue.variable}}" mdbInput>
+                                        <label class="custom-control-label" for="{{variableValue.variable}}Yes-{{i}}-{{v}}">true</label>
+                                    </div>
+
+                                    <div class="custom-control custom-radio">
+                                        <input type="radio" class="custom-control-input" id="{{variableValue.variable}}No-{{i}}-{{v}}"
+                                            value="false" formControlName="{{variableValue.variable}}" mdbInput>
+                                        <label class="custom-control-label" for="{{variableValue.variable}}No-{{i}}-{{v}}">false</label>
+                                    </div>
+
+                                    <div class="custom-control custom-radio">
+                                        <input type="radio" class="custom-control-input" id="{{variableValue.variable}}Null-{{i}}-{{v}}"
+                                            value="null" formControlName="{{variableValue.variable}}" mdbInput>
+                                        <label class="custom-control-label" for="{{variableValue.variable}}Null-{{i}}-{{v}}">null</label>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+                <hr>
+
+                <div>
+                    <div class="testgen-endcheck-container">
+                        <div class="testgen-endcheck">
+                            <h3 i18n="end check">Target-Actual-Comparison of the variables</h3>
+
+                            <div formGroupName="endChecks">
+                                <div *ngFor="let variableValue of testcase.endChecks; let i=index">
+
+                                    <!--String and Integer Fields-->
+                                    <div class="md-form form-group" *ngIf="(dataTypes.get(variableValue.variable) == 'java.lang.Integer') || dataTypes.get(variableValue.variable) == 'java.lang.String'">
+                                        <input mdbInput mdbValidate type="number" class="form-control" id="{{variableValue.variable}}"
+                                            formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Integer'">
+                                        <input mdbInput mdbValidate type="text" class="form-control" id="{{variableValue.variable}}"
+                                            formControlName="{{variableValue.variable}}" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.String'">
+                                        <label for="{{variableValue.variable}}">{{variableValue.variable}}</label>
+                                    </div>
+
+                                    <!--Boolean Checkboxes-->
+                                    <div class="testgen-form-radio" *ngIf="dataTypes.get(variableValue.variable) == 'java.lang.Boolean'">
+                                        <label for="{{variableValue.variable}}">{{variableValue.variable}}</label>
+                                        <div class="custom-control custom-radio">
+                                            <input type="radio" class="custom-control-input" id="{{variableValue.variable}}YesEndCheck"
+                                                value="true" formControlName="{{variableValue.variable}}" mdbInput>
+                                            <label class="custom-control-label" for="{{variableValue.variable}}YesEndCheck">true</label>
+                                        </div>
+
+                                        <div class="custom-control custom-radio">
+                                            <input type="radio" class="custom-control-input" id="{{variableValue.variable}}NoEndCheck"
+                                                value="false" formControlName="{{variableValue.variable}}" mdbInput>
+                                            <label class="custom-control-label" for="{{variableValue.variable}}NoEndCheck">false</label>
+                                        </div>
+
+                                        <div class="custom-control custom-radio">
+                                            <input type="radio" class="custom-control-input" id="{{variableValue.variable}}NullEndCheck"
+                                                value="null" formControlName="{{variableValue.variable}}" mdbInput>
+                                            <label class="custom-control-label" for="{{variableValue.variable}}NullEndCheck">null</label>
+                                        </div>
+                                    </div>
+
+                                    <select class="browser-default custom-select" formControlName="{{variableValue.variable}}Compare">
+                                        <option value="==" [attr.selected]="variableValue.compareOperator == '==' ? 'selected' : null" i18n="equals">Equals</option>
+                                        <option value="!=" [attr.selected]="variableValue.compareOperator == '!=' ? 'selected' : null" i18n="not equals">Not equals</option>
+                                    </select>
+
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </form>
+            <div class="testgen-actionbar testgen-actionbar-right">
+                <a class="btn btn-md waves-effect waves-light testgen-danger testgen-btn-rounded" [routerLink]="['../']"
+                    *ngIf="!isEdit" i18n="cancel">Cancel</a>
+                <a class="btn btn-md waves-effect waves-light testgen-danger testgen-btn-rounded" [routerLink]="['../../']"
+                    *ngIf="isEdit" i18n="cancel">Cancel</a>
+                <a class="btn btn-md waves-effect waves-light testgen-primary testgen-btn-rounded" (click)="save()" i18n="save testcase">Save testcase</a>
+            </div>
+        </div>
+    </div>
+</div>
+
 <app-loading *ngIf="isLoading"></app-loading>
\ No newline at end of file
diff --git a/testgenerator-web/testgenerator-web/src/app/components/test/test.component.ts b/testgenerator-web/testgenerator-web/src/app/components/test/test.component.ts
index 150432b3f1fcf8cde5ba157a35ea01838545af81..fdad27cf0054a7f7e1fedca3f9349d90b0539218 100644
--- a/testgenerator-web/testgenerator-web/src/app/components/test/test.component.ts
+++ b/testgenerator-web/testgenerator-web/src/app/components/test/test.component.ts
@@ -1,472 +1,478 @@
-import { Component, OnInit } from '@angular/core';
-import { BPMNTestcase } from 'src/app/models/bpmn-testcase';
-import { Router, ActivatedRoute } from '@angular/router';
-import { TestService } from 'src/app/services/test.service';
-import { FlowInfo } from 'src/app/models/flow-info';
-import { TaskVariables } from 'src/app/models/task-variables';
-import { VariableValue } from 'src/app/models/variable-value';
-import { FormGroup, FormBuilder, FormArray, Validators, FormControl } from '@angular/forms';
-import ValidationUtils from 'src/app/utils/validation';
-import { DataType } from 'src/app/models/data-type';
-import { VariableProposals } from 'src/app/models/variable-proposals';
-import { VariableValueEndCheck } from 'src/app/models/variable-value-endcheck';
-import { ServiceWithMock } from 'src/app/models/service-with-mock';
-import { ExternalTopicWithMocks } from 'src/app/models/external-topic-with-mocks';
-
-@Component({
-  selector: 'app-test',
-  templateUrl: './test.component.html',
-  styleUrls: ['./test.component.css']
-})
-export class TestComponent implements OnInit {
-
-  isTestLoading: boolean;
-  testcase: BPMNTestcase;
-  actualProject: number;
-  actualFlow: string;
-  actualTest: string;
-
-  isInfoLoading: boolean;
-  flowInfo: FlowInfo;
-
-  isEdit: boolean;
-
-  isLoading: boolean;
-
-  dataTypes = new Map<string, string>();
-  dataTypesEnum: typeof DataType = DataType;
-
-  mocks = new Map<string, Array<string>>();
-
-  proposals: Array<Array<VariableProposals>>;
-
-  public formGroup: FormGroup;
-
-  constructor(private _fb: FormBuilder, private testService: TestService, private router: Router, private route: ActivatedRoute) {
-    this.route.params.subscribe(params => {
-      this.actualProject = params['projectId'];
-      this.actualFlow = params['flowId'];
-      this.actualTest = params['testId'];
-    })
-
-    this.initFormGroup();
-  }
-
-  async ngOnInit() {
-    this.isLoading = true;
-
-    await this.loadInfo();
-
-    if (this.actualTest) {
-      this.isEdit = true;
-      await this.loadTest();
-    } else {
-      this.isEdit = false;
-    }
-
-    this.initTestcase();
-
-    this.isLoading = false;
-  }
-
-  /**
-   * Because the structure of the underlying bpmn-process-model isn't known during development, 
-   * the creation of the formGroup and testcase needs to be dynamic. This method creates the formGroup 
-   * on a basis of flowInfo (variables, userTasks) and pushs the corresponding testcase values to this formGroup.
-   * The testcase has two sections.
-   * 1. Input of variable values for user tasks
-   * 2. End checking concrete values at the end of the process instance
-   * 
-   * Both sections are going to be prepared in this method.
-   */
-  initTestcase() {
-    if (!this.testcase) {
-      this.testcase = this.createTestcase(this.actualFlow);
-    }
-
-    //1. Preparing formGroup and testcase-values for user task
-    this.proposals = [];
-    let taskVariableValueList = [];
-    let taskVariableList = [];
-    for (let userInputs of this.flowInfo.userInputs) {
-
-      if (userInputs.inputVariables.length > 0) {
-        let inputProposals = [];
-        let valueObj = {};
-        let variableList = [];
-        for (let variables of userInputs.inputVariables) {
-          inputProposals.push(this.getVariableProposals(variables));
-          let countVariableFrequency = this.countVariable(variables, taskVariableValueList);
-          let value = this.getVariableValueOrDefault(userInputs.name, variables, countVariableFrequency);
-          valueObj[variables] = value;
-          
-          let newVariable = this.createVariableValue(variables, value);
-          variableList.push(newVariable);
-        }
-        
-        this.proposals.push(inputProposals);
-        taskVariableValueList.push(valueObj);
-        let newTaskVariable = this.createTaskVariables(userInputs.name, variableList);
-        this.addTaskVariableFormGroup(variableList);
-        taskVariableList.push(newTaskVariable);
-      }
-    }
-
-    //2. Preparing formGroup and testcase-values for end check
-    let endCheckVariableList = [];
-    let endCheckValueObj = {};
-    let valueObj = {};
-    for (let endCheckVariable of this.flowInfo.variables) {
-      let value = this.getEndCheckValueOrDefault(endCheckVariable.variable);
-      let compareOperator = this.getEndCheckCompareOperatorOrDefault(endCheckVariable.variable);
-      let newVariable = this.createVariableValueEndCheck(endCheckVariable.variable, value, compareOperator);
-
-      valueObj[endCheckVariable.variable] = value;
-      endCheckVariableList.push(newVariable);
-      endCheckValueObj[endCheckVariable.variable] = value;
-      let endCheckCompareField = endCheckVariable.variable + "Compare";
-      endCheckValueObj[endCheckCompareField] = newVariable.compareOperator;
-      this.addEndVariableFormGroup(newVariable);
-    }
-
-
-    //3. Preparing formGroup and testcase-values for mock
-    let mockObj = {};
-    for(let service of this.flowInfo.delegateServices) {
-      this.addMockFormGroupDelegate(service);
-
-      let mockValue = this.getServiceMockOrNull(service.mocks);
-      
-      mockObj[service.serviceName] = mockValue;
-    }
-    for(let externalTopic of this.flowInfo.externalTopics) {
-      this.addMockFormGroupExternal(externalTopic);
-
-      let mockValue = this.getServiceMockOrNull(externalTopic.mocks);
-      
-      mockObj[externalTopic.externalTopicName] = mockValue;
-    }
-
-    //Patching all values to formGroup bound object
-    this.testcase.taskVariableList = taskVariableList;
-    this.testcase.endChecks = endCheckVariableList;
-
-    let formObj = {};
-    formObj['name'] = this.testcase.name;
-    formObj['taskVariableList'] = taskVariableValueList;
-    formObj['endChecks'] = endCheckValueObj;
-    formObj['mocks'] = mockObj;
-
-    console.log(formObj);
-
-    this.formGroup.patchValue(formObj);
-  }
-
-  async loadTest() {
-    this.isTestLoading = true;
-    try {
-      let result = await this.testService.getTest(this.actualProject, this.actualTest);
-      this.testcase = result;
-    } finally {
-      this.isTestLoading = false;
-    }
-  }
-
-  async loadInfo() {
-    this.isInfoLoading = true;
-    try {
-      let result = await this.testService.getInfo(this.actualProject, this.actualFlow);
-      this.flowInfo = result;
-      this.cleanUpServiceWithMocks();
-      this.initVariableDataTypes();
-    } finally {
-      this.isInfoLoading = false;
-    }
-  }
-
-  async save() {
-    if (!this.formGroup.invalid) {
-
-      this.extractForm();
-
-      if (this.isEdit) {
-        await this.updateTestcase();
-      } else {
-        await this.saveTestcase();
-      }
-    } else {
-      ValidationUtils.validateAllFormFields(this.formGroup);
-    }
-  }
-
-  async saveTestcase() {
-    try {
-      await this.testService.createTest(this.actualProject, this.testcase);
-      this.router.navigate(['../'], { relativeTo: this.route });
-    } catch (err) {
-      if (err.status === 409) {
-        this.formGroup.controls['name'].setErrors({ 'testIdTaken': true });
-      } else {
-        throw err;
-      }
-    } finally {
-      //
-    }
-  }
-
-  async updateTestcase() {
-    try {
-      await this.testService.updateTest(this.actualProject, this.actualTest, this.testcase);
-      this.router.navigate(['../../'], { relativeTo: this.route });
-    } catch (err) {
-      if (err.status === 409) {
-        this.formGroup.controls['name'].setErrors({ 'testIdTaken': true });
-      } else {
-        throw err;
-      }
-    } finally {
-      //
-    }
-  }
-
-  createVariableValue(variable: string, value: Object): VariableValue {
-    return {
-      variable: variable,
-      value: value
-    }
-  }
-
-  createVariableValueEndCheck(variable: string, value: Object, compareOperator: string): VariableValueEndCheck {
-    return {
-      variable: variable,
-      value: value,
-      compareOperator: compareOperator
-    }
-  }
-
-  createTaskVariables(id: string, variableList: Array<VariableValue>): TaskVariables {
-    return {
-      task: id,
-      variableValues: variableList
-    }
-  }
-
-  createTestcase(flow: string): BPMNTestcase {
-    return {
-      name: "",
-      flow: flow,
-      taskVariableList: [],
-      endChecks: [],
-      mocks: []
-    }
-  }
-
-  countVariable(variable: string, taskVariableValueList: any[]) {
-    let count = 0;
-    for(let taskVariable of taskVariableValueList) {
-      if(taskVariable[variable]) {
-        count++;
-      }
-    }
-
-    return count;
-  }
-
-  getVariableValueOrDefault(task: string, variable: string, count: number) {
-    for (let taskVariables of this.testcase.taskVariableList) {
-      if (taskVariables.task == task) {
-        for (let variableValue of taskVariables.variableValues) {
-          if (variableValue.variable == variable) {
-            if(count == 0) {
-              if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
-                return variableValue.value.toString();
-              } else {
-                return variableValue.value;
-              }
-            } else {
-              count--;
-            }
-          }
-        }
-      }
-    }
-
-    if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
-      return 'null';
-    }
-
-    return null;
-  }
-
-  getEndCheckValueOrDefault(variable: string) {
-    for (let endCheck of this.testcase.endChecks) {
-      if (endCheck.variable == variable) {
-        if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
-          return endCheck.value.toString();
-        } else {
-          return endCheck.value;
-        }
-      }
-    }
-
-    if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
-      return 'null';
-    }
-
-    return null;
-  }
-
-  getEndCheckCompareOperatorOrDefault(variable: string) {
-    for (let endCheck of this.testcase.endChecks) {
-      if (endCheck.variable == variable) {
-        return endCheck.compareOperator;
-      }
-    }
-
-    return "==";
-  }
-
-  getVariableProposals(variable: string): VariableProposals {
-    for (let infoVariable of this.flowInfo.variables) {
-      if (infoVariable.variable == variable) {
-        return infoVariable;
-      }
-    }
-
-    return null;
-  }
-
-  initFormGroup() {
-    this.formGroup = this._fb.group({
-      name: ['', Validators.compose([Validators.required])],
-      taskVariableList: this._fb.array([
-      ]),
-      endChecks: this._fb.group({}),
-      mocks: this._fb.group({})
-    });
-  }
-
-  private addTaskVariableFormGroup(variableList: Array<VariableValue>) {
-
-    let controls = {};
-    for (let v of variableList) {
-      controls[v.variable] = [''];
-    }
-    let formGroup = this._fb.group(controls);
-
-    this.taskVariableList.push(formGroup);
-  }
-
-  get taskVariableList(): FormArray {
-    return <FormArray>this.formGroup.get('taskVariableList');
-  }
-
-  private addEndVariableFormGroup(variableObj: VariableValueEndCheck) {
-    this.endChecks.addControl(variableObj.variable, new FormControl(''));
-    this.endChecks.addControl(variableObj.variable + "Compare", new FormControl(''));
-  }
-
-  private addMockFormGroupDelegate(serviceWithMocks: ServiceWithMock) {
-    this.mocksForm.addControl(serviceWithMocks.serviceName, new FormControl(''));
-  }
-
-  private addMockFormGroupExternal(externalTopicMocks: ExternalTopicWithMocks) {
-    this.mocksForm.addControl(externalTopicMocks.externalTopicName, new FormControl(''));
-  }
-
-  get endChecks(): FormGroup {
-    return <FormGroup>this.formGroup.get('endChecks');
-  }
-
-  get mocksForm(): FormGroup {
-    return <FormGroup>this.formGroup.get('mocks');
-  }
-
-  private extractForm() {
-    const formValue = this.formGroup.value;
-    console.log(formValue);
-
-    //Extract name
-    this.testcase.name = formValue.name;
-
-    //Extract task-variables
-    for (var _i = 0; _i < formValue.taskVariableList.length; _i++) {
-      let variableValue = formValue.taskVariableList[_i];
-      for (let v of this.testcase.taskVariableList[_i].variableValues) {
-        if (this.dataTypes.get(v.variable) == 'java.lang.Boolean') {
-          v.value = JSON.parse(variableValue[v.variable]);
-        } else {
-          v.value = variableValue[v.variable];
-        }
-      }
-      this.testcase.taskVariableList[_i].variableValues = this.testcase.taskVariableList[_i].variableValues
-        .filter(v => v.value !== null);
-    }
-
-    this.testcase.taskVariableList = this.testcase.taskVariableList
-      .filter(v => v.variableValues.length > 0);
-
-    //Extract endchecks
-    for (var _i = 0; _i < this.testcase.endChecks.length; _i++) {
-      let value = formValue.endChecks[this.testcase.endChecks[_i].variable];
-      if (this.dataTypes.get(this.testcase.endChecks[_i].variable) == 'java.lang.Boolean') {
-        this.testcase.endChecks[_i].value = JSON.parse(value);
-      } else {
-        this.testcase.endChecks[_i].value = value;
-      }
-
-      let variableCompareField = this.testcase.endChecks[_i].variable + "Compare";
-      this.testcase.endChecks[_i].compareOperator = formValue.endChecks[variableCompareField];
-    }
-
-    this.testcase.endChecks = this.testcase.endChecks
-      .filter(v => v.value != null);
-
-    //Extract mocks
-    this.testcase.mocks = [];
-    for(let serviceName of this.mocks.keys()) {
-      let mockName = formValue.mocks[serviceName];
-      if(mockName) {
-        this.testcase.mocks.push(mockName);
-      }
-    }
-
-    console.log(this.testcase);
-  }
-
-  private cleanUpServiceWithMocks() {
-    this.flowInfo.delegateServices = this.flowInfo.delegateServices
-      .filter(delegateService => delegateService.mocks.length > 0);
-
-    this.flowInfo.externalTopics = this.flowInfo.externalTopics
-      .filter(externalTopic => externalTopic.mocks.length > 0);
-
-    this.flowInfo.delegateServices.forEach(service => {
-      let mockNames = service.mocks;
-      mockNames.unshift(null);
-      this.mocks.set(service.serviceName, mockNames);
-    });
-
-    this.flowInfo.externalTopics.forEach(service => {
-      let mockNames = service.mocks;
-      mockNames.unshift(null);
-      this.mocks.set(service.externalTopicName, mockNames);
-    });
-  }
-
-  private initVariableDataTypes() {
-    for (let variableValue of this.flowInfo.variables) {
-      this.dataTypes.set(variableValue.variable, variableValue.type);
-    }
-  }
-
-  private getServiceMockOrNull(serviceMocks: Array<string>) {
-    for(let serviceMockName of serviceMocks) {
-      if(this.testcase.mocks.indexOf(serviceMockName) >= 0) {
-        return serviceMockName;
-      }
-    }
-
-    return null;
-  }
-}
+import { Component, OnInit } from '@angular/core';
+import { BPMNTestcase } from 'src/app/models/bpmn-testcase';
+import { Router, ActivatedRoute } from '@angular/router';
+import { TestService } from 'src/app/services/test.service';
+import { FlowInfo } from 'src/app/models/flow-info';
+import { TaskVariables } from 'src/app/models/task-variables';
+import { VariableValue } from 'src/app/models/variable-value';
+import { FormGroup, FormBuilder, FormArray, Validators, FormControl } from '@angular/forms';
+import ValidationUtils from 'src/app/utils/validation';
+import { DataType } from 'src/app/models/data-type';
+import { VariableProposals } from 'src/app/models/variable-proposals';
+import { VariableValueEndCheck } from 'src/app/models/variable-value-endcheck';
+import { ServiceWithMock } from 'src/app/models/service-with-mock';
+import { ExternalTopicWithMocks } from 'src/app/models/external-topic-with-mocks';
+
+@Component({
+  selector: 'app-test',
+  templateUrl: './test.component.html',
+  styleUrls: ['./test.component.css']
+})
+export class TestComponent implements OnInit {
+
+  isTestLoading: boolean;
+  testcase: BPMNTestcase;
+  actualProject: number;
+  actualFlow: string;
+  actualTest: string;
+
+  isInfoLoading: boolean;
+  flowInfo: FlowInfo;
+
+  isEdit: boolean;
+
+  isLoading: boolean;
+
+  dataTypes = new Map<string, string>();
+  dataTypesEnum: typeof DataType = DataType;
+
+  mocks = new Map<string, Array<string>>();
+
+  proposals: Array<Array<VariableProposals>>;
+
+  public formGroup: FormGroup;
+
+  constructor(private _fb: FormBuilder, private testService: TestService, private router: Router, private route: ActivatedRoute) {
+    this.route.params.subscribe(params => {
+      this.actualProject = params['projectId'];
+      this.actualFlow = params['flowId'];
+      this.actualTest = params['testId'];
+    })
+
+    this.initFormGroup();
+  }
+
+  async ngOnInit() {
+    this.isLoading = true;
+
+    await this.loadInfo();
+
+    if (this.actualTest) {
+      this.isEdit = true;
+      await this.loadTest();
+    } else {
+      this.isEdit = false;
+    }
+
+    this.initTestcase();
+
+    this.isLoading = false;
+  }
+
+  /**
+   * Because the structure of the underlying bpmn-process-model isn't known during development, 
+   * the creation of the formGroup and testcase needs to be dynamic. This method creates the formGroup 
+   * on a basis of flowInfo (variables, userTasks) and pushs the corresponding testcase values to this formGroup.
+   * The testcase has two sections.
+   * 1. Input of variable values for user tasks
+   * 2. End checking concrete values at the end of the process instance
+   * 
+   * Both sections are going to be prepared in this method.
+   */
+  initTestcase() {
+    if (!this.testcase) {
+      this.testcase = this.createTestcase(this.actualFlow);
+    }
+
+    //1. Preparing formGroup and testcase-values for user task
+    this.proposals = [];
+    let taskVariableValueList = [];
+    let taskVariableList = [];
+    for (let userInputs of this.flowInfo.userInputs) {
+
+      if (userInputs.inputVariables.length > 0) {
+        let inputProposals = [];
+        let valueObj = {};
+        let variableList = [];
+        for (let variables of userInputs.inputVariables) {
+          inputProposals.push(this.getVariableProposals(variables));
+          let countVariableFrequency = this.countVariable(variables, taskVariableValueList);
+          let value = this.getVariableValueOrDefault(userInputs.name, variables, countVariableFrequency);
+          valueObj[variables] = value;
+          
+          let newVariable = this.createVariableValue(variables, value);
+          variableList.push(newVariable);
+        }
+        
+        this.proposals.push(inputProposals);
+        taskVariableValueList.push(valueObj);
+        let newTaskVariable = this.createTaskVariables(userInputs.name, variableList);
+        this.addTaskVariableFormGroup(variableList);
+        taskVariableList.push(newTaskVariable);
+      }
+    }
+
+    //2. Preparing formGroup and testcase-values for end check
+    let endCheckVariableList = [];
+    let endCheckValueObj = {};
+    let valueObj = {};
+    for (let endCheckVariable of this.flowInfo.variables) {
+      let value = this.getEndCheckValueOrDefault(endCheckVariable.variable);
+      let compareOperator = this.getEndCheckCompareOperatorOrDefault(endCheckVariable.variable);
+      let newVariable = this.createVariableValueEndCheck(endCheckVariable.variable, value, compareOperator);
+
+      valueObj[endCheckVariable.variable] = value;
+      endCheckVariableList.push(newVariable);
+      endCheckValueObj[endCheckVariable.variable] = value;
+      let endCheckCompareField = endCheckVariable.variable + "Compare";
+      endCheckValueObj[endCheckCompareField] = newVariable.compareOperator;
+      this.addEndVariableFormGroup(newVariable);
+    }
+
+
+    //3. Preparing formGroup and testcase-values for mock
+    let mockObj = {};
+    for(let service of this.flowInfo.delegateServices) {
+      this.addMockFormGroupDelegate(service);
+
+      let mockValue = this.getServiceMockOrNull(service.mocks);
+      
+      mockObj[service.serviceName] = mockValue;
+    }
+    for(let externalTopic of this.flowInfo.externalTopics) {
+      this.addMockFormGroupExternal(externalTopic);
+
+      let mockValue = this.getServiceMockOrNull(externalTopic.mocks);
+      
+      mockObj[externalTopic.externalTopicName] = mockValue;
+    }
+
+    //Patching all values to formGroup bound object
+    this.testcase.taskVariableList = taskVariableList;
+    this.testcase.endChecks = endCheckVariableList;
+
+    let formObj = {};
+    formObj['name'] = this.testcase.name;
+    formObj['priority'] = this.testcase.priority;
+    formObj['taskVariableList'] = taskVariableValueList;
+    formObj['endChecks'] = endCheckValueObj;
+    formObj['mocks'] = mockObj;
+    this.formGroup.patchValue(formObj);
+  }
+
+  async loadTest() {
+    this.isTestLoading = true;
+    try {
+      let result = await this.testService.getTest(this.actualProject, this.actualTest);
+      this.testcase = result;
+    } finally {
+      this.isTestLoading = false;
+    }
+  }
+
+  async loadInfo() {
+    this.isInfoLoading = true;
+    try {
+      let result = await this.testService.getInfo(this.actualProject, this.actualFlow);
+      this.flowInfo = result;
+      this.cleanUpServiceWithMocks();
+      this.initVariableDataTypes();
+    } finally {
+      this.isInfoLoading = false;
+    }
+  }
+
+  async save() {
+    if (!this.formGroup.invalid) {
+
+      this.extractForm();
+
+      /**
+       * Add Priority to the test case
+       * @info wenn die Priorität über ein FormGroupName/NgModel hinzugefügt wird, 
+       * initialisiert der Test nicht. Daher gehen wir über die ID
+       */
+      this.testcase.priority = parseInt((<HTMLInputElement>document.getElementById("testPriority")).value);
+
+      if (this.isEdit) {
+        await this.updateTestcase();
+      } else {
+        await this.saveTestcase();
+      }
+    } else {
+      ValidationUtils.validateAllFormFields(this.formGroup);
+    }
+  }
+
+  async saveTestcase() {
+    try {
+      await this.testService.createTest(this.actualProject, this.testcase);
+      this.router.navigate(['../'], { relativeTo: this.route });
+    } catch (err) {
+      if (err.status === 409) {
+        this.formGroup.controls['name'].setErrors({ 'testIdTaken': true });
+      } else {
+        throw err;
+      }
+    } finally {
+      //
+    }
+  }
+
+  async updateTestcase() {
+    try {
+      // TODO
+      await this.testService.updateTest(this.actualProject, this.actualTest, this.testcase);
+      this.router.navigate(['../../'], { relativeTo: this.route });
+    } catch (err) {
+      if (err.status === 409) {
+        this.formGroup.controls['name'].setErrors({ 'testIdTaken': true });
+      } else {
+        throw err;
+      }
+    } finally {
+      //
+    }
+  }
+
+  createVariableValue(variable: string, value: Object): VariableValue {
+    return {
+      variable: variable,
+      value: value
+    }
+  }
+
+  createVariableValueEndCheck(variable: string, value: Object, compareOperator: string): VariableValueEndCheck {
+    return {
+      variable: variable,
+      value: value,
+      compareOperator: compareOperator
+    }
+  }
+
+  createTaskVariables(id: string, variableList: Array<VariableValue>): TaskVariables {
+    return {
+      task: id,
+      variableValues: variableList
+    }
+  }
+
+  createTestcase(flow: string): BPMNTestcase {
+    return {
+      name: "",
+      flow: flow,
+      taskVariableList: [],
+      endChecks: [],
+      mocks: [],
+      priority: 0
+    }
+  }
+
+  countVariable(variable: string, taskVariableValueList: any[]) {
+    let count = 0;
+    for(let taskVariable of taskVariableValueList) {
+      if(taskVariable[variable]) {
+        count++;
+      }
+    }
+
+    return count;
+  }
+
+  getVariableValueOrDefault(task: string, variable: string, count: number) {
+    for (let taskVariables of this.testcase.taskVariableList) {
+      if (taskVariables.task == task) {
+        for (let variableValue of taskVariables.variableValues) {
+          if (variableValue.variable == variable) {
+            if(count == 0) {
+              if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
+                return variableValue.value.toString();
+              } else {
+                return variableValue.value;
+              }
+            } else {
+              count--;
+            }
+          }
+        }
+      }
+    }
+
+    if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
+      return 'null';
+    }
+
+    return null;
+  }
+
+  getEndCheckValueOrDefault(variable: string) {
+    for (let endCheck of this.testcase.endChecks) {
+      if (endCheck.variable == variable) {
+        if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
+          return endCheck.value.toString();
+        } else {
+          return endCheck.value;
+        }
+      }
+    }
+
+    if (this.dataTypes.get(variable) == 'java.lang.Boolean') {
+      return 'null';
+    }
+
+    return null;
+  }
+
+  getEndCheckCompareOperatorOrDefault(variable: string) {
+    for (let endCheck of this.testcase.endChecks) {
+      if (endCheck.variable == variable) {
+        return endCheck.compareOperator;
+      }
+    }
+
+    return "==";
+  }
+
+  getVariableProposals(variable: string): VariableProposals {
+    for (let infoVariable of this.flowInfo.variables) {
+      if (infoVariable.variable == variable) {
+        return infoVariable;
+      }
+    }
+
+    return null;
+  }
+
+  initFormGroup() {
+    this.formGroup = this._fb.group({
+      name: ['', Validators.compose([Validators.required])],
+      taskVariableList: this._fb.array([
+      ]),
+      endChecks: this._fb.group({}),
+      mocks: this._fb.group({})
+    });
+  }
+
+  private addTaskVariableFormGroup(variableList: Array<VariableValue>) {
+
+    let controls = {};
+    for (let v of variableList) {
+      controls[v.variable] = [''];
+    }
+    let formGroup = this._fb.group(controls);
+
+    this.taskVariableList.push(formGroup);
+  }
+
+  get taskVariableList(): FormArray {
+    return <FormArray>this.formGroup.get('taskVariableList');
+  }
+
+  private addEndVariableFormGroup(variableObj: VariableValueEndCheck) {
+    this.endChecks.addControl(variableObj.variable, new FormControl(''));
+    this.endChecks.addControl(variableObj.variable + "Compare", new FormControl(''));
+  }
+
+  private addMockFormGroupDelegate(serviceWithMocks: ServiceWithMock) {
+    this.mocksForm.addControl(serviceWithMocks.serviceName, new FormControl(''));
+  }
+
+  private addMockFormGroupExternal(externalTopicMocks: ExternalTopicWithMocks) {
+    this.mocksForm.addControl(externalTopicMocks.externalTopicName, new FormControl(''));
+  }
+
+  get endChecks(): FormGroup {
+    return <FormGroup>this.formGroup.get('endChecks');
+  }
+
+  get mocksForm(): FormGroup {
+    return <FormGroup>this.formGroup.get('mocks');
+  }
+
+  private extractForm() {
+    const formValue = this.formGroup.value;
+
+    //Extract name
+    this.testcase.name = formValue.name;
+  
+    //Extract task-variables
+    for (var _i = 0; _i < formValue.taskVariableList.length; _i++) {
+      let variableValue = formValue.taskVariableList[_i];
+      for (let v of this.testcase.taskVariableList[_i].variableValues) {
+        if (this.dataTypes.get(v.variable) == 'java.lang.Boolean') {
+          v.value = JSON.parse(variableValue[v.variable]);
+        } else {
+          v.value = variableValue[v.variable];
+        }
+      }
+      this.testcase.taskVariableList[_i].variableValues = this.testcase.taskVariableList[_i].variableValues
+        .filter(v => v.value !== null);
+    }
+
+    this.testcase.taskVariableList = this.testcase.taskVariableList
+      .filter(v => v.variableValues.length > 0);
+
+    //Extract endchecks
+    for (var _i = 0; _i < this.testcase.endChecks.length; _i++) {
+      let value = formValue.endChecks[this.testcase.endChecks[_i].variable];
+      if (this.dataTypes.get(this.testcase.endChecks[_i].variable) == 'java.lang.Boolean') {
+        this.testcase.endChecks[_i].value = JSON.parse(value);
+      } else {
+        this.testcase.endChecks[_i].value = value;
+      }
+
+      let variableCompareField = this.testcase.endChecks[_i].variable + "Compare";
+      this.testcase.endChecks[_i].compareOperator = formValue.endChecks[variableCompareField];
+    }
+
+    this.testcase.endChecks = this.testcase.endChecks
+      .filter(v => v.value != null);
+
+    //Extract mocks
+    this.testcase.mocks = [];
+    for(let serviceName of this.mocks.keys()) {
+      let mockName = formValue.mocks[serviceName];
+      if(mockName) {
+        this.testcase.mocks.push(mockName);
+      }
+    }
+
+    console.log(this.testcase);
+  }
+
+  private cleanUpServiceWithMocks() {
+    this.flowInfo.delegateServices = this.flowInfo.delegateServices
+      .filter(delegateService => delegateService.mocks.length > 0);
+
+    this.flowInfo.externalTopics = this.flowInfo.externalTopics
+      .filter(externalTopic => externalTopic.mocks.length > 0);
+
+    this.flowInfo.delegateServices.forEach(service => {
+      let mockNames = service.mocks;
+      mockNames.unshift(null);
+      this.mocks.set(service.serviceName, mockNames);
+    });
+
+    this.flowInfo.externalTopics.forEach(service => {
+      let mockNames = service.mocks;
+      mockNames.unshift(null);
+      this.mocks.set(service.externalTopicName, mockNames);
+    });
+  }
+
+  private initVariableDataTypes() {
+    for (let variableValue of this.flowInfo.variables) {
+      this.dataTypes.set(variableValue.variable, variableValue.type);
+    }
+  }
+
+  private getServiceMockOrNull(serviceMocks: Array<string>) {
+    for(let serviceMockName of serviceMocks) {
+      if(this.testcase.mocks.indexOf(serviceMockName) >= 0) {
+        return serviceMockName;
+      }
+    }
+
+    return null;
+  }
+}
diff --git a/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.html b/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.html
index 2bb01c0063716f0b94ccab6c0d80c003fe0d400f..ef9467680b1f6f1fcd3aa2e1e1030240f4aa78ba 100644
--- a/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.html
+++ b/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.html
@@ -27,8 +27,8 @@
                 <a class="testgen-cardmenu testgen-card-basic" [routerLink]="['migration']">Migration starten</a>
             </div>
             <div class="col-md-6">
-                <button mdbBtn type="submit" (click)="parseFiles()" class="testgen-btn-rounded testgen-primary" rounded="true"
-                i18n="compare bpmn">@Henning parseFiles Testing-Button</button>
+                <button mdbBtn type="submit" (click)="callPrio()" class="testgen-btn-rounded testgen-primary" rounded="true"
+                i18n="prio bpmn">@Test Priorisierung</button>
             </div>
         </div>
     </div>
diff --git a/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.ts b/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.ts
index 27a3c9537e7f9115036fa441b01330c3138981d2..61875866295055900bc763eab8b1c8a3ae18f958 100644
--- a/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.ts
+++ b/testgenerator-web/testgenerator-web/src/app/components/update-project/update-project.component.ts
@@ -104,6 +104,17 @@ export class UpdateProjectComponent implements OnInit {
     }
   }
 
+  // Testbutton Priorisierung
+  async callPrio() {
+    let message = await this.prio (this.actualProject)
+    console.log(message)
+  }
+
+  prio(projectId: number): Promise<string> {
+    const url = `${environment.apiBaseUrl}project/${projectId}/prioritization`;
+    return this.http.get(url, {responseType: 'text'}).toPromise();
+  }
+
   async loadDiagram() {
     try {
       let result = await this.fileService.getBackupBPMNDiagram(this.actualProject);
diff --git a/testgenerator-web/testgenerator-web/src/app/models/bpmn-testcase.ts b/testgenerator-web/testgenerator-web/src/app/models/bpmn-testcase.ts
index d78f046cce1d3cf57a033bb642c44fb43011f889..e8e604814c920bde13c5c6924b770b90348a2ea0 100644
--- a/testgenerator-web/testgenerator-web/src/app/models/bpmn-testcase.ts
+++ b/testgenerator-web/testgenerator-web/src/app/models/bpmn-testcase.ts
@@ -1,5 +1,6 @@
 import { TaskVariables } from "./task-variables";
 import { EndCheck } from "./endCheck";
+import * as internal from "stream";
 
 export interface BPMNTestcase {
     name: String;
@@ -7,4 +8,5 @@ export interface BPMNTestcase {
     taskVariableList: Array<TaskVariables>;
     endChecks: Array<EndCheck>;
     mocks: Array<string>;
+    priority: number;
 }
\ No newline at end of file
diff --git a/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.css b/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.css
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.html b/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.html
new file mode 100644
index 0000000000000000000000000000000000000000..690c7ac88f6d2642e4e1c611403338a15294202c
--- /dev/null
+++ b/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.html
@@ -0,0 +1,2 @@
+<p>prioritization-overview works!</p>
+<p>TODO: Priorisierung</p>
\ No newline at end of file
diff --git a/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.spec.ts b/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.spec.ts
new file mode 100644
index 0000000000000000000000000000000000000000..68bdccc89b84c89198ff6ef9112e96b04c00eaba
--- /dev/null
+++ b/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PrioritizationOverviewComponent } from './prioritization-overview.component';
+
+describe('PrioritizationOverviewComponent', () => {
+  let component: PrioritizationOverviewComponent;
+  let fixture: ComponentFixture<PrioritizationOverviewComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ PrioritizationOverviewComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PrioritizationOverviewComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.ts b/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.ts
new file mode 100644
index 0000000000000000000000000000000000000000..05f03d26503e6d7996a05453e660658fdf8baa16
--- /dev/null
+++ b/testgenerator-web/testgenerator-web/src/app/prioritization-overview/prioritization-overview.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-prioritization-overview',
+  templateUrl: './prioritization-overview.component.html',
+  styleUrls: ['./prioritization-overview.component.css']
+})
+export class PrioritizationOverviewComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit(): void {
+  }
+
+}