URI format used in CCommands when "patching" a model #106
-
Hi! I'm currently trying to test how to do modifications in my model using the model server API. So far I've been able to test this feature with the model server example from here using the client API. My problem comes when I cannot do small changes in my model (i.e. change the value of an attribute). Commands are successfully executed but after calling "save" the changes are not persisted in the corresponding file (even though the file modification date is updated). I'm pretty sure that the problem comes from the URI specified in the command, more precisely the owner.$ref. From the example I can only understand that these references are "cross-document reference" however I could not find more info about it. Some info would be really appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I suggest to do a simple test run with a REST client to get familiar with the behavior of the Model Server. This procedure will cover your described way of testing (using the
{
"data": {
"eClass": "http://www.eclipse.org/emfcloud/modelserver/command#//Command",
"type": "set",
"owner": {
"eClass":"http://www.eclipsesource.com/modelserver/example/coffeemodel#//Workflow",
"$ref":"SuperBrewer3000.coffee#//@workflows.0"
},
"feature": "name",
"dataValues": [ "Auto Brew Workflow" ],
"indices": [ -1 ]
}
}
Regarding the
To retrieve an I hope that helps a bit in the meantime and please do not hesitate to come back to us if any more questions arise :) |
Beta Was this translation helpful? Give feedback.
Hi @agonzalezgaliana!
I suggest to do a simple test run with a REST client to get familiar with the behavior of the Model Server.
This procedure will cover your described way of testing (using the
SuperBrewer3000.coffee
model from the default workspace root):We send a
PATCH
request containing the followingSET
command tohttp://localhost:8081/api/v1/edit?modeluri=SuperBrewer3000.coffee
: