I found some spare cycles to continue my DSL experiment.
I wasn’t happy with the initial version of my domain model, so I decided to make some changes in it. Although the model isn’t the most important part of the experiment I figured that it should at least be possible to compile it to continue the experiment.
After making some changes in the domain model, I ran into several problems when I tried to get the designer file in synch with the domain model. As a result executing the “translate template” step caused a lot of errors that I was not able to solve.
Let me try to explain what happened. Suppose we have the following model:
When I used the “modelisoft add in” to get the designer file (.dsldd) in synch with the model I received the following warning:
Warning : in MelCollection of shapemap for 'ResponseMessage', Concept
> 'ServiceOperation' has a role 'ResponseMessage' but it is not
Aggregate
I figured that I made some fundamental errors in my model but couldn’t find anything about it in the accompanying DSL Tools walkthrough documents. After some time I decided to contact Alan Cameron Wills who is a member of the DSL Tools team and is very active on the DSL Tools forum. Within half an hour he responded and solved my problem. Thanks Alan!
He told me that in the current version of the DSL Tools there’s the following restriction:
All concepts of all shapes that appear on the diagram must be embeddings of the root class.
In practise this means that models should be very flat. What I had to do is create an embedding relation (solid line in the diagram below) from “service” (root of the model) to “RequestMessage” and “ResponseMessage”. After that I had to change the right-hand roles “Min” attribute to 1 and change the “Accepts” attribute of the left-hand roles to “All”
(changes are within red lines)
Maybe a bit strange but it works!
After applying the suggested solution my model looks like:
Note: the model isn’t finished yet. This picture is just to explain this restriction!
Alan also mentioned that the future release of the DSL Tools will have a much better “modelling experience”, till then we have to use the above described solution to get around this restriction.
Remember Me
Page rendered at 3/12/2010 11:57:29 PM UTC
patterns & practices Developer Centre
Web Service Software Factory
Service Factory Contrib
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.