The UML 2.5 spec
has one tiny example in 12.3.3 Extensions, from which I have been
extrapolating a typesafe solution that is implemented by the pivot-based
Eclipse OCL.
Transition.allInstances()->select(t | t.getAppliedStereotypes().name->includes('ensureRole')).getAppliedStereotypes().getAllAttributes()->select(x|x.name='role')
ensureRole::ensureRole::role
... </uml:Model> <ensureRole:ensureRole xmi:id="_e75g0Cu0EeWNw6GF_Fgubg" base_Transition="__AaxQIRzEeSbXcAiNcJFPQ"> <role>a=b</role> <role>x=y</role> </ensureRole:ensureRole> </xmi:XMI>
<transition xmi:type="uml:Transition" xmi:id="__AaxQIRzEeSbXcAiNcJFPQ" name="Transition3" source="_9qKwAIRzEeSbXcAiNcJFPQ" target="_pExbcIBkEeSC14s56zC7NQ"/>