Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to access instances of classifiers in Activity Diagram
How to access instances of classifiers in Activity Diagram [message #1820828] Wed, 29 January 2020 20:09
Gerhard Jensen is currently offline Gerhard JensenFriend
Messages: 7
Registered: January 2020
Junior Member
Hi folks,

I'm new to Papyrus and have been using SysML 1.4 to model a software system. I have a single Block called Domain with various child Blocks. For the sake of discussion I'll call one of the child blocks Foo. The Domain block has an attribute foo that refers to a single instance of Foo.

In an Activity diagram, I want to call an operation Foo::bar() on the instance child. In Java it would be expressed foo.bar(). The Call Operation block has a target input pin that needs to be connected to an instance of Foo.

How do I get the foo attribute from my Domain block to connect to the target pin?

I've tried passing in an instance of Domain as a parameter to the Activity, then adding a ReadStructuralFeatureAction to extract foo. That passes validation but is clunky and I'm not sure it's correct.

It would seem an Object node would be useful for this, but this apparently does not exist in Papyrus, as discussed here.

Alternatively, I can add an Activity Parameter to the diagram, but then the Operation signature of the Activity now requires an instance of Foo as one of the input parameters. That seems clunky, especially for my case where I have only one Foo in the system.

I tried a DataStore block, which looks good in the diagram, but it appears I cannot share the same DataStore across multiple activity diagrams.

What's the canonical SysML way to do this?

I sure appreciate any nudge in the right direction. Please let me know if I should post a minimum example to make it more clear.

Thanks!

G.
Previous Topic:Can't create an Association as a child of the root model element
Next Topic:Problem with additional adjustment of bendpoints as part of user interaction
Goto Forum:
  


Current Time: Thu Apr 25 11:48:36 GMT 2024

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

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

Back to the top