add_assembly
Creates a join pattern that synchronizes multiple input flows into one output. Configurable with named slots, weighted inputs, and assembly time.
Instructions
Add an Assembly (Join) pattern that synchronizes multiple flows into one.
Creates one new input place per slot named "{name}In{slot_name}" and a transition that fires when ALL slots have tokens. The caller must wire external sources to those slots via connect_patterns — the slot place_ids are returned in the response and in metadata.
WEIGHTED INPUTS (for multiple tokens required):
Simple: inputs=["PartA", "PartB"] - requires 1 token from each
Weighted: inputs=[{"name": "Type1", "weight": 10}, {"name": "Type2", "weight": 10}]
Args: name: Name for this assembly (e.g., "CarAssembly", "SectionFill") inputs: Names for the input slots created by this assembly assembly_time: Mean firing time in time_unit distribution: Time distribution priority: Transition priority (higher = fires first in conflict) time_unit: Unit for time values — "s", "min", "h", or "d" (days)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| inputs | Yes | ||
| assembly_time | No | ||
| distribution | No | det | |
| priority | No | ||
| time_unit | No | s |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |