IDE & Navigation
Properties & Tools
»Model Editor Transition Context Menu: Trans Property
A transition/edge represents a path from one state/node to another. In web application model this usually represents a click on an anchor link, a button or a map. Transition/Edge properties can be viewed and edited in this Transition Property dialog accessed through transition's context menu.
Click on the button “Save” to save the changes.
Guard conditions are used to selectively turning on and off a transition based on mScript expression which evaluates to true or false (see mScriptFunc).
Guard condition is specified with an mscript expression. Typically you would use any of the boolean operation mscript functions, e.g. $compare(), $isTrue().
You may nest the mscript function calls.
or more complex expression like:
With Rel. 3.2 (new), you may use Guard trigger for multiple and complex guard conditions.
When traversing the model, sequencers must deal with the transitions/edges that fail due to guard conditions. All sequencer are designed to automatically resolve the guard failures by finding an alternate path. Most of the time this is sufficient. From time to time the sequencer may need some hints to resolve the guard failure or find better path to resolve a particular guard failure.
Hint is a code or series of codes assigned to transitions/edges.
Hint may be shared by multiple transitions/edges. For example a set of transitions/edges may require user to be logged in. It's obvious that in order to perform the login, you can just traverse the login transition (State Diagram) or edge that leads to the login process (Activity Diagram). Since computer doesn't know that, we need a mechanism to bridge the transition/edge that requires the login and the transition that performs the login. And we do so by assigning the designated hint to both transitions/edges.
If multiple hints are assigned (separated by comma), any of the hints will be sufficient to satisfy the demanding transition/edge.
Set var is triggered when the transition is traversed and the variable specified is automatically set to the value evaluated from the expression specified in “Set Var” field. This is just is equivalent to calling the mscript function $setVar('varName','varValue') in any of the transition triggers.
Set Var takes the following format:
Both varName and value must be static value and can not be an expression. You can also set the variable using the mScript function setVar('varName','varValue) which allows both varName and varValue to be specified in mScript expression.