DSL driven web service testing/usage

can you please let me know whether the following is possible using MPS.

I want to create a DSL using which our clients can create models. Some piece of code reads the models and translate them to REST calls and execute them. If there are errors, should show them in the model editor.
For example, say I have the following model.
user Tom {
   fn : Tom
   ln : X
   age : 34
   groups {
     admin, employee

I should be able to read this model and figure out that I need to
1. create a user with those attributes and
2. put the user in the said groups
3. translate the api responses appropriately to the domain editor.

While I understand that a DSL can be created, is the access to the model available to a java program ?
I am sure such a thing is possible, but, I am concerned whether it is easily doable ?

which example is suitable for this usecase ?

Appreciate your help

It's impossible to use MPS models from non-MPS code.
Still, you can "generate" your model into any format, and work with the resulting file from your java code.
Thanks Mihail. I will try that option.
Also keep in mind that we're currently working on a feature that is likely to suit your needs pretty well.
We're going to let the users generate a web editor from a language description. Also, hand-written user's code will be able to access the underlying model and do application-specific things. We're using GWT as the backend.
great !
it should be possible then to provide a web interface to clients to write custom rules [in a dsl we develop] and let the application back end process those rules. thank you.
hi, say I created the concepts I explained above. I am trying to read from the application and create the models programmatically. It is the reverse of the 'create models and generate some artifact'. I have the artifacts, now, how I generate the models. Is it possible ?

 Daniil Elovkov, sounds awesome, are there any progress?


Please sign in to leave a comment.