As you build the behavior model, you will identify roles that must be involved
to support each behavior. These are represented by Partitions in Activities
and Lifelines in sequence diagrams. You can assign each role to a
previously defined Capability
or to a previously defined ServiceInterface,
or you can leave the role unassigned. If you are using sequence diagrams,
you also can assign the role to a new element, which you create at the same
time that you create the Lifeline. This new model element will be owned
by the parent of the Collaboration, which owns the sequence diagram.
If the focus is on conceptual modeling
If you are focusing for the moment on conceptual modeling -- if your main
goal is simply to identify interaction patterns of "things" that support a given
behavior -- use unassigned roles. You can assign these roles to more concrete
model elements later and manually create operations that map to the actions
and messages you discovered during your conceptual modeling.
Activity modeling considerations
If you create a Call Operation Action in an Activity diagram by using the
drawing palette, you can create an operation at the same time. This newly created operation
is owned by the Activity, and its target pin references the Activity, even if
the Call Operation is created within a typed Partition. Later, you can relocate
this operation to an appropriate element (such as the element that types the
Partition). This relocation will be reflected in the Call Operation Action's
target pin.
The act of creating a Partition in an Activity diagram does not automatically create another element in the model
to represent the Partition's role. The Partition is, in essence, its own role. However, the
Partition cannot be used to populate the Collaboration's structure diagram. It is not a property or a part of the
Collaboration. You will need to manually create a Collaboration Role to represent the Partition.
Activity diagrams that are constructed to support service collaboration modeling
can be built with less care than is the case with activity diagrams which are
used to model the realizations of service operations. It is not necessary
to do things such as create activity parameters, assign the activity to a given
operation, and so forth. This is because the diagrams created in the service
collaboration portion of the model template are not source content for subsequent
transformation into SOA artifacts.
Sequence diagramming considerations
Creating a Lifeline in a sequence diagram automatically creates a new Collaboration
Property model element that represents the role played by the Lifeline. This
property can be used to populate the collaboration's structure diagram.
If you perform conceptual modeling by using untyped roles, subsequently typing
those roles with a Capability or ServiceInterface will not automatically create
new operations to match the messages that were created for the role. You will
need to manually create operations for the new model element and (if desired)
associate each operation with appropriate messages. |