iii-low-code-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Low-Code Automation Chains

低代码自动化链

Comparable to: n8n, Zapier, LangFlow
同类工具:n8n、Zapier、LangFlow

Key Concepts

核心概念

Use the concepts below when they fit the task. Not every automation needs all of them.
  • Each "node" in the automation is a small registered function with a single job
  • Nodes chain via named queues using
    TriggerAction.Enqueue
    — easy to add, remove, or reorder steps
  • HTTP triggers receive external webhooks (form submissions, payment events)
  • Cron triggers start scheduled automations (daily digests, periodic syncs)
  • PubSub broadcasts completion events for downstream listeners
当任务符合以下场景时使用这些概念,并非所有自动化都需要全部概念。
  • 自动化中的每个“节点”是一个承担单一任务的小型注册函数
  • 节点通过
    TriggerAction.Enqueue
    借助命名队列实现串联——添加、移除或重新排序步骤十分便捷
  • HTTP触发器接收外部Webhook(表单提交、支付事件等)
  • Cron触发器启动定时自动化(每日摘要、定期同步等)
  • PubSub向下游监听者广播完成事件

Architecture

架构

text
Automation 1: Form → Enrich → Store → Notify
  HTTP webhook → auto::enrich-lead → auto::store-lead → auto::notify-slack

Automation 2: Cron → Fetch → Transform → Store
  Cron (daily) → auto::fetch-rss → auto::transform-articles → auto::store-articles

Automation 3: Payment webhook → Validate → Update → Notify
  HTTP webhook → auto::validate-payment → auto::update-order → publish(payment.processed)
text
Automation 1: Form → Enrich → Store → Notify
  HTTP webhook → auto::enrich-lead → auto::store-lead → auto::notify-slack

Automation 2: Cron → Fetch → Transform → Store
  Cron (daily) → auto::fetch-rss → auto::transform-articles → auto::store-articles

Automation 3: Payment webhook → Validate → Update → Notify
  HTTP webhook → auto::validate-payment → auto::update-order → publish(payment.processed)

iii Primitives Used

使用的iii原语

PrimitivePurpose
registerWorker
Initialize the worker and connect to iii
registerFunction
Define each automation node
trigger({ ..., action: TriggerAction.Enqueue({ queue }) })
Chain nodes via named queues
trigger({ function_id: 'state::set', payload })
Persist data between nodes
trigger({ ..., action: TriggerAction.Void() })
Fire-and-forget notifications
registerTrigger({ type: 'http' })
Webhook entry points
registerTrigger({ type: 'cron' })
Scheduled automations
原语用途
registerWorker
初始化Worker并连接到iii引擎
registerFunction
定义每个自动化节点
trigger({ ..., action: TriggerAction.Enqueue({ queue }) })
通过命名队列串联节点
trigger({ function_id: 'state::set', payload })
在节点间持久化数据
trigger({ ..., action: TriggerAction.Void() })
即发即弃式通知
registerTrigger({ type: 'http' })
Webhook入口点
registerTrigger({ type: 'cron' })
定时自动化

Reference Implementation

参考实现

See ../references/low-code-automation.js for the full working example — three automation chains: form-to-Slack notification, RSS feed aggregation, and payment webhook processing.
查看../references/low-code-automation.js获取完整可运行示例——包含三条自动化链:表单到Slack通知、RSS聚合、支付Webhook处理。

Common Patterns

常见模式

Code using this pattern commonly includes, when relevant:
  • registerWorker(url, { workerName })
    — worker initialization
  • trigger({ function_id, payload, action: TriggerAction.Enqueue({ queue: 'automation' }) })
    — node chaining
  • Each node as its own
    registerFunction
    with
    auto::
    prefix IDs
  • Small, focused functions that do one thing (enrich, validate, store, notify)
  • trigger({ function_id: 'state::set', payload: { scope, key, value } })
    — persist between nodes
  • const logger = new Logger()
    — structured logging per node
相关场景下,使用该模式的代码通常包含:
  • registerWorker(url, { workerName })
    —— Worker初始化
  • trigger({ function_id, payload, action: TriggerAction.Enqueue({ queue: 'automation' }) })
    —— 节点串联
  • 每个节点以
    auto::
    前缀ID作为独立的
    registerFunction
  • 专注单一任务的小型函数(信息补全、验证、存储、通知等)
  • trigger({ function_id: 'state::set', payload: { scope, key, value } })
    —— 节点间数据持久化
  • const logger = new Logger()
    —— 每个节点的结构化日志

Adapting This Pattern

模式适配

Use the adaptations below when they apply to the task.
  • Add new automation chains by registering HTTP/cron triggers and chaining functions
  • Each node should be independently testable — accept input, produce output
  • Use separate queue names when different chains need different retry/concurrency settings
  • For unreliable external services, wrap calls in try/catch and handle failures explicitly
  • Keep node functions small — offload complex logic to dedicated functions
当任务符合以下场景时进行适配:
  • 通过注册HTTP/Cron触发器并串联函数来添加新的自动化链
  • 每个节点应可独立测试——接收输入、生成输出
  • 当不同链需要不同重试/并发设置时,使用独立的队列名称
  • 针对不可靠的外部服务,将调用包裹在try/catch中并显式处理失败
  • 保持节点函数轻量化——将复杂逻辑卸载到专用函数

Pattern Boundaries

模式边界

  • If the task requires durable multi-step workflows with saga compensation and step tracking, prefer
    iii-workflow-orchestration
    .
  • If the task involves multiple AI agents handing off work, prefer
    iii-agentic-backend
    .
  • Stay with
    iii-low-code-automation
    when the primary concern is simple trigger-transform-action chains with minimal orchestration overhead.
  • 如果任务需要具备Saga补偿和步骤跟踪的持久化多步骤工作流,优先选择
    iii-workflow-orchestration
  • 如果任务涉及多个AI Agent交接工作,优先选择
    iii-agentic-backend
  • 当核心需求是简单的触发-转换-动作链且编排开销极小时,使用
    iii-low-code-automation

When to Use

使用场景

  • Use this skill when the task is primarily about
    iii-low-code-automation
    in the iii engine.
  • Triggers when the request directly asks for this pattern or an equivalent implementation.
  • 当任务主要围绕iii引擎中的
    iii-low-code-automation
    展开时,使用此技能。
  • 当请求直接要求实现该模式或等效方案时触发。

Boundaries

使用限制

  • Never use this skill as a generic fallback for unrelated tasks.
  • You must not apply this skill when a more specific iii skill is a better fit.
  • Always verify environment and safety constraints before applying examples from this skill.
  • 切勿将此技能作为无关任务的通用 fallback。
  • 当更特定的iii技能更合适时,不得使用此技能。
  • 在应用此技能的示例前,务必验证环境和安全约束。