minos.saga.definitions.steps.abc

Classes

SagaStep

Saga step class.

class SagaStep[source]

Bases: ABC

Saga step class.

__init__(saga=None, **kwargs)[source]
Parameters

saga (Optional[Saga]) –

classmethod from_raw(raw, **kwargs)[source]

Build a new instance from raw.

Parameters
Returns

A SagaStep instance.

Return type

SagaStep

conditional_step(*args, **kwargs)[source]

Create a new conditional step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

ConditionalSagaStep

local_step(*args, **kwargs)[source]

Create a new local step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

LocalSagaStep

step(*args, **kwargs)[source]

Create a new step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

SagaStep

remote_step(*args, **kwargs)[source]

Create a new remote step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

RemoteSagaStep

commit(*args, **kwargs)[source]

Commit the current SagaStep on the Saga.

Parameters
  • args – Additional positional arguments.

  • kwargs – Additional named arguments.

Returns

A Saga instance.

Return type

Saga

abstract validate()[source]

Check if the step is valid.

Returns

This method does not return anything, but raises an exception if the step is not valid.

Return type

None

abstract property raw: dict[str, Any]

Generate a raw representation of the instance.

Returns

A dict instance.