[527371] Updated BPMN example to VIATRA 2.0
diff --git a/dse/bpmn/.project b/dse/bpmn/.project
new file mode 100644
index 0000000..aa30bdb
--- /dev/null
+++ b/dse/bpmn/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>bpmn</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+	</natures>
+</projectDescription>
diff --git a/dse/bpmn/.settings/org.eclipse.core.resources.prefs b/dse/bpmn/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/dse/bpmn/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.classpath b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.classpath
index c31ca40..428337e 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.classpath
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="xtend-gen"/>
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.settings/org.eclipse.jdt.core.prefs b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.settings/org.eclipse.jdt.core.prefs
index c537b63..0c68a61 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.settings/org.eclipse.jdt.core.prefs
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,7 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/META-INF/MANIFEST.MF b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/META-INF/MANIFEST.MF
index 26db1cb..af22804 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/META-INF/MANIFEST.MF
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: org.eclipse.viatra.dse.examples.bpmn.dse
 Bundle-SymbolicName: org.eclipse.viatra.dse.examples.bpmn.dse
-Bundle-Version: 0.12.0.qualifier
+Bundle-Version: 0.20.0.qualifier
 Export-Package: org.eclipse.viatra.dse.examples.bpmn.dse,
  org.eclipse.viatra.dse.examples.bpmn.genetic,
  org.eclipse.viatra.dse.examples.bpmn.objectives,
@@ -19,5 +19,5 @@
  org.eclipse.xtext.xbase.lib,
  org.eclipse.xtend.lib,
  org.eclipse.xtend.lib.macro
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: org.apache.log4j;version="1.2.15"
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/pom.xml b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/pom.xml
index 10fd4d5..a4d6b69 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/pom.xml
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/pom.xml
@@ -5,10 +5,9 @@
   <parent>
     <groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
     <artifactId>bpmn</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
+    <version>0.20.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
   <artifactId>org.eclipse.viatra.dse.examples.bpmn.dse</artifactId>
-  <version>0.12.0-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/.BpmnRuleProvider.java._trace b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/.BpmnRuleProvider.java._trace
new file mode 100644
index 0000000..b6a7590
--- /dev/null
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/.BpmnRuleProvider.java._trace
Binary files differ
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/.BpmnRuleProvider.xtendbin b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/.BpmnRuleProvider.xtendbin
new file mode 100644
index 0000000..fe97265
--- /dev/null
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/.BpmnRuleProvider.xtendbin
Binary files differ
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/BpmnRuleProvider.java b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/BpmnRuleProvider.java
index dfeca72..a15f5c3 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/BpmnRuleProvider.java
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.dse/xtend-gen/org/eclipse/viatra/dse/examples/bpmn/rules/BpmnRuleProvider.java
@@ -18,7 +18,6 @@
 import org.eclipse.viatra.dse.examples.simplifiedbpmn.BaseElement;
 import org.eclipse.viatra.dse.examples.simplifiedbpmn.ParallelGateway;
 import org.eclipse.viatra.dse.examples.simplifiedbpmn.ResourceInstance;
-import org.eclipse.viatra.dse.examples.simplifiedbpmn.ResourceTypeVariant;
 import org.eclipse.viatra.dse.examples.simplifiedbpmn.SequenceFlow;
 import org.eclipse.viatra.dse.examples.simplifiedbpmn.SimplifiedBPMN;
 import org.eclipse.viatra.dse.examples.simplifiedbpmn.SimplifiedbpmnFactory;
@@ -47,188 +46,94 @@
   
   public BpmnRuleProvider() {
     try {
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _createRule = this.factory.<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher>createRule();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _name = _createRule.name("AllocateTaskToVariantRule");
-      AllocateTaskToVariantQuerySpecification _instance = AllocateTaskToVariantQuerySpecification.instance();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _precondition = _name.precondition(_instance);
-      final IMatchProcessor<AllocateTaskToVariantMatch> _function = new IMatchProcessor<AllocateTaskToVariantMatch>() {
-        @Override
-        public void process(final AllocateTaskToVariantMatch it) {
-          Task _t = it.getT();
-          ResourceTypeVariant _rTV = it.getRTV();
-          _t.setVariant(_rTV);
-        }
+      final IMatchProcessor<AllocateTaskToVariantMatch> _function = (AllocateTaskToVariantMatch it) -> {
+        Task _t = it.getT();
+        _t.setVariant(it.getRTV());
       };
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _action = _precondition.action(_function);
-      BatchTransformationRule<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _build = _action.build();
-      this.allocateRule = _build;
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _createRule_1 = this.factory.<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher>createRule();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _name_1 = _createRule_1.name("FilteredAllocateTaskToVariantRule");
-      AllocateTaskToVariantQuerySpecification _instance_1 = AllocateTaskToVariantQuerySpecification.instance();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _precondition_1 = _name_1.precondition(_instance_1);
-      final IMatchProcessor<AllocateTaskToVariantMatch> _function_1 = new IMatchProcessor<AllocateTaskToVariantMatch>() {
-        @Override
-        public void process(final AllocateTaskToVariantMatch it) {
-          Task _t = it.getT();
-          ResourceTypeVariant _rTV = it.getRTV();
-          _t.setVariant(_rTV);
-        }
+      this.allocateRule = this.factory.<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher>createRule().name("AllocateTaskToVariantRule").precondition(AllocateTaskToVariantQuerySpecification.instance()).action(_function).build();
+      final IMatchProcessor<AllocateTaskToVariantMatch> _function_1 = (AllocateTaskToVariantMatch it) -> {
+        Task _t = it.getT();
+        _t.setVariant(it.getRTV());
       };
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _action_1 = _precondition_1.action(_function_1);
-      final EventFilter<AllocateTaskToVariantMatch> _function_2 = new EventFilter<AllocateTaskToVariantMatch>() {
-        @Override
-        public boolean isProcessable(final AllocateTaskToVariantMatch it) {
-          if ((it.getRTV().getName().equals(BpmnProblems.NOSQL_MEDIUM) || 
-            it.getRTV().getName().equals(BpmnProblems.SQL_MEDIUM))) {
-            return false;
+      final EventFilter<AllocateTaskToVariantMatch> _function_2 = (AllocateTaskToVariantMatch it) -> {
+        if ((it.getRTV().getName().equals(BpmnProblems.NOSQL_MEDIUM) || 
+          it.getRTV().getName().equals(BpmnProblems.SQL_MEDIUM))) {
+          return false;
+        }
+        return true;
+      };
+      this.allocateRuleFilteredExample = this.factory.<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher>createRule().name("FilteredAllocateTaskToVariantRule").precondition(AllocateTaskToVariantQuerySpecification.instance()).action(_function_1).filter(_function_2).build();
+      final IMatchProcessor<CreateResourceMatch> _function_3 = (CreateResourceMatch it) -> {
+        EList<ResourceInstance> _instances = it.getRTV().getInstances();
+        ResourceInstance _createResourceInstance = SimplifiedbpmnFactory.eINSTANCE.createResourceInstance();
+        _instances.add(_createResourceInstance);
+      };
+      this.createResourceRule = this.factory.<CreateResourceMatch, CreateResourceMatcher>createRule().name("CreateResourceRule").precondition(CreateResourceQuerySpecification.instance()).action(_function_3).build();
+      final IMatchProcessor<MakeParallelMatch> _function_4 = (MakeParallelMatch it) -> {
+        SimplifiedBPMN _root = it.getRoot();
+        final SimplifiedBpmnBuilder builder = new SimplifiedBpmnBuilder(_root);
+        final ParallelGateway divergingGateway = builder.createParallelGateway(it.getT1(), it.getT2(), true);
+        final ParallelGateway convergingGateway = builder.createParallelGateway(it.getT1(), it.getT2(), false);
+        EList<SequenceFlow> flows = it.getT1().getInFlows();
+        while ((!flows.isEmpty())) {
+          {
+            final SequenceFlow flow = flows.get(0);
+            flow.setTarget(divergingGateway);
           }
-          return true;
         }
-      };
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _filter = _action_1.filter(_function_2);
-      BatchTransformationRule<AllocateTaskToVariantMatch, AllocateTaskToVariantMatcher> _build_1 = _filter.build();
-      this.allocateRuleFilteredExample = _build_1;
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<CreateResourceMatch, CreateResourceMatcher> _createRule_2 = this.factory.<CreateResourceMatch, CreateResourceMatcher>createRule();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<CreateResourceMatch, CreateResourceMatcher> _name_2 = _createRule_2.name("CreateResourceRule");
-      CreateResourceQuerySpecification _instance_2 = CreateResourceQuerySpecification.instance();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<CreateResourceMatch, CreateResourceMatcher> _precondition_2 = _name_2.precondition(_instance_2);
-      final IMatchProcessor<CreateResourceMatch> _function_3 = new IMatchProcessor<CreateResourceMatch>() {
-        @Override
-        public void process(final CreateResourceMatch it) {
-          ResourceTypeVariant _rTV = it.getRTV();
-          EList<ResourceInstance> _instances = _rTV.getInstances();
-          ResourceInstance _createResourceInstance = SimplifiedbpmnFactory.eINSTANCE.createResourceInstance();
-          _instances.add(_createResourceInstance);
+        flows = it.getT2().getOutFlows();
+        while ((!flows.isEmpty())) {
+          {
+            final SequenceFlow flow = flows.get(0);
+            flow.setSource(convergingGateway);
+          }
         }
+        final SequenceFlow flow = it.getT1().getOutFlows().get(0);
+        EList<SequenceFlow> _sequenceFlows = it.getRoot().getSequenceFlows();
+        _sequenceFlows.remove(flow);
+        flow.setTarget(null);
+        flow.setSource(null);
+        builder.createFlow(divergingGateway, it.getT1());
+        builder.createFlow(divergingGateway, it.getT2());
+        builder.createFlow(it.getT1(), convergingGateway);
+        builder.createFlow(it.getT2(), convergingGateway);
       };
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<CreateResourceMatch, CreateResourceMatcher> _action_2 = _precondition_2.action(_function_3);
-      BatchTransformationRule<CreateResourceMatch, CreateResourceMatcher> _build_2 = _action_2.build();
-      this.createResourceRule = _build_2;
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeParallelMatch, MakeParallelMatcher> _createRule_3 = this.factory.<MakeParallelMatch, MakeParallelMatcher>createRule();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeParallelMatch, MakeParallelMatcher> _name_3 = _createRule_3.name("MakeParallelRule");
-      MakeParallelQuerySpecification _instance_3 = MakeParallelQuerySpecification.instance();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeParallelMatch, MakeParallelMatcher> _precondition_3 = _name_3.precondition(_instance_3);
-      final IMatchProcessor<MakeParallelMatch> _function_4 = new IMatchProcessor<MakeParallelMatch>() {
-        @Override
-        public void process(final MakeParallelMatch it) {
-          SimplifiedBPMN _root = it.getRoot();
-          final SimplifiedBpmnBuilder builder = new SimplifiedBpmnBuilder(_root);
-          Task _t1 = it.getT1();
-          Task _t2 = it.getT2();
-          final ParallelGateway divergingGateway = builder.createParallelGateway(_t1, _t2, true);
-          Task _t1_1 = it.getT1();
-          Task _t2_1 = it.getT2();
-          final ParallelGateway convergingGateway = builder.createParallelGateway(_t1_1, _t2_1, false);
-          Task _t1_2 = it.getT1();
-          EList<SequenceFlow> flows = _t1_2.getInFlows();
-          while ((!flows.isEmpty())) {
-            {
-              final SequenceFlow flow = flows.get(0);
-              flow.setTarget(divergingGateway);
-            }
+      this.makeParallelRule = this.factory.<MakeParallelMatch, MakeParallelMatcher>createRule().name("MakeParallelRule").precondition(MakeParallelQuerySpecification.instance()).action(_function_4).build();
+      final IMatchProcessor<MakeSequentialMatch> _function_5 = (MakeSequentialMatch it) -> {
+        EList<SequenceFlow> flows = it.getT1().getInFlows();
+        final BaseElement divergingGateway = flows.get(0).getSource();
+        it.getRoot().getParallelGateways().remove(divergingGateway);
+        it.getRoot().getSequenceFlows().removeAll(flows);
+        flows.clear();
+        flows = it.getT2().getInFlows();
+        it.getRoot().getSequenceFlows().removeAll(flows);
+        flows.clear();
+        flows = it.getT1().getOutFlows();
+        it.getRoot().getSequenceFlows().removeAll(flows);
+        flows.clear();
+        flows = it.getT2().getOutFlows();
+        final BaseElement convergingGateway = flows.get(0).getTarget();
+        it.getRoot().getParallelGateways().remove(convergingGateway);
+        it.getRoot().getSequenceFlows().removeAll(flows);
+        flows.clear();
+        flows = divergingGateway.getInFlows();
+        while ((!flows.isEmpty())) {
+          {
+            final SequenceFlow flow = flows.get(0);
+            flow.setTarget(it.getT1());
           }
-          Task _t2_2 = it.getT2();
-          EList<SequenceFlow> _outFlows = _t2_2.getOutFlows();
-          flows = _outFlows;
-          while ((!flows.isEmpty())) {
-            {
-              final SequenceFlow flow = flows.get(0);
-              flow.setSource(convergingGateway);
-            }
-          }
-          Task _t1_3 = it.getT1();
-          EList<SequenceFlow> _outFlows_1 = _t1_3.getOutFlows();
-          final SequenceFlow flow = _outFlows_1.get(0);
-          SimplifiedBPMN _root_1 = it.getRoot();
-          EList<SequenceFlow> _sequenceFlows = _root_1.getSequenceFlows();
-          _sequenceFlows.remove(flow);
-          flow.setTarget(null);
-          flow.setSource(null);
-          Task _t1_4 = it.getT1();
-          builder.createFlow(divergingGateway, _t1_4);
-          Task _t2_3 = it.getT2();
-          builder.createFlow(divergingGateway, _t2_3);
-          Task _t1_5 = it.getT1();
-          builder.createFlow(_t1_5, convergingGateway);
-          Task _t2_4 = it.getT2();
-          builder.createFlow(_t2_4, convergingGateway);
         }
-      };
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeParallelMatch, MakeParallelMatcher> _action_3 = _precondition_3.action(_function_4);
-      BatchTransformationRule<MakeParallelMatch, MakeParallelMatcher> _build_3 = _action_3.build();
-      this.makeParallelRule = _build_3;
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeSequentialMatch, MakeSequentialMatcher> _createRule_4 = this.factory.<MakeSequentialMatch, MakeSequentialMatcher>createRule();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeSequentialMatch, MakeSequentialMatcher> _name_4 = _createRule_4.name("MakeSequentialRule");
-      MakeSequentialQuerySpecification _instance_4 = MakeSequentialQuerySpecification.instance();
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeSequentialMatch, MakeSequentialMatcher> _precondition_4 = _name_4.precondition(_instance_4);
-      final IMatchProcessor<MakeSequentialMatch> _function_5 = new IMatchProcessor<MakeSequentialMatch>() {
-        @Override
-        public void process(final MakeSequentialMatch it) {
-          Task _t1 = it.getT1();
-          EList<SequenceFlow> flows = _t1.getInFlows();
-          SequenceFlow _get = flows.get(0);
-          final BaseElement divergingGateway = _get.getSource();
-          SimplifiedBPMN _root = it.getRoot();
-          EList<ParallelGateway> _parallelGateways = _root.getParallelGateways();
-          _parallelGateways.remove(divergingGateway);
-          SimplifiedBPMN _root_1 = it.getRoot();
-          EList<SequenceFlow> _sequenceFlows = _root_1.getSequenceFlows();
-          _sequenceFlows.removeAll(flows);
-          flows.clear();
-          Task _t2 = it.getT2();
-          EList<SequenceFlow> _inFlows = _t2.getInFlows();
-          flows = _inFlows;
-          SimplifiedBPMN _root_2 = it.getRoot();
-          EList<SequenceFlow> _sequenceFlows_1 = _root_2.getSequenceFlows();
-          _sequenceFlows_1.removeAll(flows);
-          flows.clear();
-          Task _t1_1 = it.getT1();
-          EList<SequenceFlow> _outFlows = _t1_1.getOutFlows();
-          flows = _outFlows;
-          SimplifiedBPMN _root_3 = it.getRoot();
-          EList<SequenceFlow> _sequenceFlows_2 = _root_3.getSequenceFlows();
-          _sequenceFlows_2.removeAll(flows);
-          flows.clear();
-          Task _t2_1 = it.getT2();
-          EList<SequenceFlow> _outFlows_1 = _t2_1.getOutFlows();
-          flows = _outFlows_1;
-          SequenceFlow _get_1 = flows.get(0);
-          final BaseElement convergingGateway = _get_1.getTarget();
-          SimplifiedBPMN _root_4 = it.getRoot();
-          EList<ParallelGateway> _parallelGateways_1 = _root_4.getParallelGateways();
-          _parallelGateways_1.remove(convergingGateway);
-          SimplifiedBPMN _root_5 = it.getRoot();
-          EList<SequenceFlow> _sequenceFlows_3 = _root_5.getSequenceFlows();
-          _sequenceFlows_3.removeAll(flows);
-          flows.clear();
-          EList<SequenceFlow> _inFlows_1 = divergingGateway.getInFlows();
-          flows = _inFlows_1;
-          while ((!flows.isEmpty())) {
-            {
-              final SequenceFlow flow = flows.get(0);
-              Task _t1_2 = it.getT1();
-              flow.setTarget(_t1_2);
-            }
+        flows = convergingGateway.getOutFlows();
+        while ((!flows.isEmpty())) {
+          {
+            final SequenceFlow flow = flows.get(0);
+            flow.setSource(it.getT2());
           }
-          EList<SequenceFlow> _outFlows_2 = convergingGateway.getOutFlows();
-          flows = _outFlows_2;
-          while ((!flows.isEmpty())) {
-            {
-              final SequenceFlow flow = flows.get(0);
-              Task _t2_2 = it.getT2();
-              flow.setSource(_t2_2);
-            }
-          }
-          SimplifiedBPMN _root_6 = it.getRoot();
-          SimplifiedBpmnBuilder _simplifiedBpmnBuilder = new SimplifiedBpmnBuilder(_root_6);
-          Task _t1_2 = it.getT1();
-          Task _t2_2 = it.getT2();
-          _simplifiedBpmnBuilder.createFlow(_t1_2, _t2_2);
         }
+        SimplifiedBPMN _root = it.getRoot();
+        new SimplifiedBpmnBuilder(_root).createFlow(it.getT1(), it.getT2());
       };
-      BatchTransformationRuleFactory.BatchTransformationRuleBuilder<MakeSequentialMatch, MakeSequentialMatcher> _action_4 = _precondition_4.action(_function_5);
-      BatchTransformationRule<MakeSequentialMatch, MakeSequentialMatcher> _build_4 = _action_4.build();
-      this.makeSequentialRule = _build_4;
+      this.makeSequentialRule = this.factory.<MakeSequentialMatch, MakeSequentialMatcher>createRule().name("MakeSequentialRule").precondition(MakeSequentialQuerySpecification.instance()).action(_function_5).build();
     } catch (Throwable _e) {
       throw Exceptions.sneakyThrow(_e);
     }
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.classpath b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.classpath
index ad32c83..eca7bdb 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.classpath
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.settings/org.eclipse.jdt.core.prefs b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.settings/org.eclipse.jdt.core.prefs
index c537b63..0c68a61 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.settings/org.eclipse.jdt.core.prefs
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,7 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/META-INF/MANIFEST.MF b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/META-INF/MANIFEST.MF
index 2039050..4433de2 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/META-INF/MANIFEST.MF
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: org.eclipse.viatra.dse.examples.bpmn.model
 Bundle-SymbolicName: org.eclipse.viatra.dse.examples.bpmn.model;singleton:=true
-Bundle-Version: 0.12.0.qualifier
+Bundle-Version: 0.20.0.qualifier
 Bundle-ClassPath: .
 Bundle-Localization: plugin
 Export-Package: org.eclipse.viatra.dse.examples.simplifiedbpmn,
@@ -10,5 +10,5 @@
  org.eclipse.viatra.dse.examples.simplifiedbpmn.util
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.emf.ecore;visibility:=reexport
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Bundle-ActivationPolicy: lazy
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/pom.xml b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/pom.xml
index 2bf60a3..ab6c8ed 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/pom.xml
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.model/pom.xml
@@ -5,10 +5,9 @@
   <parent>
     <groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
     <artifactId>bpmn</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
+    <version>0.20.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
   <artifactId>org.eclipse.viatra.dse.examples.bpmn.model</artifactId>
-  <version>0.12.0-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.classpath b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.classpath
index d25c08a..f0c5549 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.classpath
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.classpath
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="src" path="src/"/>
-	<classpathentry kind="src" path="src-gen/"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="src-gen"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.settings/org.eclipse.jdt.core.prefs b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.settings/org.eclipse.jdt.core.prefs
index c537b63..0c68a61 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.settings/org.eclipse.jdt.core.prefs
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,7 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/META-INF/MANIFEST.MF b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/META-INF/MANIFEST.MF
index d6a4ee1..e29e614 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/META-INF/MANIFEST.MF
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/META-INF/MANIFEST.MF
@@ -2,12 +2,12 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: org.eclipse.viatra.dse.examples.bpmn.patterns
 Bundle-SymbolicName: org.eclipse.viatra.dse.examples.bpmn.patterns;singleton:=true
-Bundle-Version: 0.12.0.qualifier
+Bundle-Version: 0.20.0.qualifier
 Export-Package: org.eclipse.viatra.dse.examples.bpmn.patterns,
  org.eclipse.viatra.dse.examples.bpmn.patterns.util
 Require-Bundle: org.eclipse.viatra.dse.examples.bpmn.model,
  org.eclipse.emf.ecore,
  org.eclipse.xtext.xbase.lib,
  org.eclipse.viatra.query.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: org.apache.log4j
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/pom.xml b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/pom.xml
index 8623a52..81e9244 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/pom.xml
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.patterns/pom.xml
@@ -5,10 +5,9 @@
   <parent>
     <groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
     <artifactId>bpmn</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
+    <version>0.20.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
   <artifactId>org.eclipse.viatra.dse.examples.bpmn.patterns</artifactId>
-  <version>0.12.0-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.classpath b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.classpath
index ad32c83..eca7bdb 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.classpath
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.settings/org.eclipse.jdt.core.prefs b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.settings/org.eclipse.jdt.core.prefs
index c537b63..0c68a61 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.settings/org.eclipse.jdt.core.prefs
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,7 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/META-INF/MANIFEST.MF b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/META-INF/MANIFEST.MF
index 2000fc4..08d3a9d 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/META-INF/MANIFEST.MF
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/META-INF/MANIFEST.MF
@@ -2,11 +2,11 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: org.eclipse.viatra.dse.examples.bpmn.test
 Bundle-SymbolicName: org.eclipse.viatra.dse.examples.bpmn.test
-Bundle-Version: 0.12.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.viatra.dse.examples.bpmn.dse;bundle-version="0.12.0",
- org.eclipse.viatra.dse.examples.bpmn.model;bundle-version="0.12.0",
- org.eclipse.viatra.dse.examples.bpmn.patterns;bundle-version="0.12.0",
+Bundle-Version: 0.20.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.viatra.dse.examples.bpmn.dse;bundle-version="0.20.0",
+ org.eclipse.viatra.dse.examples.bpmn.model;bundle-version="0.20.0",
+ org.eclipse.viatra.dse.examples.bpmn.patterns;bundle-version="0.20.0",
  org.eclipse.viatra.dse,
  com.google.guava,
  org.junit
diff --git a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/pom.xml b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/pom.xml
index 2c48769..ed29f3a 100644
--- a/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/pom.xml
+++ b/dse/bpmn/org.eclipse.viatra.dse.examples.bpmn.test/pom.xml
@@ -6,10 +6,9 @@
 	<parent>
 		<groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
 		<artifactId>bpmn</artifactId>
-		<version>0.0.1-SNAPSHOT</version>
+		<version>0.20.0-SNAPSHOT</version>
 	</parent>
 	<groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
 	<artifactId>org.eclipse.viatra.dse.examples.bpmn.test</artifactId>
-	<version>0.12.0-SNAPSHOT</version>
 	<packaging>eclipse-test-plugin</packaging>
 </project>
diff --git a/dse/bpmn/pom.xml b/dse/bpmn/pom.xml
index 51d878c..bf628f3 100644
--- a/dse/bpmn/pom.xml
+++ b/dse/bpmn/pom.xml
@@ -5,7 +5,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>org.eclipse.viatra.examples.dse.bpmn</groupId>
 	<artifactId>bpmn</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+	<version>0.20.0-SNAPSHOT</version>
 	<packaging>pom</packaging>
 	<modules>
 		<module>org.eclipse.viatra.dse.examples.bpmn.dse</module>
@@ -46,6 +46,11 @@
 			<url>${viatra.repository.url}</url>
 		</repository>
 		<repository>
+			<id>xtext.update</id>
+			<layout>p2</layout>
+			<url>${xtext.repository.url}</url>
+		</repository>
+		<repository>
 			<id>eclipse.update</id>
 			<layout>p2</layout>
 			<url>${eclipse.repository.url}</url>
@@ -62,13 +67,14 @@
 		</repository>
 	</repositories>
 	<properties>
-		<tycho.version>0.24.0</tycho.version>
-		<xtend.compiler.version>2.10.0</xtend.compiler.version>
+		<tycho.version>1.0.0</tycho.version>
+		<xtend.compiler.version>2.13.0</xtend.compiler.version>
 		<viatra.repository.url>http://download.eclipse.org/viatra/updates/integration</viatra.repository.url>
+		<xtext.repository.url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.13.0</xtext.repository.url>
 		<eclipse.repository.release.url>http://download.eclipse.org/releases/neon</eclipse.repository.release.url>
 		<eclipse.repository.url>http://download.eclipse.org/eclipse/updates/4.6</eclipse.repository.url>
 		<orbit.repository.url>http://download.eclipse.org/tools/orbit/downloads/drops/R20160520211859/repository/</orbit.repository.url>
-		<viatra.compiler.version>1.4.0-SNAPSHOT</viatra.compiler.version>
+		<viatra.compiler.version>2.0.0-SNAPSHOT</viatra.compiler.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<jacoco.version>0.7.6.201602180812</jacoco.version>
 		<jacoco.targetdir>${project.basedir}/..</jacoco.targetdir>