jeeflow-core

    jeeflow workflow engine core (MoonBit port, zero registry deps)

    Download zip
    Author
    Version
    0.1.2
    License
    Apache-2.0
    Last updated
    2 hours ago
    Downloads
    9

    Dependencies

    #jeeflow-core

    The zero-dependency workflow engine core of jeeflow — in MoonBit.

    mooncakes License

    The engine heart of jeeflow-moon (the federation's 7th language): DDD aggregates, a fully async engine, the LogicFlow parser, countersign gates, events, metadata registries and an in-memory repository — zero registry dependencies, JSON / expressions / users / transactions are all SPI.

    #Quickstart

    // Wire once: repositories are generic parameters, small SPIs are closure fields.
    let repo = @memory.MemoryRepository::new()
    let ctx = @spi.Ctx::new(repo, repo)
    .with_user_provider(my_user_provider) // (String) -> UserInfo? raise
    let facade = @facade.Facade::make(ctx) // 45-action facade on top

    #What's here

    • ModelProcessInstance / ProcessTask aggregates with the federation state machine (instance 10/20/30/40/45/50/99, task 10/20/30/40/50/99); ids are Int64 and leave the engine as strings.
    • Async enginestart / execute / jump / jump_to_end / jump_to_first / withdraw as async fn end to end (one event loop, no block_on), hydrate-from-repository built in.
    • Countersign gates — parallel, sequential (one task at a time + roster in task variables), ratio expressions, one-vote veto; soft reject (submitType=20) with countersignDisagreeFlag.
    • Parser — LogicFlow JSON → 8 node types; tolerant performType (number, "1", "ALL", "COUNTERSIGN").
    • EventsTASK_CREATE after persistence, INSTANCE_END on finish and reject, CC_CREATE per actor; per-listener fault isolation.
    • SPIProcessRepository / ProcessExtRepository as generic parameters; user, org, search, json, expression, permission, clock, id-generator and biz-data-reader as closure fields.
    • MetadataEnumDictRegistry (7 wf_* dicts) + HandlerRegistry (7 built-in assignment handlers under Java FQCNs).
    • Memory repository — the T0 store; rows listed in id order for determinism.
    • Clock SPI — no wall clock in core; inject set_clock for fully deterministic tests.

    #License

    Apache-2.0 — part of jeeflow-moon.