Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329262 - Missed Model Element IDs
Summary: Missed Model Element IDs
Status: NEW
Alias: None
Product: JWT
Classification: SOA
Component: Metamodel (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 10:37 EDT by Benjamin Honke CLA
Modified: 2011-06-06 12:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Honke CLA 2010-11-02 10:37:58 EDT
Hi,

I'd like to propose a small meta model change for JWT.
Currently, it is difficult to identify or compare instances of an JWT model. 
So, would it be possible to introduce Unique Identifiers for JWT elements?
The ModelElement of the JWT core package could be the right place for such a change. At the moment, I see no disadvantages for existing applications based on JWT and I think this could help other developers, too.

Best Regards 
Benjamin Honke
Comment 1 Marc Dutoo CLA 2010-11-26 10:31:24 EST
I've seen that done in places (e.g. STP BPMN) and while it is very easy to do and use, it can be a mess to work with if you use these ids outside of the workflow model where they are defined, because they introduce strong coupling. In this latter case, it is better to use a **decoupled** way to refer to elements, typically a slashed path like we use in the TaskEngineFramework (1).

So it depends whether you want to refer to it within the workflow model (then it's OK, they'd even be valid XML ids), or refer to it from another file (then a decoupled method that uses the workflow structure rather than arbitrary generated ids would be better, and preserve usability across different versions or forks of the same workflow model).

(1) see comment of modelElementPath in /jwt-taskengine-api/src/main/java/org/eclipse/jwt/runtime/taskengine/interfaces/ProcessModelService.java :

    /**
     * Returns the value of any action - task impl (application, hook...)-specific property.
     * @param modelName name of process
     * @param modelElementPath path of action - task tree (including within suprocesses),
     * consisting in their slash-prefixed names
     * @param propertyName
     * @return value with the right Java type (some low-end impls might only return strings)
     * @throws NoSuchModelElementException if can't find target action - task
     * @throws NoSuchPropertyException if can't find property on it
     */
    public Object getPropertyValue(String modelName, String modelElementPath, String propertyName)
        throws NoSuchModelElementException, NoSuchPropertyException;
Comment 2 Marc Dutoo CLA 2010-11-26 10:33:39 EST
Update : as Chris said, the requirement is to use completely transient IDs for identification purposes only inside the context of a specific model even to the point where the IDs will change every time the model is loaded (e.g. by calling EcoreUtil.generateUUID() in the ModelElementImpl constructor).

So I'm logically perfectly OK with it.

Benjamin, you can propose a source patch providing the feature as a zip file attached to this bug, we'll test it, and if it works that'll be good reasons to propose you as committer !

Regards,
Marc
Comment 3 Marc Dutoo CLA 2011-06-06 12:25:45 EDT
Moved version to 1.1 since it still occurs.