Tags and keywords
The following specification constraint suggests that the AllocateActivityPartition mechanism in Activity Diagrams should only be used for usage-level allocations:
But an ActivityPartition (including an AllocateActivityPartition) swimlane may represent a Classifier (definition level, such as a Block), and the tool optionally supports definition level allocations via swimlanes, so one has to be very careful using the feature:
Here we look at some DOs and DON'Ts when working with CallBehaviorAction in swimlanes in Activity Diagrams. First, we look at some cases when under usage allocation mode, including some "pathological" cases that have been provoked:
actionAllocatedToParttyped by an Activity
AllocateUsageToParthas been allocated to a part Property
part:AllocateToMyInstance, which happens to be within a Block
AllocateToMyPart. Note that the underlying Activity
AllocateToMyInstanceis NOT allocated; happy campers.
If you've been following this trail you'll of course already have taken this advice to heart:
actionAllocatedToBlock1- typed by Activity
AllocateUsageToBlock1- in the 2nd swimlane column (in the middle) appears visually in an ActivityAllocatePartition, so according to the following constraint it "should" be allocated to something:
AllocateActionToMe1, which usage allocation mode can't handle. An allocation has nevertheless been HACKED in "manually" here using this otherwise nice tool feature:
But instead of using a nice part Property, an allocation to the block
AllocateActionToMe1 was made. Yuck!
From the point of view of the BDD, the next case looks fine; there is a direct «allocate» from Activity
AllocateToBlock1 to Block
AllocateActivityToMe1. But look at the action
myActivityIsAllocatedToBlock1 - typed by Activity
AllocateToBlock1 in the 3rd swimlane column;it is not allocated to anything, once again breaking the above constraint.
If you run the tool's validation engine with the 'SysML ValSuite' it gives an info level message for both the 2nd and 3rd swimlanes:
The conclusion drawn here is:
But since breaking things is so much fun and a great way to learn stuff, we'll see next whether we can get into an even deeper mess using definition allocation mode.