Abstract.With their revision in the UML 2.x standard, activities have been extended with streaming parameters. This facilitates a reuse-oriented specification style, in which dedicated functions can be contributed by self-contained activities as building blocks: Using streaming parameters, activities can be composed together in a quite powerful manner, since streaming parameters may also pass information while activities are executing. However, to compose them correctly, we must know in which sequence an activity may emit or accept these streaming parameters. Therefore, we propose special UML state machines that specify the externally visible behavior of activities. Further, we develop an algorithm to construct these state machines automatically for an activity based on model checking. Using these behavioral contracts, activities can then be composed without looking at their internal details. Moreover, the contracts can be used during system verification to reduce the complexity of the analysis.