diff --git a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/controller.md2 b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/controller.md2 index 30cf33fa..57521e21 100644 --- a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/controller.md2 +++ b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/controller.md2 @@ -38,4 +38,4 @@ WorkflowElement SubmitComplaint { step SubmitComplaint: view SubmitComplaintView } -} \ No newline at end of file +} diff --git a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/model.md2 b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/model.md2 index b80365c5..8b0429d0 100644 --- a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/model.md2 +++ b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/model.md2 @@ -22,4 +22,4 @@ enum ComplaintStatus { "Complaint is sent to administration", "Complaint is in process", "Complaint has been handled by the administration" -} \ No newline at end of file +} diff --git a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/view.md2 b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/view.md2 index fd2c2cd6..0f03228e 100644 --- a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/view.md2 +++ b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/view.md2 @@ -69,6 +69,5 @@ FlowLayoutPane SubmitComplaintView (vertical) { } //NavigationBar(Cancel, next "Submit complaint") LocationDetectionView.Cancel -> Cancel3 - Button submitComplaint {text "Submit complaint"} - -} \ No newline at end of file + Button submitComplaint {text "Submit complaint"} +} diff --git a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/workflow.md2 b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/workflow.md2 index 0a741287..db96d92f 100644 --- a/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/workflow.md2 +++ b/de.wwu.md2.framework.tests/models/de/wwu/md2/framework/tests/dsl/workflow/validator/workflow.md2 @@ -13,13 +13,14 @@ WorkflowElement SubmitComplaint fires SubmitEvent { start LocationDetection } - fires anotherEvent{ + fires anotherEvent { start LocationDetection } + App Citizenapp { WorkflowElements { LocationDetection (startable: "Start Controller 1"), SubmitComplaint } appName "currentStateApp" -} \ No newline at end of file +} diff --git a/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/functionTest.xtend b/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/functionTest.xtend index 31fdf143..2791a035 100644 --- a/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/functionTest.xtend +++ b/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/functionTest.xtend @@ -42,6 +42,5 @@ class functionTest { controllerModel.assertNoErrors; viewModel.assertNoErrors; modelModel.assertNoErrors; - } - -} \ No newline at end of file + } +} diff --git a/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/validatorTest.xtend b/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/validatorTest.xtend index 8f73cf6d..f1ab4093 100644 --- a/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/validatorTest.xtend +++ b/de.wwu.md2.framework.tests/src/de/wwu/md2/framework/tests/dsl/workflow/functionTest/validatorTest.xtend @@ -27,7 +27,7 @@ class validatorTest { MD2Model controllerModel; MD2Model viewModel; MD2Model modelModel; - ResourceSet rs; + ResourceSet rs; @Before def void setUp() { @@ -41,15 +41,11 @@ class validatorTest { @Test def checkIfSpecifiedEventsAreFiredInControllerTest(){ workflowModel.assertNoErrors(); - //workflowModel.assertNoIssues(); workflowModel.assertWarning(MD2Package::eINSTANCE.workflowEvent,ControllerValidator::FIREEVENT) } @Test def checkEventExistsInCorrectWorkflowElementTest(){ - //controllerModel.assertNoErrors(); - //controllerModel.assertNoIssues(); controllerModel.assertError(MD2Package::eINSTANCE.fireEventAction,ControllerValidator::EVENTREFERENCE); } - -} \ No newline at end of file +} diff --git a/de.wwu.md2.framework/src/de/wwu/md2/framework/validation/ControllerValidator.xtend b/de.wwu.md2.framework/src/de/wwu/md2/framework/validation/ControllerValidator.xtend index 856fa7fe..d6f4026c 100644 --- a/de.wwu.md2.framework/src/de/wwu/md2/framework/validation/ControllerValidator.xtend +++ b/de.wwu.md2.framework/src/de/wwu/md2/framework/validation/ControllerValidator.xtend @@ -70,8 +70,8 @@ class ControllerValidator extends AbstractMD2JavaValidator { public static final String EVENTREFERENCE = "EventReference"; /** - * Checks whether an event which is fired in a controller is specified in the corresponding workflowelement - * in the workflowelement file + * Checks whether an event which is fired in a controller is specified in the corresponding WorkflowElement + * in the workflow file. */ @Check def checkEventExistsInCorrectWorkflowElement(FireEventAction action){ @@ -79,15 +79,15 @@ class ControllerValidator extends AbstractMD2JavaValidator { val workflowElementInController = (action.eContainer.eContainer.eContainer.eContainer as WorkflowElement) if(workflowElementInWorkflow.name != workflowElementInController.name){ - error("Event not specified in WorkflowElement", MD2Package.eINSTANCE.fireEventAction_WorkflowEvent, -1, EVENTREFERENCE) + error("Event is not specified in WorkflowElement", MD2Package.eINSTANCE.fireEventAction_WorkflowEvent, -1, EVENTREFERENCE) } } - public static final String FIREEVENT = "fireevent"; + public static final String FIREEVENT = "FireEvent"; /** - * Checks whether an event, which is specified in an workflowelemententry is fired in the - * corresponding controller workflowelement + * Checks whether an event, which is specified in an WorkflowElementEntry is fired in the + * corresponding controller WorkflowElement. */ @Check def checkIfSpecifiedEventsAreFiredInController(WorkflowEvent event){ @@ -100,8 +100,8 @@ class ControllerValidator extends AbstractMD2JavaValidator { } for (ev : eventBindingTasks) { - val test = ev.actions.filter(typeof(SimpleActionRef)).map[a|a.action].filter(typeof (FireEventAction)) - fireEventActions.addAll(test) + val _fireEventActions = ev.actions.filter(typeof(SimpleActionRef)).map[it.action].filter(typeof (FireEventAction)) + fireEventActions.addAll(_fireEventActions) } val correspondingEvents = fireEventActions.filter[it.workflowEvent == event]