From 9b7084fc6d9d0a1c429c01b61ef32344640718e6 Mon Sep 17 00:00:00 2001
From: tfli <tfli@d-velop.de>
Date: Tue, 21 Dec 2021 08:50:09 +0100
Subject: [PATCH] Added sequenceflow readvariables

---
 .../src/de/fhmuenster/masterthesis/TestgeneratorDSL.xtext  | 1 +
 .../serialization/TestgeneratorDSLObjectCreator.java       | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/TestgeneratorDSL.xtext b/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/TestgeneratorDSL.xtext
index 938b17e..826e492 100644
--- a/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/TestgeneratorDSL.xtext
+++ b/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/TestgeneratorDSL.xtext
@@ -96,6 +96,7 @@ GatewayFlowElement:
 	
 SequenceFlowElement:
 	"FlowElement" name=ID ASSOCIATION "SequenceFlow" 
+	('with' 'readVariables' ASSOCIATION LIST_OPEN (readVariables+=VariableReference (SEPARATOR readVariables+=VariableReference)*)? LIST_CLOSED)? 
 	('with' 'expression' ASSOCIATION expression=STRING)?
 	DECLARATION_FINISHED;
 	
diff --git a/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/serialization/TestgeneratorDSLObjectCreator.java b/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/serialization/TestgeneratorDSLObjectCreator.java
index 053dfe0..98fdbba 100644
--- a/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/serialization/TestgeneratorDSLObjectCreator.java
+++ b/de.fhmuenster.masterthesis.textgeneratordsl/src/de/fhmuenster/masterthesis/serialization/TestgeneratorDSLObjectCreator.java
@@ -325,10 +325,15 @@ public class TestgeneratorDSLObjectCreator {
 		return element;
 	}
 	
-	public static SequenceFlowElement createSequenceFlowElement(String name, String expression) {
+	public static SequenceFlowElement createSequenceFlowElement(String name, String expression, List<Variable> inputVariables) {
 		SequenceFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createSequenceFlowElement();
 		element.setName(name);
 		element.setExpression(expression);
+		for (Variable inputVariable : inputVariables) {
+			VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
+			variableReference.setRef(inputVariable);
+			element.getReadVariables().add(variableReference);
+		}
 
 		return element;
 	}
-- 
GitLab