nwxrichardson / aconite

Eclipse Public License 2.0
3 stars 0 forks source link

How to create my own representation? #61

Closed ademait closed 1 week ago

ademait commented 2 weeks ago

Hello, I'm Adem, I'm a PhD student and I have been using your tool to define the graphical notation of a BPMN extension.

First, congrats on the great work! I am currently working on extending BPMN and your tool is very useful. However, I find myself stucked when trying to create my own representation of the extension. I have created the emfatic file with the Aconite annotations, while generating the Odesign as described in the ReadME. But, when trying to create a new representation, I do not know how to proceed.

I also took a look at the BPMN example you provide. So checking your example, if I want to create a new representation, using the Wizard I can select the "Business Process Diagram" model, as shown here:

imatge

However, when doing the same in my project, the resource does not appear. I tried by copying the resource from your project (uk.ac.york.aconite.bpmn), to mine, but it does not work.

imatge

I tried finding some help on how I should proceed online without any luck. Could you give me a hand in here?

nwxrichardson commented 1 week ago

Hi Adem,

You are correct a step is missing from the instructions if you are trying to follow this process with a new project. The .aird file needs to be made aware of the model, as in the example below and can be added by using the add button and selecting your model from the workspace.

image

ademait commented 1 week ago

Hi @nwxrichardson , thank you for the fast response :)

I am not so familiar with Eclipse and Sirius. I think I am missing a step. In my case, how should I proceed to create the model? The family.basicfamily in your example. I have checked Sirius tutorials, but I have not found how to create it. Is there a place explaining how to do this step?

nwxrichardson commented 1 week ago

Hi @ademait,

Not to worry, I have quickly gone through the process myself for the basic family example and taken some screenshots. I am aware I might have explained back to steps you are familiar with, if so just skip those steps.

I am working on the assumption that you have been using Emfatic. Also, please try this with this project being the only one, as UIDs can clash. Please let me know if that is not the case. The first step is to convert to Ecore by right-clicking on the emf and selecting this option. image

image

We then generate the genmodel from which can generate, by right-clicking then going New>Other and in the list should be the EMF Generator Model. The wizard will ask you to give it a name which you should match with the ecore file in my case basicfamily.genmodel. Select Ecore importer and then load from workshop your .ecore file.

image

image

Open up the new .genmodel file and right click the top element and select Generate All. This will generate code within the current project as well as generating three others. While they aren't all necessary it will generate what is needed.

image

Next, you need to open a runtime instance of Eclipse, the same as in the original tutorial and import the project that contains the Emfatic file. Within this project create a new folder called model, and within which right-click and go New>Other and within the folder Example EMF Model Creation Wizard should be your model name. Double-click that gives it a file name; it will then ask for a model object, and you should select the top object, which, if you are extending BPMN, would be the BPD. Then hit finish and it should have the model as a tree editor which you can create the model.

image

image

image

Hopefully, that should allow you to try out your work. Just a note that all of the stuff to do with the models is actually the Eclipse Modelling Framework (EMF) for any further searching. Sirius is a method of representing an EMF model. However, don't hesitate to ask any other questions, especially if my instructions don't lead you to having a model.

ademait commented 1 week ago

Hi @nwxrichardson , thank you for the clear step-by-step guidance. I could see what I was missing. I could create the model, so the issue is solved 😄