Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Sirius web - how to download/upload models
Sirius web - how to download/upload models [message #1844005] Thu, 26 August 2021 21:28 Go to next message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 58
Registered: August 2015
Member
I am having trouble uploading models in Sirius Web.

I am able to download a model with no problems. I get a EMF/XML file.
But when I try to upload that same file, I get an error message.

o.e.s.w.s.g.c.GraphQLController {
"errors" : [ {
"message" : "Field 'projectId' of variable 'input' has coerced Null value for NonNull type 'ID!'",
"locations" : [ {
"line" : 2,
"column" : 27
} ],
"extensions" : {
"classification" : "ValidationError"
}
} ]
}

The emf model does not contain a projectId property.
I noticed that I get the same message even when I just upload any random text file. So I am guessing Sirius Web is not expecting an EMF/XML file?

I noticed that when I download a whole project (a zip file), the model is handled in a json file. I also tried to upload these models with no success.

But I am able to upload a whole project that I downloaded (both upload and download are via zip file)

Any hints or documentation on this is appreciated.
Re: Sirius web - how to download/upload models [message #1844057 is a reply to message #1844005] Mon, 30 August 2021 14:20 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 646
Registered: July 2009
Senior Member
Hi,

What method do you use to upload the file? From the UI ("Upload Model"), or programmatically?

Uploading a single model file only works in the context of a particular project (in which the model will be added), hence the requirement for the projectId paramer.
If you used the "Upload Model" entry in a particular project's context menu (in the project header, right next to the project name), it should normally fill that for you. I just tested, and for me this works fine.

If you try to upload a model by invoking the GraphQL operation yourself programmatically, you must fill the projectId with the identifier of an existing project. A model can not live (and thus can not be uploaded) outside of a specific project.

Regards,
Pierre-Charles David


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sirius web - how to download/upload models [message #1844070 is a reply to message #1844057] Tue, 31 August 2021 07:26 Go to previous message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 58
Registered: August 2015
Member
Hi

I finally took the time to upgrade to the latest Sirius Web (and Components), and now this part works as expected.

But just to make this thread complete for future readers...
I was uploading via the UI. It took a short while to work out the difference between upload/download of projects vs models.
With the latest versions, and with this understanding, it is all working fine.

Thanks Pierre-Charles David
Jad
Previous Topic:[Sirius Web] Custom diagram framework
Next Topic:AbstractTransparentImage keeps the bitmap of the image in memory
Goto Forum:
  


Current Time: Wed Sep 28 17:05:03 GMT 2022

Powered by FUDForum. Page generated in 0.02035 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top