Skip to content
Snippets Groups Projects
Commit 0995c0a6 authored by Florian Lambers's avatar Florian Lambers
Browse files

refactored inputVariables, readVariables, writeVariables

parent 5c5ab5d4
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ public class Main {
FlowElement start = TestgeneratorDSLObjectCreator.createStartFlowElement("Start_123", Arrays.asList(), null);
FlowElement gateway = TestgeneratorDSLObjectCreator.createGatewayFlowElement("Gateway_123", null);
FlowElement activity = TestgeneratorDSLObjectCreator.createUserTaskFlowElement("Activity_123", Arrays.asList(), Arrays.asList(), "Activity 123", null, null);
FlowElement activity = TestgeneratorDSLObjectCreator.createUserTaskFlowElement("Activity_123", Arrays.asList(), Arrays.asList(), Arrays.asList(), "Activity 123", null, null);
FlowElement end = TestgeneratorDSLObjectCreator.createEndFlowElement("End_123");
FlowElement activity2 = TestgeneratorDSLObjectCreator.createServiceTaskFlowElement("Activity_234");
FlowElement end2 = TestgeneratorDSLObjectCreator.createEndFlowElement("End_234");
......
......@@ -122,7 +122,8 @@ public class TestgeneratorDSLObjectCreator {
return element;
}
public static UserTaskFlowElement createUserTaskFlowElement(String name, List<Variable> inputVariables, List<Variable> outputVariables, String label,
public static UserTaskFlowElement createUserTaskFlowElement(String name, List<Variable> inputVariables, List<Variable> readVariables,
List<Variable> writeVariables, String label,
HashMap<String, List<Constraint>> taskSpecificConstraints, List<Variable> removeVariables) {
UserTaskFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createUserTaskFlowElement();
element.setName(name);
......@@ -147,9 +148,15 @@ public class TestgeneratorDSLObjectCreator {
element.getInputVariables().add(variableReference);
}
for (Variable outputVariable : outputVariables) {
for (Variable readVariable : readVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(outputVariable);
variableReference.setRef(readVariable);
element.getReadVariables().add(variableReference);
}
for (Variable writeVariable : writeVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(writeVariable);
element.getWriteVariables().add(variableReference);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment