Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » modeling object creation action
modeling object creation action [message #474208] Sat, 14 July 2007 05:51 Go to next message
Krzysztof Kaczmarski is currently offline Krzysztof KaczmarskiFriend
Messages: 88
Registered: July 2009
Member
Dear All,

I am sorry for a little bit off-topic question but this is a place where
there are many UML experts and maybe someone could at least point me to
a place where I could look for an answer.

I need to model object creation and initiation using UML actions. Say,
we have a class Person(name:String, address:String). The most obvious
solution is to use CreateObjectAction and then twice
AddStructuralFeatureValueAction for the name and the address. How could
I pass the newly created object to the two initiating actions?
According to the specification ForkNode will copy the object, which is
wrong and using two competing ObjectFlows will send the resulting object
to one of the AddStructuralFeatureValueAction objects only.

Thanks for any ideas,
Krzysztof
Re: modeling object creation action [message #474209 is a reply to message #474208] Sun, 15 July 2007 02:42 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Krzysztof ,

You question is not off-topic.
I'm not an expert in this area but have you considered modeling the
constructor with a CallOperationAction.
A CreateObjectAction to indicate the creation of Person, with the <<result>>
outputpin connected with an object flow to the <<target>> input of the
CallOperationAction for the person(name,address) constructor. Name and
Address would be two input pins on the call operation action.


- James.



"Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
news:f79o9e$hug$1@build.eclipse.org...
> Dear All,
>
> I am sorry for a little bit off-topic question but this is a place where
> there are many UML experts and maybe someone could at least point me to
> a place where I could look for an answer.
>
> I need to model object creation and initiation using UML actions. Say,
> we have a class Person(name:String, address:String). The most obvious
> solution is to use CreateObjectAction and then twice
> AddStructuralFeatureValueAction for the name and the address. How could
> I pass the newly created object to the two initiating actions?
> According to the specification ForkNode will copy the object, which is
> wrong and using two competing ObjectFlows will send the resulting object
> to one of the AddStructuralFeatureValueAction objects only.
>
> Thanks for any ideas,
> Krzysztof
Re: modeling object creation action [message #474211 is a reply to message #474209] Mon, 16 July 2007 07:44 Go to previous messageGo to next message
Krzysztof Kaczmarski is currently offline Krzysztof KaczmarskiFriend
Messages: 88
Registered: July 2009
Member
Hi James,
obviously, this will work only if an object has a constructor.

Can you confirm that my understanding of the UML standard being not
clear in this aspect is correct?

Thanks,
Krzysztof

James Bruck wrote:
> Hi Krzysztof ,
>
> You question is not off-topic.
> I'm not an expert in this area but have you considered modeling the
> constructor with a CallOperationAction.
> A CreateObjectAction to indicate the creation of Person, with the <<result>>
> outputpin connected with an object flow to the <<target>> input of the
> CallOperationAction for the person(name,address) constructor. Name and
> Address would be two input pins on the call operation action.
>
>
> - James.
>
>
>
> "Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
> news:f79o9e$hug$1@build.eclipse.org...
>> Dear All,
>>
>> I am sorry for a little bit off-topic question but this is a place where
>> there are many UML experts and maybe someone could at least point me to
>> a place where I could look for an answer.
>>
>> I need to model object creation and initiation using UML actions. Say,
>> we have a class Person(name:String, address:String). The most obvious
>> solution is to use CreateObjectAction and then twice
>> AddStructuralFeatureValueAction for the name and the address. How could
>> I pass the newly created object to the two initiating actions?
>> According to the specification ForkNode will copy the object, which is
>> wrong and using two competing ObjectFlows will send the resulting object
>> to one of the AddStructuralFeatureValueAction objects only.
>>
>> Thanks for any ideas,
>> Krzysztof
>
>
Re: modeling object creation action [message #474262 is a reply to message #474211] Mon, 16 July 2007 15:49 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Krzyszt,

I think I understand what you are trying to accomplish now.

To model what you want you might try creating object flows from the
<<result>> of the CreateObjectAction. You can create two object flows from
the same <<result>> output pin. Then create control flows from the create
object action to one structural feature value action. From that structural
feature value action you can create another control flow to the other
structural feature value action.

For the complete solution, for your Activity that models the creation you
can:
1. create 3 Activity Parameter Nodes on the activity corresponding to name
and address and result
2. create a Create Object Action.
3. Create a start point and end point.
4. create 2 add structural feature value action.
5. from one activity parameter node corresponding to name, create a object
flow to an input pin on the add structural feature value action.
6. [ same as above for address ]
7. From your start point create a control flow to the create object action.
8. From the create obj action create a control flow to one SFVA.
9. From that SFVA create a control flow to the other SFVA.
10. From the COA result pin create two object flow to second input pins on
SFVA.
11. From one SFVA create control flow to final node.
12. from <<result>> COA create control flow to APN corresponding to result.

I believe this is what you are trying to do.
It does seem a bit hairy for such a simple task.

- James.



"Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
news:f7f7lg$64m$1@build.eclipse.org...
> Hi James,
> obviously, this will work only if an object has a constructor.
>
> Can you confirm that my understanding of the UML standard being not
> clear in this aspect is correct?
>
> Thanks,
> Krzysztof
>
> James Bruck wrote:
> > Hi Krzysztof ,
> >
> > You question is not off-topic.
> > I'm not an expert in this area but have you considered modeling the
> > constructor with a CallOperationAction.
> > A CreateObjectAction to indicate the creation of Person, with the
<<result>>
> > outputpin connected with an object flow to the <<target>> input of the
> > CallOperationAction for the person(name,address) constructor. Name and
> > Address would be two input pins on the call operation action.
> >
> >
> > - James.
> >
> >
> >
> > "Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
> > news:f79o9e$hug$1@build.eclipse.org...
> >> Dear All,
> >>
> >> I am sorry for a little bit off-topic question but this is a place
where
> >> there are many UML experts and maybe someone could at least point me to
> >> a place where I could look for an answer.
> >>
> >> I need to model object creation and initiation using UML actions. Say,
> >> we have a class Person(name:String, address:String). The most obvious
> >> solution is to use CreateObjectAction and then twice
> >> AddStructuralFeatureValueAction for the name and the address. How could
> >> I pass the newly created object to the two initiating actions?
> >> According to the specification ForkNode will copy the object, which is
> >> wrong and using two competing ObjectFlows will send the resulting
object
> >> to one of the AddStructuralFeatureValueAction objects only.
> >>
> >> Thanks for any ideas,
> >> Krzysztof
> >
> >
Re: modeling object creation action [message #623666 is a reply to message #474208] Sun, 15 July 2007 02:42 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Krzysztof ,

You question is not off-topic.
I'm not an expert in this area but have you considered modeling the
constructor with a CallOperationAction.
A CreateObjectAction to indicate the creation of Person, with the <<result>>
outputpin connected with an object flow to the <<target>> input of the
CallOperationAction for the person(name,address) constructor. Name and
Address would be two input pins on the call operation action.


- James.



"Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
news:f79o9e$hug$1@build.eclipse.org...
> Dear All,
>
> I am sorry for a little bit off-topic question but this is a place where
> there are many UML experts and maybe someone could at least point me to
> a place where I could look for an answer.
>
> I need to model object creation and initiation using UML actions. Say,
> we have a class Person(name:String, address:String). The most obvious
> solution is to use CreateObjectAction and then twice
> AddStructuralFeatureValueAction for the name and the address. How could
> I pass the newly created object to the two initiating actions?
> According to the specification ForkNode will copy the object, which is
> wrong and using two competing ObjectFlows will send the resulting object
> to one of the AddStructuralFeatureValueAction objects only.
>
> Thanks for any ideas,
> Krzysztof
Re: modeling object creation action [message #623668 is a reply to message #474209] Mon, 16 July 2007 07:44 Go to previous message
Krzysztof Kaczmarski is currently offline Krzysztof KaczmarskiFriend
Messages: 88
Registered: July 2009
Member
Hi James,
obviously, this will work only if an object has a constructor.

Can you confirm that my understanding of the UML standard being not
clear in this aspect is correct?

Thanks,
Krzysztof

James Bruck wrote:
> Hi Krzysztof ,
>
> You question is not off-topic.
> I'm not an expert in this area but have you considered modeling the
> constructor with a CallOperationAction.
> A CreateObjectAction to indicate the creation of Person, with the <<result>>
> outputpin connected with an object flow to the <<target>> input of the
> CallOperationAction for the person(name,address) constructor. Name and
> Address would be two input pins on the call operation action.
>
>
> - James.
>
>
>
> "Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
> news:f79o9e$hug$1@build.eclipse.org...
>> Dear All,
>>
>> I am sorry for a little bit off-topic question but this is a place where
>> there are many UML experts and maybe someone could at least point me to
>> a place where I could look for an answer.
>>
>> I need to model object creation and initiation using UML actions. Say,
>> we have a class Person(name:String, address:String). The most obvious
>> solution is to use CreateObjectAction and then twice
>> AddStructuralFeatureValueAction for the name and the address. How could
>> I pass the newly created object to the two initiating actions?
>> According to the specification ForkNode will copy the object, which is
>> wrong and using two competing ObjectFlows will send the resulting object
>> to one of the AddStructuralFeatureValueAction objects only.
>>
>> Thanks for any ideas,
>> Krzysztof
>
>
Re: modeling object creation action [message #623679 is a reply to message #474211] Mon, 16 July 2007 15:49 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Krzyszt,

I think I understand what you are trying to accomplish now.

To model what you want you might try creating object flows from the
<<result>> of the CreateObjectAction. You can create two object flows from
the same <<result>> output pin. Then create control flows from the create
object action to one structural feature value action. From that structural
feature value action you can create another control flow to the other
structural feature value action.

For the complete solution, for your Activity that models the creation you
can:
1. create 3 Activity Parameter Nodes on the activity corresponding to name
and address and result
2. create a Create Object Action.
3. Create a start point and end point.
4. create 2 add structural feature value action.
5. from one activity parameter node corresponding to name, create a object
flow to an input pin on the add structural feature value action.
6. [ same as above for address ]
7. From your start point create a control flow to the create object action.
8. From the create obj action create a control flow to one SFVA.
9. From that SFVA create a control flow to the other SFVA.
10. From the COA result pin create two object flow to second input pins on
SFVA.
11. From one SFVA create control flow to final node.
12. from <<result>> COA create control flow to APN corresponding to result.

I believe this is what you are trying to do.
It does seem a bit hairy for such a simple task.

- James.



"Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
news:f7f7lg$64m$1@build.eclipse.org...
> Hi James,
> obviously, this will work only if an object has a constructor.
>
> Can you confirm that my understanding of the UML standard being not
> clear in this aspect is correct?
>
> Thanks,
> Krzysztof
>
> James Bruck wrote:
> > Hi Krzysztof ,
> >
> > You question is not off-topic.
> > I'm not an expert in this area but have you considered modeling the
> > constructor with a CallOperationAction.
> > A CreateObjectAction to indicate the creation of Person, with the
<<result>>
> > outputpin connected with an object flow to the <<target>> input of the
> > CallOperationAction for the person(name,address) constructor. Name and
> > Address would be two input pins on the call operation action.
> >
> >
> > - James.
> >
> >
> >
> > "Krzysztof Kaczmarski" <k.kaczmarski@mini.pw.edu.pl> wrote in message
> > news:f79o9e$hug$1@build.eclipse.org...
> >> Dear All,
> >>
> >> I am sorry for a little bit off-topic question but this is a place
where
> >> there are many UML experts and maybe someone could at least point me to
> >> a place where I could look for an answer.
> >>
> >> I need to model object creation and initiation using UML actions. Say,
> >> we have a class Person(name:String, address:String). The most obvious
> >> solution is to use CreateObjectAction and then twice
> >> AddStructuralFeatureValueAction for the name and the address. How could
> >> I pass the newly created object to the two initiating actions?
> >> According to the specification ForkNode will copy the object, which is
> >> wrong and using two competing ObjectFlows will send the resulting
object
> >> to one of the AddStructuralFeatureValueAction objects only.
> >>
> >> Thanks for any ideas,
> >> Krzysztof
> >
> >
Previous Topic:add Package to Model
Next Topic:Re: Can we implement an operation in pure OCL
Goto Forum:
  


Current Time: Fri Apr 26 00:16:36 GMT 2024

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

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

Back to the top