Entry and Exit Points

The Entry and Exit Point pattern creates a simulation and elements and a diagram that models how a State can be entered and exited through discrete points that are defined on the boundary of a state or SubMachine state. The use of Entry and Exit Points allows the State Machine to specify what states should be transitioned to and from when the Points are reached.

Figure 1. Shows a StateMachine diagram that models Entry Points and Exit Points both for a State and for a SubMachine State.

Figure 2. Shows a navigation diagram that contains navigation cell that can be used to access parts of the model including a Process Guidance diagram, the State Machines and the Simulation elements.
Discussion
The purpose of the pattern is to demonstrate the simulation of a State Machine and how Entry Points and Exit Points can be used to control the behavior of the machine when entering and exiting states in two different ways. 
·	Firstly, it allows a modeler to specify multiple valid starting points when entering a composite state.
Secondly, when specifying a SubMachine State a modeler can map the Entry Points and Exit Points in that State to the corresponding nodes in the referenced State Machine.

The following is a list of some things you may want to do when working with this pattern.
Once the Patterns has been downloaded use the Turbine Simulation Navigation diagram to access different parts of the pattern as follows:
·	Open the Process Guidance diagram to view the list of steps to run the simulation and follow these to run the simulations.
Select the elements in the Turbine Simulation element and use the Simulate ribbon to run the simulations.
Open the State Machine diagrams and view the Models that are used as the basis for the simulation.

The following is a list of some of the next steps available when applying the pattern.
·	Deferred Event
Entering a State
Fork and Join
History Pseudostate
Simulation Commands
Reference
The following help topics will assist you learn about how to work with this pattern.
Executable StateMachines
Example Executable StateMachine
Simulation of Executable StateMachines
Entry and Exit Points
Tools you may find useful
The following are some of the tools that will be helpful when working with this pattern.
Visual Execution Analyzer
The Visual Execution Analyzer is made up of an advanced and powerful suite of tools that allow you to build, debug, record, profile, simulate and otherwise construct and verify your software development while keeping the code tightly integrated with your model. Enterprise Architect has rich support for a wide range of popular compilers and platforms, in particular the Java, .Net and Microsoft Windows C++ environments. Software development becomes a highly streamlined visual experience, quite unlike working in traditional environments. For more details see the Visual Execution Analyzer  help topic.
Compiled Simulator
The Compiled Simulator provides a number of facilities for working with Executable State Machines. This includes generating the state models to a variety of programming language code, building and running a simulation. Analyzer Scripts can be configured that determine how code is generated, compiled and executed for the Executable State Machine. The generated code can be viewed and edited using the built-in code editor and the execution analyzer can be used to debug running code. For more details see the Using the Compiled Simulation Panel help topic.
Model Simulator
Model Simulation brings your behavioral models to life with instant, real-time behavioral model execution. Coupled with tools to manage triggers, events, guards, effects, breakpoints and simulation variables, plus the ability to visually track execution at run-time, the Simulator is a powerful means of 'watching your behavioral models in action' and verifying their correctness. With Simulation you can explore and test the dynamic behavior of models.  For more details see the Model Simulation help topic.
Element Discussions
The Element Discussion facility is a fully featured collaboration tool allowing modelers and model viewers and reviewers to communicate with each other directly inside the repository. Modelers using the full client or occasional viewers using WebEA can both post and reply to discussions and communicate and engage in chat. For more details see the Element Discussions help topic.
Hand Drawn and Whiteboard Diagrams
The Hand Drawn and Whiteboard Mode are display options available for any diagram that changes a system-drawn diagram to appear as though it was drawn by hand and, optionally, hand drawn on a whiteboard. It is a powerful device to engage an audience by presenting the diagram in a rough and more immediate style giving the impression that it is just a sketch that can be changed. For more details see the Hand Drawn and Whiteboard Mode help topic.
Diagram Layout
The Diagram Layout tool allows you to layout an entire diagram, selected elements or sections of a diagram to make it more visually appealing or meaningful to a particular audience. There are a wide range of layout types to choose from and some types have filters that can be applied. For more details see the Diagram Layout help topic.
Pan and Zoom
The Pan and Zoom facility is one of the tools that can be used to navigate around a large diagram. Often the resolution of a diagram must be reduced to ensure it is wholly visible but by using the Pan and Zoom window you can leave the diagram at a readable resolution and pan around to areas of interest zooming in when necessary. For more details see the Pan and Zoom help topic.
Diagram Legends
The Diagram Legend facility is useful for manually or automatically changing the appearance of elements and connectors on a diagram. A legend can be added from the Common Toolbox and configured to codify the fill and line color and line thickness. This is a powerful way to add meaning and expression to a diagram and is particularly expressive when applied automatically based on element or connector properties. It can be used with a number of specialized diagrams such as roadmaps to create a powerful visualization.  For more details see the Diagram Legends help topic.