jeeflow unified facade: flow(action, args) over the whole action surface + contract outlet layer
moon new my-flow && cd my-flow
moon add mldong/jeeflow-core # engine heart + SPI (zero registry dependencies)
moon add mldong/jeeflow-facade # this module: flow(action, args)
moon add moonbitlang/async # flow is async; async main needs it// cmd/main/moon.pkg
import {
"mldong/jeeflow-core/spi" @spi,
"mldong/jeeflow-core/memory" @memory,
"mldong/jeeflow-core/json" @json,
"mldong/jeeflow-facade" @facade,
"moonbitlang/async",
}
pkgtype(kind: "executable")// cmd/main/main.mbt — the repository is a generic parameter, small SPIs are closure fields
async fn main raise {
let repo = @memory.MemoryRepository::new()
let ctx = @spi.Ctx::new(repo, repo)
let facade = @facade.Facade::make(ctx)
let args : Map[String, Json] = { "processDefineId": 1, "operator": "applicant" }
println(@json.stringify(facade.flow("processDefine/startAndExecute", args)))
}{"code":99999999,"msg":"流程定义不存在: 1"}| group | actions |
|---|---|
| processDefine | page · detail · startAndExecute · deploy · redeploy · remove · upAndDown · getLastByName |
| processInstance | page · detail · startAndExecute · withdraw · bizData · highLight · approvalRecord · getAssigneeTextData · createCCInstance · updateCCStatus · ccList · stats/overview · stats/trend · stats/group |
| processTask | todoList · doneList · execute · detail · jumpAbleTaskNameList · candidatePage · surrogate · addCandidate · transfer · removeTaskActor · recall · revokeDynamicCountersign · aidant · latest |
| processDesign (ext repository) | page · detail · save · update · updateDefine · remove · deploy · redeploy · listByType |
| processSurrogate (ext repository) | page · save · update · detail · remove |
async fn[R : ProcessRepository, E] Facade::approval_record(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::biz_data(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::candidate_page(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::cc_list(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::create_cc_instance(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::define_detail(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::define_page(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::define_remove(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::define_up_and_down(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::deploy(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_deploy(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_detail(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_list_by_type(self : Facade[R, E], _args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_page(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_redeploy(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_remove(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_save(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_update(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::design_update_define(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::done_list(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::execute(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::flow(self : Facade[R, E], action : String, args : Map[String, Json]) -> Jsonasync fn[R : ProcessRepository, E] Facade::get_assignee_text_data(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::get_last_by_name(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::high_light(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::instance_detail(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::instance_page(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::jump_able_task_name_list(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::redeploy(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::start_and_execute(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::stats_group(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::stats_overview(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::stats_trend(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::surrogate_detail(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::surrogate_page(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::surrogate_remove(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::surrogate_save(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::surrogate_update(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::task_aidant(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::task_detail(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::task_latest(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::task_recall(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::task_remove_actor(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::task_revoke_countersign(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::task_surrogate(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::task_transfer(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::todo_list(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E] Facade::update_cc_status(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorasync fn[R : ProcessRepository, E : ProcessExtRepository] Facade::withdraw(self : Facade[R, E], args : Map[String, Json]) -> Json raise JeeflowErrorissues/114 的 `arg_required_str`(operator 硬必填、缺失即报错、返回 trim 后值)是另一档语义,别混用。fn parse_epoch_secs(s : String) -> Int64?Install
Download zipjeeflow unified facade: flow(action, args) over the whole action surface + contract outlet layer