Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Missing source/target attribute from ActivityEdge when xmi:id different than name attribute
Missing source/target attribute from ActivityEdge when xmi:id different than name attribute [message #476350] Tue, 09 October 2007 12:48 Go to next message
Eclipse UserFriend
Originally posted by: danjaspoja.gmail.com

Hello,

I have found the following problem when creating an activity diagram
prgrammatically using Eclipse UML2 API. When specifying Action node, if
I set the name and xmi:id to be the same value and then I generate an
XML file from the model, the source and target attributes appear
correctly in the ActivityEdge tags. However, if I set name attribute to
be some value different than the value I set for xmi:id, the generated
XML edges are are randomly missing either target or source attribute.

Has anyone else encountered this behavior? Is this a programmer error or
a bug?

Thank you very much for any feedback,

Danja
Re: Missing source/target attribute from ActivityEdge when xmi:id different than name attribute [message #476354 is a reply to message #476350] Tue, 09 October 2007 17:51 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Danja,

Can you demonstrate this with a JUnit test so that it can be investigated?
I would like to see exactly how you are setting the id and name.

Cheers,
- James.



"Danja" <danjaspoja@gmail.com> wrote in message
news:feftb8$4cq$1@build.eclipse.org...
> Hello,
>
> I have found the following problem when creating an activity diagram
> prgrammatically using Eclipse UML2 API. When specifying Action node, if I
> set the name and xmi:id to be the same value and then I generate an XML
> file from the model, the source and target attributes appear correctly in
> the ActivityEdge tags. However, if I set name attribute to be some value
> different than the value I set for xmi:id, the generated XML edges are are
> randomly missing either target or source attribute.
>
> Has anyone else encountered this behavior? Is this a programmer error or a
> bug?
>
> Thank you very much for any feedback,
>
> Danja
Re: Missing source/target attribute from ActivityEdge when xmi:id different than name attribute [message #477074 is a reply to message #476354] Wed, 12 March 2008 09:36 Go to previous messageGo to next message
xiaoqiang is currently offline xiaoqiangFriend
Messages: 20
Registered: July 2009
Junior Member
James Bruck 写道:
> Hi Danja,
>
> Can you demonstrate this with a JUnit test so that it can be investigated?
> I would like to see exactly how you are setting the id and name.
>
> Cheers,
> - James.
>
>
>
> "Danja" <danjaspoja@gmail.com> wrote in message
> news:feftb8$4cq$1@build.eclipse.org...
>> Hello,
>>
>> I have found the following problem when creating an activity diagram
>> prgrammatically using Eclipse UML2 API. When specifying Action node, if I
>> set the name and xmi:id to be the same value and then I generate an XML
>> file from the model, the source and target attributes appear correctly in
>> the ActivityEdge tags. However, if I set name attribute to be some value
>> different than the value I set for xmi:id, the generated XML edges are are
>> randomly missing either target or source attribute.
>>
>> Has anyone else encountered this behavior? Is this a programmer error or a
>> bug?
>>
>> Thank you very much for any feedback,
>>
>> Danja
>
>
Hi Danja,
I am also creating an activity diagram prgrammatically using Eclipse
UML2 API.I 'd like to know how to create a ControlFlow between two
actions,how to setSource,how to setTarget for the ControlFlow.Could you
give me an example for that?
thank you very much! I am appreciated the reply.
Best Wishes!
xiaoqiang
Re: Missing source/target attribute from ActivityEdge when xmi:id different than name attribute [message #477192 is a reply to message #477074] Fri, 04 April 2008 13:46 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
xiaoqiang,

Action is a specialization of ActivityNode and ControlFlow is a
specialization of ActivityEdge, so you would so something like this:

ControlFlow myControlFlow = (ControlFlow) myActivity.createEdge(null,
UMLPackage.Literals.CONTROL_FLOW);
controlFlow.setSource(myAction);
controlFlow.setTarget(myOtherAction);

Kenn

"xiaoqiang" <jqzhao1985@gmail.com> wrote in message
news:fr887h$as3$1@build.eclipse.org...
> James Bruck д
Re: Missing source/target attribute from ActivityEdge when xmi:id different than name attribute [message #625166 is a reply to message #476350] Tue, 09 October 2007 17:51 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Danja,

Can you demonstrate this with a JUnit test so that it can be investigated?
I would like to see exactly how you are setting the id and name.

Cheers,
- James.



"Danja" <danjaspoja@gmail.com> wrote in message
news:feftb8$4cq$1@build.eclipse.org...
> Hello,
>
> I have found the following problem when creating an activity diagram
> prgrammatically using Eclipse UML2 API. When specifying Action node, if I
> set the name and xmi:id to be the same value and then I generate an XML
> file from the model, the source and target attributes appear correctly in
> the ActivityEdge tags. However, if I set name attribute to be some value
> different than the value I set for xmi:id, the generated XML edges are are
> randomly missing either target or source attribute.
>
> Has anyone else encountered this behavior? Is this a programmer error or a
> bug?
>
> Thank you very much for any feedback,
>
> Danja
Re: Missing source/target attribute from ActivityEdge when xmi:id different than name attribute [message #626201 is a reply to message #476354] Wed, 12 March 2008 09:36 Go to previous message
xiaoqiang is currently offline xiaoqiangFriend
Messages: 20
Registered: July 2009
Junior Member
James Bruck 写道:
> Hi Danja,
>
> Can you demonstrate this with a JUnit test so that it can be investigated?
> I would like to see exactly how you are setting the id and name.
>
> Cheers,
> - James.
>
>
>
> "Danja" <danjaspoja@gmail.com> wrote in message
> news:feftb8$4cq$1@build.eclipse.org...
>> Hello,
>>
>> I have found the following problem when creating an activity diagram
>> prgrammatically using Eclipse UML2 API. When specifying Action node, if I
>> set the name and xmi:id to be the same value and then I generate an XML
>> file from the model, the source and target attributes appear correctly in
>> the ActivityEdge tags. However, if I set name attribute to be some value
>> different than the value I set for xmi:id, the generated XML edges are are
>> randomly missing either target or source attribute.
>>
>> Has anyone else encountered this behavior? Is this a programmer error or a
>> bug?
>>
>> Thank you very much for any feedback,
>>
>> Danja
>
>
Hi Danja,
I am also creating an activity diagram prgrammatically using Eclipse
UML2 API.I 'd like to know how to create a ControlFlow between two
actions,how to setSource,how to setTarget for the ControlFlow.Could you
give me an example for that?
thank you very much! I am appreciated the reply.
Best Wishes!
xiaoqiang
Re: Missing source/target attribute from ActivityEdge when xmi:id different than name attribute [message #626352 is a reply to message #477074] Fri, 04 April 2008 13:46 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
xiaoqiang,

Action is a specialization of ActivityNode and ControlFlow is a
specialization of ActivityEdge, so you would so something like this:

ControlFlow myControlFlow = (ControlFlow) myActivity.createEdge(null,
UMLPackage.Literals.CONTROL_FLOW);
controlFlow.setSource(myAction);
controlFlow.setTarget(myOtherAction);

Kenn

"xiaoqiang" <jqzhao1985@gmail.com> wrote in message
news:fr887h$as3$1@build.eclipse.org...
> James Bruck д
Previous Topic:UML Model Editor/ Importing
Next Topic:How to model an operation with concrete instanceSpecifications as inputs and output?
Goto Forum:
  


Current Time: Thu Apr 25 15:01:16 GMT 2024

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

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

Back to the top