Tags and keywords
Recall that in the top-level Controller
Activity we had a final ActivityEdge with this guard in Action Language for Foundational UML (Alf):
[this.dialer.number.isValid()]
Sweet! Direct UML-friendly access to an Operation, even when it is owned by a deeply nested child part. So how might this look if we instead used the vendor-specific Action Language Helper (ALH) API directly on the guard?
Mmmm. Not quite as elegant:
[ALH.callOperation(ALH.getValue(ALH.getValue(self,"dialer"),"number"),"isValid")]
To avoid all of that clumsy navigation we could of course encapsulate it in an OpaqueBehavior and assign it as the 'method' of an additional Operation isNumberValid()
on the Controller
class, and then slightly less awkwardly access that:
[ALH.callOperation(self,"isNumberValid")]
But it's kind of "cheating", or at best not as elegant as with Action Language for Foundational UML (Alf). Nevertheless, ALH can handle a wide range of cases that the other basic action scripting languages can't.
You may wish to visit one of these tutorials next: