Publishing State

A component has access to a currentStatePublisher Actor, which can be used to publish its CurrentState. Any subscriber of this component will receive the published state.

Note

This feature is provided for optimized communicaton between an Assembly and an HCD only. See Matching state for command completion.

Scala
// Publish the CurrentState using parameter set created using a sample Choice parameter
currentStatePublisher.publish(CurrentState(prefix, StateName("testStateName"), Set(choiceKey.set(initChoice))))
Java
CurrentState initState = currentState.add(SampleComponentState.choiceKey().set(SampleComponentState.initChoice()));
currentStatePublisher.publish(initState);