Custom Code

Now that we have a controller for our use-case, and we have a few operations modeled in that controller, we can start deferring (delegating) control from specific points in our activity graph.

There are two different locations from where to defer control: action states and decision points.

We have already seen how to use decision points , this is one place where you can defer control. For decision points there is a special requirement though: the operation must have a return value.

You must model a call-event trigger on the transition entering the decision point. If you have properly associated the controller to the use-case you should be able to enter/select the operation to execute there.

Server-side action states can also defer control to one of your operations, just add a deferrable event to the action state, you may model as many of such events as you wish, they will be executed in the order you add them. It is possible you must explicitely tell your UML tool to show deferrable events in your action state.

Next

It's possible to model the objects you want stored in session scope, learn all about that here: Session Objects .