Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: IDs for SCA model elements (was RE: [stp-dev] Test cases for STP-IM Builder)

Hi Stéphane,

 

I have submitted the bugs with IDs 246018 and 246019. Indeed I realize that using SCA properties isn’t appropriate; this would seriously pollute the models, so I will try the approach you suggested using names.

 

Thanks a lot for your help!

 

-Juan

 

From: stp-dev-bounces@xxxxxxxxxxx [mailto:stp-dev-bounces@xxxxxxxxxxx] On Behalf Of Stéphane Drapeau <Stephane.Drapeau@xxxxxxx>
Sent: Monday, September 01, 2008 12:02 PM
To: STP Dev list
Subject: Re: IDs for SCA model elements (was RE: [stp-dev] Test cases for STP-IM Builder)

 

Juan,

Comments below.

On Wed, Aug 13, 2008 at 6:42 PM, Juan Cadavid <juanjosecg@xxxxxxxxx> wrote:

Hello everyone,

In the past few days I've been working EMF Model Query to keep the names of
the elements updated across models of the different STP editors; something
like a "reverse engineering" thing as I mentioned before. For example, if
the user draws a BPMN activity that looks like this on its serialized form:

       <vertices xmi:type="bpmn:Activity" xmi:id="_XnaigT_VEd2hLIVKnOkaeg"
iD="_XnaigD_VEd2hLIVKnOkaeg" outgoingEdges="_FIcQUT_WEd2hLIVKnOkaeg"
name="Halt Machine" activityType="Task"/>

When the STP-IM builder runs, it transforms this activity into a Step
element of an Intermediate Model instance. From this instance, the user can
create an SCA model, a BPEL model and so on. However, if the user makes a
manual change to one of these generated elements (for example its name), the
ideal would be to keep the first BPMN Activity element updated. To do this,
we run an update command querying that activity with the help of the iD
attribute that you see serialized, and then apply the changes that have been
made (for example, set the new activity name).

We were lucky in that the BPMN editor already creates elements with this iD,
and so we can use it to track each one of its elements. However, now we want
to extend this feature to the SCA model editor. In this particular case, we
need to track Composites, Components and Services. However the SCA editors
don't attach an iD to its elements, so we need to think of a way to extend
these model elements to create an iD and attach it.

Initially I thought of using the Property element of SCA to attach an iD to
the elements, but I discovered that I can only attach these to Composites
and Components, but not to Services, so I won't be able to use this.


I don't think that it's a good solution. The Property element has a specific meaning in SCA.
 

I
cannot use either the EAnnotations mechanism that provides EMF to extend
elements, because in the SCA metamodel the elements don't have EModelElement
as its supertype.

Do you have any recommendation on how to give the SCA elements an iD so I
can track them?


Perhaps, you can take advantage of the fact that:
- The name of a component belonging to a composite must be unique and
- The name of a service belonging to a component must be unique.
So, the strings "CompositeName/ComponentName" and "CompositeName/ComponentName/ServiceName" can be used to identify a component or a service.
However, this "id" can change (you can rename the composite or the component or the service). So the update process is more complicated than with technical ids (like in the BPMN editor)...

Stéphane Drapeau
Obeo

 


Back to the top