Author Topic: Compartment Visibility Sometimes Too-Filtered  (Read 2569 times)

Miguel

  • EA User
  • **
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Compartment Visibility Sometimes Too-Filtered
« on: April 11, 2022, 01:21:37 am »
Hi Folks,

The dialog for Compartment Visibility on a Block is filtered to show only those compartments that EA deems appropriate for a Block.  However, I sometime find this filtering to be too aggressive.  (I'm using EA15.2 1560)

My real question is if there is a way to turn off this 'feature' and to show all possible Block compartments in the dialog, so that I can choose those that I want.  Actually, I have to admit, I don't love this feature, anyway, because it causes the listing of compartments to move around each time I bring them up... I would much prefer a static, complete set to select from.

I'm going to address this through a specific example, but please keep in mind, that I'm not really looking for a discussion on the merits of this example, but rather about the compartment visibility dialog itself.

I have found cases in which the "classifier behavior" compartment is not selectable, even when there is a Classifier Behavior designated for a Block.  This is just one example where EA has determined (incorrectly) that the compartment doesn't apply.

I most often see this in the case that a State Machine is not owned by the block, but allocated to it, and designated as the Classifier Behavior.  However, in the case below, the State Machine is an owned behavior.  This is inconsistent and I don't know under what circumstances the dialog filter determines when to show or not show that compartment for selection.



Notice above that EA has determined not to allow me to select the "classifier behavior" compartment.

Is there a way to turn off this compartment EA-filtering in the dialog?

As always, thanks for your help,
Miguel

qwerty

  • EA Guru
  • *****
  • Posts: 13525
  • Karma: +395/-300
  • I'm no guru at all
    • View Profile
Re: Compartment Visibility Sometimes Too-Filtered
« Reply #1 on: April 11, 2022, 05:21:04 am »
I would guess that this is because of a SysML constraint. Eve would probably know more about it.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Compartment Visibility Sometimes Too-Filtered
« Reply #2 on: April 11, 2022, 09:29:03 am »
EA can't provide a static list of all possible compartment names because they are user-configurable in shape scripts (which is the mechanism that SysML uses). Also, compartments can be named after the member's stereotype and there's an endless supply of those. In your example, it appears that EA hasn't recognized that you have moved an element from the owned behaviors to classifier behavior compartment, so you might need to reload or reopen your diagram.
The Sparx Team
[email protected]

Miguel

  • EA User
  • **
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Compartment Visibility Sometimes Too-Filtered
« Reply #3 on: April 12, 2022, 01:09:14 am »
Thanks for the responses, qwerty and KP.

Two aspects of this: compartment visibility and Classifier Behavior; let me comment on both -

Compartment visibility - KP, that's a great point.  However, I'd say that SysML defines a finite set

 https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/block_element_compartments.html

which can then be extended by the user.  Why not simply display all 32 of the SysML-defined compartments in the Compartment Visibility dialog?  In the example above, it is allowing me to select among 22.  If 10 more were shown, without dynamic filtering, then this would alleviate cases where a compartment is not selectable when it should be, and allow the modeler to select as desired, even if that creates an empty compartment.  Additionally, this would create a dialog where those 32 compartments are always available, in the same order, making the compartment visibility dialog more static (and useable).  I think this would be a reasonable user profile configuration choice by the user.  Any user-defined compartments can be managed in whatever way they currently are.

Classifier Behavior - after experimentation, your suggestion of reloading the model does seem to resolve this in some cases, but not others.  What I have learned is:
 - Only Owned Behaviors can be shown in the "classifier behavior" compartment
 - Non-owned behaviors can be selected as the Classifier Behavior, but will never show in the classifier behavior compartment, or at least, I can't force the classifier behavior compartment to be displayed because of the Compartment Visibility dialog filtering, described in this thread.
 - Using <<allocate>> to allocate an activity to a block doesn't solve this... the Classifier Behavior must be "owned" for the Compartment Visibility dialog to allow me to select the classifier behavior compartment. 
 - If I have only one Owned Behavior, and that Owned Behavior is selected as the Classifier Behavior, then I cannot select the owned behaviors compartment in the Compartment Visibility dialog. 
 - If there are many Owned Behaviors and the Classifier Behavior is also an Owned Behavior, then it will not be displayed in the owned behaviors compartment, even if the classifier behavior compartment is suppressed.

So, I suppose this is a SysML question; one I'm not qualified to answer, but hoping you are... Does SysML require that a Classifier Behavior must be an Owned Behavior or is this just an assumption by EA?  Personally, I'd find that odd in light of the ability to allocate non-owned behaviors to blocks. But, I'm just not smart enough on the SysML definition to know if that is or isn't the case.  Hoping someone smarter than me can provide an answer on that ;-).

Thanks,
Miguel

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Compartment Visibility Sometimes Too-Filtered
« Reply #4 on: April 12, 2022, 07:48:28 am »
So, I suppose this is a SysML question; one I'm not qualified to answer, but hoping you are... Does SysML require that a Classifier Behavior must be an Owned Behavior or is this just an assumption by EA?  Personally, I'd find that odd in light of the ability to allocate non-owned behaviors to blocks. But, I'm just not smart enough on the SysML definition to know if that is or isn't the case.  Hoping someone smarter than me can provide an answer on that ;-).

Thanks,
Miguel


It's actually a UML constraint: classifierBehavior[0..1] subsets ownedBehavior. See UML 2.5.1 Figure 13.1 

And then in Section 13.2.3.4:

Quote
A BehavioredClassifier may have a distinguished ownedBehavior called its classifierBehavior. A classifierBehavior describes
the behavior an instance of the owning Classifier may undergo in the course of its lifetime. The classifierBehavior of a
BehavioredClassifier is considered to be invoked when an instance of the owning BehavioredClassifier is created and
the resulting execution has the new instance as its context object. The execution is terminated if the instance is
destroyed.

The Sparx Team
[email protected]

Miguel

  • EA User
  • **
  • Posts: 48
  • Karma: +1/-0
    • View Profile
Re: Compartment Visibility Sometimes Too-Filtered
« Reply #5 on: April 12, 2022, 11:21:03 pm »
Ok, thank your for the clarification, KP!  I do find that a bit surprising, but it explains a lot.  I appreciate your help with this.

Miguel.