Subscribing to autonomously published conditions

To express their interest in events published by other components, subscribers can use the ham_condition_state() and ham_condition_raise() API calls.

These are similar to the ham_condition() API call (e.g., they return a handle to a condition), but they allow the subscriber customize which of several possible published conditions they're interested in.

Trigger based on state transition
When an entity publishes a state transition, a state transition condition is raised for that entity, based on the two states involved in the transition (the from state and the to state). Subscribers indicate which states they're interested in by specifying values for the fromstate and tostate parameters in the ham_condition_state API call.
Trigger based on specific published condition
To express interest in conditions raised by entities, subscribers can use the API call ham_condition_raise(), indicating as parameters to the call what sort of conditions they're interested in.

For more information, see the API reference documentation in the High Availability Framework Developer's Guide.