Skip to content
Snippets Groups Projects
Commit 1b36ea17 authored by Florian Lambers's avatar Florian Lambers
Browse files
parents d57646e0 78c8f487
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ UserTaskFlowElement:
('with' 'hardcoded' 'inputs' ASSOCIATION LIST_OPEN (hardcodedInputs+=VariableDeclaration (SEPARATOR hardcodedInputs+=VariableDeclaration)*)? LIST_CLOSED)?
('with' 'readVariables' ASSOCIATION LIST_OPEN (inputVariables+=VariableReference (SEPARATOR inputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'writeVariables' ASSOCIATION LIST_OPEN (outputVariables+=VariableReference (SEPARATOR outputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'removeVariables' ASSOCIATION LIST_OPEN (removeVariables+=VariableReference (SEPARATOR removeVariables+=VariableReference)*)? LIST_CLOSED)?
('and' 'label' ASSOCIATION label=STRING)?
DECLARATION_FINISHED;
......@@ -44,6 +45,7 @@ ManualTaskFlowElement:
('with' 'hardcoded' 'inputs' ASSOCIATION LIST_OPEN (hardcodedInputs+=VariableDeclaration (SEPARATOR hardcodedInputs+=VariableDeclaration)*)? LIST_CLOSED)?
('with' 'readVariables' ASSOCIATION LIST_OPEN (inputVariables+=VariableReference (SEPARATOR inputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'writeVariables' ASSOCIATION LIST_OPEN (outputVariables+=VariableReference (SEPARATOR outputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'removeVariables' ASSOCIATION LIST_OPEN (removeVariables+=VariableReference (SEPARATOR removeVariables+=VariableReference)*)? LIST_CLOSED)?
('and' 'label' ASSOCIATION label=STRING)?
DECLARATION_FINISHED;
......@@ -52,6 +54,7 @@ ScriptTaskFlowElement:
('with' 'hardcoded' 'inputs' ASSOCIATION LIST_OPEN (hardcodedInputs+=VariableDeclaration (SEPARATOR hardcodedInputs+=VariableDeclaration)*)? LIST_CLOSED)?
('with' 'readVariables' ASSOCIATION LIST_OPEN (inputVariables+=VariableReference (SEPARATOR inputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'writeVariables' ASSOCIATION LIST_OPEN (outputVariables+=VariableReference (SEPARATOR outputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'removeVariables' ASSOCIATION LIST_OPEN (removeVariables+=VariableReference (SEPARATOR removeVariables+=VariableReference)*)? LIST_CLOSED)?
('and' 'label' ASSOCIATION label=STRING)?
DECLARATION_FINISHED;
......@@ -63,6 +66,7 @@ DelegateServiceTaskFlowElement:
'with' 'delegate' ASSOCIATION delegate=STRING
('with' 'readVariables' ASSOCIATION LIST_OPEN (inputVariables+=VariableReference (SEPARATOR inputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'writeVariables' ASSOCIATION LIST_OPEN (outputVariables+=VariableReference (SEPARATOR outputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'removeVariables' ASSOCIATION LIST_OPEN (removeVariables+=VariableReference (SEPARATOR removeVariables+=VariableReference)*)? LIST_CLOSED)?
('and' 'label' ASSOCIATION label=STRING)?
DECLARATION_FINISHED;
......@@ -72,6 +76,7 @@ ExternalServiceTaskFlowElement:
('with' 'hardcoded' 'inputs' ASSOCIATION LIST_OPEN (hardcodedInputs+=VariableDeclaration (SEPARATOR hardcodedInputs+=VariableDeclaration)*)? LIST_CLOSED)?
('with' 'readVariables' ASSOCIATION LIST_OPEN (inputVariables+=VariableReference (SEPARATOR inputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'writeVariables' ASSOCIATION LIST_OPEN (outputVariables+=VariableReference (SEPARATOR outputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'removeVariables' ASSOCIATION LIST_OPEN (removeVariables+=VariableReference (SEPARATOR removeVariables+=VariableReference)*)? LIST_CLOSED)?
('and' 'label' ASSOCIATION label=STRING)?
DECLARATION_FINISHED;
......@@ -80,6 +85,7 @@ BusinessRuleTaskFlowElement:
('with' 'hardcoded' 'inputs' ASSOCIATION LIST_OPEN (hardcodedInputs+=VariableDeclaration (SEPARATOR hardcodedInputs+=VariableDeclaration)*)? LIST_CLOSED)?
('with' 'readVariables' ASSOCIATION LIST_OPEN (inputVariables+=VariableReference (SEPARATOR inputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'writeVariables' ASSOCIATION LIST_OPEN (outputVariables+=VariableReference (SEPARATOR outputVariables+=VariableReference)*)? LIST_CLOSED)?
('with' 'removeVariables' ASSOCIATION LIST_OPEN (removeVariables+=VariableReference (SEPARATOR removeVariables+=VariableReference)*)? LIST_CLOSED)?
('and' 'label' ASSOCIATION label=STRING)?
DECLARATION_FINISHED;
......
......@@ -32,8 +32,8 @@ public class Main {
Arrays.asList("wup.html")); //
FlowElement start = TestgeneratorDSLObjectCreator.createStartFlowElement("Start_123", Arrays.asList(), null);
FlowElement gateway = TestgeneratorDSLObjectCreator.createGatewayFlowElement("Gateway_123", GatewayType.PARALLEL);
FlowElement activity = TestgeneratorDSLObjectCreator.createUserTaskFlowElement("Activity_123", Arrays.asList(), Arrays.asList(), "Activity 123", null);
FlowElement gateway = TestgeneratorDSLObjectCreator.createGatewayFlowElement("Gateway_123");
FlowElement activity = TestgeneratorDSLObjectCreator.createUserTaskFlowElement("Activity_123", 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");
......
......@@ -123,7 +123,7 @@ public class TestgeneratorDSLObjectCreator {
}
public static UserTaskFlowElement createUserTaskFlowElement(String name, List<Variable> inputVariables, List<Variable> outputVariables, String label,
HashMap<String, List<Constraint>> taskSpecificConstraints) {
HashMap<String, List<Constraint>> taskSpecificConstraints, List<Variable> removeVariables) {
UserTaskFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createUserTaskFlowElement();
element.setName(name);
element.setLabel(label);
......@@ -152,10 +152,17 @@ public class TestgeneratorDSLObjectCreator {
element.getOutputVariables().add(variableReference);
}
for (Variable removeVariable : removeVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(removeVariable);
element.getRemoveVariables().add(variableReference);
}
return element;
}
public static ManualTaskFlowElement createManualTaskFlowElement(String name, List<Variable> inputVariables, List<Variable> outputVariables, String label) {
public static ManualTaskFlowElement createManualTaskFlowElement(String name, List<Variable> inputVariables, List<Variable> outputVariables,
String label, List<Variable> removeVariables) {
ManualTaskFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createManualTaskFlowElement();
element.setName(name);
element.setLabel(label);
......@@ -172,10 +179,17 @@ public class TestgeneratorDSLObjectCreator {
element.getOutputVariables().add(variableReference);
}
for (Variable removeVariable : removeVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(removeVariable);
element.getRemoveVariables().add(variableReference);
}
return element;
}
public static ScriptTaskFlowElement createScriptTaskFlowElement(String name, List<Variable> inputVariables, List<Variable> outputVariables, String label) {
public static ScriptTaskFlowElement createScriptTaskFlowElement(String name, List<Variable> inputVariables, List<Variable> outputVariables, String label,
List<Variable> removeVariables) {
ScriptTaskFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createScriptTaskFlowElement();
element.setName(name);
element.setLabel(label);
......@@ -191,6 +205,12 @@ public class TestgeneratorDSLObjectCreator {
variableReference.setRef(outputVariable);
element.getOutputVariables().add(variableReference);
}
for (Variable removeVariable : removeVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(removeVariable);
element.getRemoveVariables().add(variableReference);
}
return element;
}
......@@ -198,11 +218,12 @@ public class TestgeneratorDSLObjectCreator {
public static ServiceTaskFlowElement createServiceTaskFlowElement(String name) {
ServiceTaskFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createServiceTaskFlowElement();
element.setName(name);
return element;
}
public static ServiceTaskFlowElement createDelegateServiceTaskFlowElement(String name, String delegate, List<Variable> inputVariables, List<Variable> outputVariables, String label) {
public static ServiceTaskFlowElement createDelegateServiceTaskFlowElement(String name, String delegate, List<Variable> inputVariables, List<Variable> outputVariables,
String label, List<Variable> removeVariables) {
DelegateServiceTaskFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createDelegateServiceTaskFlowElement();
element.setName(name);
element.setLabel(label);
......@@ -219,12 +240,18 @@ public class TestgeneratorDSLObjectCreator {
variableReference.setRef(outputVariable);
element.getOutputVariables().add(variableReference);
}
for (Variable removeVariable : removeVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(removeVariable);
element.getRemoveVariables().add(variableReference);
}
return element;
}
public static ServiceTaskFlowElement createExternalServiceTaskFlowElement(String name, ExternalTopic externalTopic, List<VariableDeclaration> hardcodedInputs,
String label, List<Variable> inputVariables, List<Variable> outputVariables) {
String label, List<Variable> inputVariables, List<Variable> outputVariables, List<Variable> removeVariables) {
ExternalTopicReference externalTopicRef = TestgeneratorDSLFactory.eINSTANCE.createExternalTopicReference();
externalTopicRef.setRef(externalTopic);
......@@ -244,11 +271,18 @@ public class TestgeneratorDSLObjectCreator {
variableReference.setRef(outputVariable);
element.getOutputVariables().add(variableReference);
}
for (Variable removeVariable : removeVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(removeVariable);
element.getRemoveVariables().add(variableReference);
}
return element;
}
public static BusinessRuleTaskFlowElement createBusinessRuleTaskFlowElement(String name, String resultVariable, List<Variable> inputVariables, List<Variable> outputVariables, String label) {
public static BusinessRuleTaskFlowElement createBusinessRuleTaskFlowElement(String name, String resultVariable, List<Variable> inputVariables, List<Variable> outputVariables,
String label, List<Variable> removeVariables) {
BusinessRuleTaskFlowElement element = TestgeneratorDSLFactory.eINSTANCE.createBusinessRuleTaskFlowElement();
element.setName(name);
element.setResultVariable(resultVariable);
......@@ -266,6 +300,12 @@ public class TestgeneratorDSLObjectCreator {
element.getOutputVariables().add(variableReference);
}
for (Variable removeVariable : removeVariables) {
VariableReference variableReference = TestgeneratorDSLFactory.eINSTANCE.createVariableReference();
variableReference.setRef(removeVariable);
element.getRemoveVariables().add(variableReference);
}
return element;
}
......
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