Pin
Description
A pin acts as a buffer for object tokens and directs tokens into or out of an action node. The directionality of the pin represents input or output. You can connect pins by object flows.
These are the two types of input and output pins:
Streaming pins

Non-streaming pins

Action nodes with both types of pins begin execution only once all the input pins hold the minimum number of object tokens. For input pins, once the multiplicity condition is met, the software does not reevaluate the condition until the nested activity restarts. Action nodes with both types of pins terminate only once all the output pins receive at least one token.
Streaming pins and non-streaming pins differ based on how tokens are handled when the action node is executing.
Note
Streaming pins can only be configured for action nodes with a nested activity diagram.
Streaming Pins
Streaming input pins continue to accept and buffer all the tokens that arrive at the pin once the nested activity begins to execute. As the tokens arrive, the software forwards the tokens to the corresponding input parameter node.
Streaming output pins enable the corresponding output parameter nodes to accept and forward incoming tokens. Output parameter nodes can forward the tokens regardless of whether the action is completed.
Non-Streaming Pins
Non-streaming input pins block any incoming object tokens while the action node executes, which causes output object tokens to go into a pending state in the output pins of the previous nodes. If an output pin already has a pending token, any new generated token is discarded. This action is called blocking behavior.
Non-streaming output pins rely on the corresponding output parameter node to hold any incoming tokens. The tokens are forwarded to the output pin only when the action node finishes execution.
Examples
Parameters
Version History
Introduced in R2024aSee Also
Functions
systemcomposer.createActivity|addNode|addParameter|getNode|getNodes|getFlow|connect|getParameter|getParameters|getPin|getPins|addPin|getParentPin|applyStereotype|removeStereotype|getStereotype|destroy|setBehaviorType
Objects
systemcomposer.activity.Action|systemcomposer.activity.Activity|systemcomposer.activity.ActivityNode|systemcomposer.activity.ActivityFinal|systemcomposer.activity.ControlNode|systemcomposer.activity.Flow|systemcomposer.activity.FlowFinal|systemcomposer.activity.Model|systemcomposer.activity.JoinFork|systemcomposer.activity.Initial|systemcomposer.activity.MergeDecision|systemcomposer.activity.Parameter|systemcomposer.activity.Pin
Tools
Blocks
- Initial Node | Action Node | Parameter Node | Decision or Merge Node | Join or Fork Node | Flow Final Node | Activity Final Node
Topics
- Describe System Behavior Using Activity Diagrams
- Establish Traceability and Extend Model Elements
- Simulate, Visualize, and Validate Activity Diagrams
- Compose Architectures Visually
- Implement Component Behavior Using Activity Diagrams
- Implement Component Behavior Using Stateflow Charts
- Implement Component Behavior Using Simscape

