ProcessStation

class ProcessStation(parent: ModelElement, activity: suspend KSLProcessBuilder.(ModelElement.QObject) -> Unit, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null) : ProcessModel, QObjectReceiverIfc, RoutingOutletsIfc(source)

A station whose "activity" is an arbitrary process-view KSLProcess rather than a fixed delay — the delegate-and-continue generalization of an activity station.

On receiving an instance, the station spawns a transient carrier ProcessModel.Entity that runs the supplied activity (which may seize resources, delay, move, hold, or anything the process view supports). When the process completes, the original instance is sent onward. Activation is non-suspending, so the station's flow is driven by events while the coroutine work happens inside the carrier's process.

This is an integration adapter: it depends on the process view (ksl.modeling.entity) and lives in the integration package so the core station package stays coroutine-free.

Create one via the processStation extension on StationNetwork.

Parameters

parent

the model element serving as this station's parent (typically the network)

activity

the process to run for each instance; receives the instance

nextReceiver

where instances are sent after their process completes

name

the name of the station

Constructors

Link copied to clipboard
constructor(parent: ModelElement, activity: suspend KSLProcessBuilder.(ModelElement.QObject) -> Unit, nextReceiver: QObjectReceiverIfc = NotImplementedReceiver, name: String? = null)

Properties

Link copied to clipboard
open override val hasOnwardRouting: Boolean

True if this node has any onward routing configured (a static next receiver, a station-level sender, or a class route). A non-terminal node for which this is false — and which is not a non-terminal step of a registered route — is a dangling node and fails validation.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Sets the receiver of instances whose process has completed.

Link copied to clipboard
open override fun outlets(): List<QObjectReceiverIfc>

The statically known receivers this node may route to. Best-effort: empty when the node has no static link or when its routing is opaque (for example, a probabilistic sender whose destinations are not introspectable).

Link copied to clipboard
open override fun receive(arrivingQObject: ModelElement.QObject)