Deferred Event

The Deferred Event pattern.

Figure 1. Shows a StateMachine diagram that contains a number of simple states connected by transitions each with a an Event defined.

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
While the pattern is a demonstration of deferred events in a state machine model, it more importantly demonstrates the power of the Executable StateMachine feature in Enterprise Architect, which can:
·	Generate executable code for various languages 
Compile and build the code
Visualize the execution
Allows user interaction with running State Machines
Supports debugging

The pattern is accessed from the Model Wizard. The Model Wizard creates the relevant assets. The Simulation ribbon is the used to generate build and run the Executable StateMachine model.

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
Deferred Event Pattern
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.