Lowp tae content

For emergencies, call +44 7537 179434 and press 0.

Embedded workflow engine

Stabilize

Available

Orchestration wi nae server tae rin.

Stabilize is a Python library that rins workflows inside yer ain application. There is nae orchestrator service tae deploy, secure or keep available. It implements the 43 control-flow patterns catalogued by van der Aalst and colleagues, frae a plain sequence tae a race atween a reviewer and an escalation timer. It is built for wark that haunds aff tae AI agents. Acause it records ilk step as an event, a workflow resumes whaur it stoppit efter a crash.

Wha it is for. Teams that want dependable, repeatable workflows inside an existing application, without bringing in anither service tae run.

Status
Available
Pairt o
Open soorce
Licence
Open soorce, Apache 2.0
Tags
EmbeddedWorkflow patternsCrash recoveryPython librar

Technical specification

Writ for a technical assessor. A raw wi nae measured value is left oot.

Splits an joins

Joins
Wait for ilka incomin branch (the default), for the branches an OR-split waled, for the first tae feenish, or for a set nummer o them. A multi-merge rins ance for ilka branch that arrives, ane rin at a time.
Condeetions
Ilka branch o an OR-split haes a condeetion ower the stage’s context and outputs. Condeetions uise comparisons, and, or, not, in, and nested lookups. Stabilize parses ilka condeetion and accepts anerly that fixed set o operators. A condeetion cannae rin arbitrary code.
Branch sneddin
A branch that nae split waled is skipt alang wi ilka stage ahint it. A join whas branches war aw skipt is skipt tae, and the workflow disna gang throu it.

Races, yaits and locks

Deferred wale
Stages in ane group race. The group is decidit whan the first member stairts, or whan the first ane feenishes. A losin stage is skipt, and ane that is aaready rinnin is cancelled wi its clean-up hook.
Milstanes
A stage can be alloued anerly whiles anither stage is in a gien status. For exemplar, a route chynge is acceptit anerly till the ticket haes been issued.
Mutual exclusion
Stages that share a lock name dinna rin at the same time. A blockit stage gangs back on the queue till the hauder feenishes.
Concurrency leemit
A pipeline can cap hou mony o its rins execute at ance. Rins ower the cap bide in a buffered state and stairt whan a slot frees.

Signals and cancellation

Pruise and resume
A task suspends till a named signal arrives. Whan it resumes, it reads the signal’s name and data.
Transient or persistent
A transient signal is drapt gin the stage isna waitin for it. A persistent signal is haudit till the stage suspends, up tae 1,000 per stage bi default. A signal that arrives at a fou buffer gangs tae the dead-letter queue. It can be inspectit and replayed frae thare.
Feenisht stages
A signal sent tae a stage that haes feenished is refused an logged. A command clears buffers left ahint by earlier versions an can report whit it wad clear afore it chynges onything.
Cancellin
Cancel ane stage, a haill workflow, or ilka stage tagged wi a named region. A cancelled task rins its ain clean-up hook.

Loops, retries an sub-workflows

Jumps
A task can send the workflow tae ony stage, forrit or back. Ilka stage mey jump 10 times by defaut, an the limit can be chynged for a workflow. The workflow keeps a history o its jumps.
Structured loops
While an repeat-until loops hae a maximum nummer o passes. A condeetion that names a value naething provides fails the stage at ance. A nested loop gets its fou budget again on ilka pass o the ooter loop.
Retries that haud progress
A task that hits a temporary error can say whan tae try again an save hou faur it wan. The neist attempt stairts frae that pynt.
Sub-workflows
A stage can stairt a bairn workflow an wait for it, up tae 10 levels deep by defaut. The bairn is stored an stairtit in ane transaction. A message delivered again efter a crash finds the bairn that already exists. An optional timeout bounds the haill bairn rin, an cancellin the parent cancels the bairn.

Multiple instances

Hou mony
A fixed nummer, a nummer read frae the workflow’s data at rin time, or ane instance for ilka item in a leet. The join can wait for aw o thaim, for a set nummer o thaim, or no wait at aw.
Eikit at rin time
Instances can be eikit while the parent stage is rinnin. The caw returns ance the instance is stored, or names the raison it wes refused.
Stages aboot a stage
A stage teep can eik stages that rin afore it, efter it, or whan it fails. Thir carry setup, clean-up, validation an rollback.

Whit it dis

  • Rins inside yer application

    Ye import it like onie ither library. There is nae separate orchestrator tae deploy or keep rinnin.

  • The 43 workflow patterns

    It implements the control-flow catalogue o van der Aalst an colleagues. An unco sequencing need is ordinar ane settin on a stage.

  • Joins that wait for the richt branches

    A join can wait for ilka branch, for anerly the branches a split waled, for the first tae finish, or for three o five.

  • Unwaled branches bide aff

    Whan a split disna wale a branch, that branch an the stages ahint it are skipt. A stage that a waled branch reaches forby still rins the ance.

  • Races atween fowk an timers

    Pit a reviewer an a 30-minute escalation timer in the ane group. Whilkiver finishes first wins, an Stabilize cancels the ither an runs its clean-up.

  • Signals that bide for the stage

    A stage can pause till an approval or a file arrives. A persistent signal sent early is haudit till the stage is ready, up tae 1,000 per stage bi defaut.

  • Loops wi a budget

    While an repeat-until loops carry their values frae ae pass tae the nixt. A loop that reaches its limit lats the workflow carry on an tells later stages it ran oot.

  • Wark that fans oot at run time

    Run the ane instance per reviewer, per item in a leet, or per count read at run time. A planner can add instances while it is still runnin, an the join waits for thae an aw.

Documentation and access details are on the product site, stabilize.readthedocs.io/en/latest. For a pilot, an integration or procurement questions, contact us.