Adding an entry or an exit action to a state

An entry action is an activity that is executed when entering a state, while the exit action is executed while leaving one.

To add an entry or an exit action to an state or a composite state, proceed as follows:
  1. On the canvas, select and hover over the state that you want to modify. The entry and/or exit element icons will appear in a action bar as shown in this image.
    The entry and exit elements appear when you select a state activity.
  2. Click the appropriate entry or exit element icon in the action bar.
  3. In the Properties area, click the Details tab.
  4. Determine which type of implementation you would like to use. You have the following choices:
    Option Description
    Visual Choose this to use the visual snippet editor to graphically compose Java™ code.
    Java Choose this to write the Java code yourself.
    Invoke Choose this to invoke an operation on a reference.
Your newly created entry or exit action will appear on the canvas along with the activity that it is associated with.
Related tasks
Working with composite states
Adding a state to a state machine
Adding a transition to a state machine

Feedback
(C) Copyright IBM Corporation 2005, 2007. All Rights Reserved.