-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Node
The Initial Node represents the starting point of an Activity or Structured Activity Node. It is a special type of Node that has no incoming Flows and is automatically activated when the Activity/Structured Activity Node executes.
An Initial Node consists of:
- Name, uniquely identifying the Initial Node within the Activity,
- Outgoing Control Flows, passing Control Token to the next Nodes.
In UML, an Initial Node is represented as a filled circle:
flowchart
initial@{ shape: circle, label: " " }
initial --> action1
action1(SomeAction)
initial --> action2
action2(AnotherAction)
Equivalent Stateflows notation of an Initial Node:
/* fragment of Activity definition */
.AddInitial(b => b
.AddControlFlow("SomeAction")
.AddControlFlow("AnotherAction")
)
.AddAction("SomeAction",
async c => {
/* logic for the action */
}
)
.AddAction("AnotherAction",
async c => {
/* logic for the action */
}
) public class SomeAction : IActionNode
{
public async Task ExecuteAsync()
{
/* logic for the action */
}
}
public class AnotherAction : IActionNode
{
public async Task ExecuteAsync()
{
/* logic for the action */
}
}
/* fragment of Activity definition */
.AddInitial(b => b
.AddControlFlow<SomeAction>()
.AddControlFlow<AnotherAction>()
)
.AddAction<SomeAction>()
.AddAction<AnotherAction>()Using lambda style and typed style doesn't change anything for Initial Node - it is not referenced by name nor type, simple
AddInitial()call declares it.
The Initial Node is the entry point of an Activity and Structured Activity Nodes and is executed when Activity / Structured Activity Node is initialized. It is not mandatory though: Activity can define no logic on initialization, but react to incoming Tokens using Input Node or to incoming Events using Accept Event Action Nodes.
Home page Support Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0. © by Mikołaj Milewski, 2025
Overview
Installation
Behaviors
State Machines
Building blocks
States
State
Composite State
Orthogonal State
Final State
Pseudostates
Choice
Junction
Fork
Join
Transitions
Transition
Default Transition
Internal Transition
Concepts
Evaluation of Transitions
Activities
Building blocks
Nodes
Action Node
Decision Node
Merge Node
Initial Node
Final Node
Input Node
Output Node
Fork Node
Join Node
Accept Event Action Node
Send Event Action Node
Data Store Node
Structured Activity Node
Iterative Activity Node
Parallel Activity Node
Flows
Data Flow
Control Flow
Concepts
Implicit fork and join
Actions