bobocep.cep.engine.decider.runserial.BoboRunSerial

class bobocep.cep.engine.decider.runserial.BoboRunSerial(run_id: str, phenomenon_name: str, pattern_name: str, block_index: int, history: bobocep.cep.event.history.BoboHistory)[source]

Bases: bobocep.bobocep.BoboJSONable

Represents the state of a run and is designed to be serializable.

__init__(run_id: str, phenomenon_name: str, pattern_name: str, block_index: int, history: bobocep.cep.event.history.BoboHistory)[source]
Parameters
  • run_id – An ID for the run.

  • phenomenon_name – A phenomenon name associated with the run.

  • pattern_name – A pattern name associated with the run.

  • block_index – An index which indicates where in the pattern to start the run.

  • history – A history of events for the run.

Raises
  • BoboRunError – Run ID length is equal to 0.

  • BoboRunError – Process name length is equal to 0.

  • BoboRunError – Block index is less than 1.

  • BoboRunError – History does not have enough events in it to cover all blocks up to the block index.

property block_index: int
Returns

The current block index of the run.

static from_json_dict(d: dict) bobocep.cep.engine.decider.runserial.BoboRunSerial[source]
Parameters

d – A JSON dict representation of the event.

Returns

A new instance of the run serial.

static from_json_str(j: str) bobocep.cep.engine.decider.runserial.BoboRunSerial[source]
Parameters

j – A JSON str representation of the event.

Returns

A new instance of the run serial.

property history: bobocep.cep.event.history.BoboHistory
Returns

The run history.

property pattern_name: str
Returns

The pattern name associated with the run.

property phenomenon_name: str
Returns

The phenomenon name associated with the run.

property run_id: str
Returns

The run ID.

to_json_dict() dict[source]
Returns

A JSON dict representation of the run.

to_json_str() str[source]
Returns

A JSON str representation of the run.