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 communication between an Assembly and an HCD only. See Matching state for command completion.

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