usnistgov / ucef

Universal CPS Environment for Federation
https://pages.nist.gov/ucef
18 stars 8 forks source link

Run workshop example over editor.webgme.org #5

Closed lazydino closed 6 years ago

lazydino commented 7 years ago

Since plugins are not installed over the public editor.webgme.org, I don't think I could complete the workshop demo at https://github.com/usnistgov/ucef-samples/tree/develop/UCEFWorkshopExercise. I was able to import from the seeds webgmex found at https://github.com/usnistgov/ucef-meta/blob/develop/seeds/UCEF_EMPTY_PROJECT.webgmex to initialize a project with all the meta-models built by the exercise.

My issue is about "Importing the remaining interactions", I was trying to click the import icon to import "UtilityFederation.json" at https://github.com/usnistgov/ucef-samples/blob/develop/UCEFWorkshopExercise/workspace/resources/UtilityFederate.json , but I could not find the import icon?

Should I be able to do the excercise over editor.webgme? At least complete the steps before generate Java code?

tpr1 commented 7 years ago

You would need the plugins from https://github.com/usnistgov/ucef-meta/tree/develop/src/plugins and the decorators from https://github.com/usnistgov/ucef-meta/tree/develop/src/decorators to use the import feature. I am not too familiar with the online editor, but I would be surprised if it allowed you to install custom plugins and decorators.

Doing the exercise outside of a UCEF virtual machine on the public WebGME editor is not supported and most likely not possible. It's important to note that WebGME is a generic graphical modeling environment and not an HLA federation editor. UCEF extends WebGME using the plugins and decorators linked above and provides a customized WebGME environment that can be used for HLA federation development. Without those plugins and decorators, WebGME cannot be used to develop federates.

lazydino commented 7 years ago

I am still learning webgme, it seems that webgme-cli tool could 'import' external component like plugin or addon. Is it possible to refector your plugin and decorator so they could be delivered as imported components to an existing webgme project for HLA federation development?

hneema08 commented 7 years ago

Hello,

In addition to plugins and decorators, what makes our version suitable for federation development is the metamodel. So, in theory you could use webgme-cli to import external plugins and decorators, but the plugins and decorators only work in the context of the metamodel, which would need to be merged in as well. In short, there is a complicated route to do that, if not impossible. However, why would one try to merge in the entire suite in to a separate project when you could quite simply use our tools separately.

Also, please note that in our tools, webgme is added as a 'node_modules' dependency, which is the correct way to use webgme. So, ideally the federation development project and your external project would both stay separately and would both have webgme as an npm package dependency.

Hope this helps.

--Himanshu

lazydino commented 7 years ago

Hi Himanshu, Thank you for your insights. I am still trying to figure things out on how WebGME could help us support our DSL development. It seems there are many interesting WebGME projects, and I am looking for a way to consume those codebase in a "mix-and-match" style. I am wondering is UCEF-meta the kind of component like "simple-nodes" which I can just start with a vanilla project using “webgme init”, and do “webgme import seed … “ “webgme import plugin “ and “webgme import decorator” to build the codebase....

MartyBurns commented 7 years ago

lazydino, please contact me at martin.burns@nist.gov. I am interested in learning more about your application and would like to offer some help and context.

Let me note that when you load a seed into WebGME, you wont see the decorator for importing interactions on many of the seeds. We are in the process of updating this material. The older ones don't have the decorator. But we do have a method for recovering those interactions for reuse.

MartyBurns commented 6 years ago

No further discussion. Closing.