hub-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Hub Creator

Hub 创建器

Author a NEW Datex Studio hub configuration (configurationTypeId=2) on a branch — top-level UI containers with filters, grouping options, tabs that mount grids/editors/forms/custom Angular components, toolbar buttons, and click flows.
See also:
hub-editor
— modifying an EXISTING hub's toolbar/flows on a branch (this skill is for authoring NEW hubs).
在分支上创建新的Datex Studio hub配置(configurationTypeId=2)——这是包含过滤器、分组选项、可挂载网格/编辑器/表单/自定义Angular组件的标签页、工具栏按钮及点击流程的顶级UI容器。
另请参阅:
hub-editor
— 在分支上修改现有hub的工具栏/流程(本技能用于创建新hub)。

References

参考资料

  • ../datex-studio-shared/branch-setup.md — Branch/connection selection (shared across skills)
  • references/hubs.md — Authoritative hub authoring reference: file shape, runtime globals, invocation contract, common patterns, pre-flight checklist
  • ../datex-studio-conventions/file-format.md
    configurationTypeId
    table and TypeScript-expression encoding rules
  • ../datex-studio-conventions/naming-conventions.md
    _hub
    suffix, filename stem matching, display-name rule
  • ../datex-studio-runtime/runtime-globals.md — platform-injected globals available in hub code (
    $flows
    ,
    $shell
    ,
    $utils
    , ...)
  • ../datex-studio-runtime/calling-conventions.md — UI-tier calling rules (call functions, never actions; dialog openers via
    $shell
    )
  • ../component-wiring-check/references/component-wiring.md — host reference contracts, vars-must-be-declared rule, moduleId rule
  • ../datex-studio-shared/branch-setup.md — 分支/连接选择(各技能通用)
  • references/hubs.md — Hub创建权威参考:文件结构、运行时全局变量、调用契约、常见模式、预检清单
  • ../datex-studio-conventions/file-format.md
    configurationTypeId
    表格及TypeScript表达式编码规则
  • ../datex-studio-conventions/naming-conventions.md
    _hub
    后缀、文件名主干匹配规则、显示名称规则
  • ../datex-studio-runtime/runtime-globals.md — Hub代码中可用的平台注入全局变量(
    $flows
    $shell
    $utils
    等)
  • ../datex-studio-runtime/calling-conventions.md — UI层调用规则(调用函数,禁止直接调用动作;通过
    $shell
    打开对话框)
  • ../component-wiring-check/references/component-wiring.md — 宿主参考契约、变量必须声明规则、moduleId规则

Dependencies

依赖技能

  • requirements-gathering
    skill — invoked to produce a requirements brief if one doesn't already exist in the conversation context
  • grid-creator
    /
    selector-creator
    /
    form-creator
    /
    editor-creator
    skills — invoked when a tab grid, filter-backing selector, or dialog form/editor referenced by the hub doesn't exist yet on the branch
  • component-wiring-check
    skill — invoked to audit
    configParameters
    ↔ target
    inParams
    contracts before push (the dead-wiring trap)
  • requirements-gathering
    技能 — 若对话上下文无需求简报,将调用该技能生成需求简报
  • grid-creator
    /
    selector-creator
    /
    form-creator
    /
    editor-creator
    技能 — 当hub引用的标签页网格、过滤器关联选择器或对话框表单/编辑器尚未在分支上存在时,将调用对应技能
  • component-wiring-check
    技能 — 推送前将调用该技能审核
    configParameters
    ↔ 目标
    inParams
    契约(即死绑定陷阱)

CLI Lifecycle

CLI生命周期

Hub authoring goes through
dxs configuration
— the generic CRUD primitive over every platform configuration type. There is no
dxs hub
subcommand and no field-level patching; you build (or fetch + extract) the whole JSON body, edit it, and push the whole thing back.
Create a new hub:
bash
undefined
Hub创建需通过
dxs configuration
完成——这是针对所有平台配置类型的通用CRUD原语。不存在
dxs hub
子命令,也不支持字段级补丁;需构建(或获取并提取)完整JSON体,编辑后重新推送完整内容。
创建新hub:
bash
undefined

1. Build body.json from scratch (see references/hubs.md → Minimal Valid Skeleton)

1. 从零开始构建body.json(请参阅references/hubs.md → 最小有效骨架)

2. Validate (recommended)

2. 验证(推荐操作)

dxs configuration validate hub -b <branchId> -D body.json
dxs configuration validate hub -b <branchId> -D body.json

3. Create

3. 创建

dxs configuration upsert hub -b <branchId> -D body.json

**Edit an existing hub (only if scope creeps from "new" into "modify mid-authoring"):**

```bash
dxs configuration upsert hub -b <branchId> -D body.json

**编辑现有hub(仅适用于从「创建」中途转为「修改」的场景):**

```bash

1. Fetch — note the envelope wrapper

1. 获取配置——注意信封包装

dxs configuration get hub <configId> -b <branchId> -O envelope.json
dxs configuration get hub <configId> -b <branchId> -O envelope.json

2. EXTRACT THE INNER BODY (round-trip footgun guard — see "Round-trip rule" below)

2. 提取内部JSON体(往返操作防范机制——请参阅下方「往返规则」)

jq .json envelope.json > body.json
jq .json envelope.json > body.json

3. Edit body.json

3. 编辑body.json

4. Validate (recommended)

4. 验证(推荐操作)

dxs configuration validate hub -b <branchId> -D body.json
dxs configuration validate hub -b <branchId> -D body.json

5. Push

5. 推送

dxs configuration upsert hub -b <branchId> -D body.json

For purely-modify workflows (toolbar/flows changes on an existing hub), stop here and switch to the `hub-editor` skill — it carries the toolbar/click-flow editing patterns and the role-gating recipes.
dxs configuration upsert hub -b <branchId> -D body.json

若仅需修改现有hub(如工具栏/流程变更),请停止当前操作并切换至`hub-editor`技能——该技能包含工具栏/点击流编辑模式及角色权限控制方案。

Round-trip rule (critical)

往返规则(关键)

When editing an existing config, never pipe the envelope.json directly into
dxs configuration upsert
— it silently destroys configuration content. The corrected sequence above (extract inner
.json
with
jq
before editing) is mandatory for any round-trip. See ../datex-studio-shared/configuration-roundtrip.md for the canonical round-trip and the underlying bug.
编辑现有配置时,切勿直接将envelope.json传入
dxs configuration upsert
——这会静默破坏配置内容。必须遵循上述修正流程(编辑前用
jq
提取内部
.json
)。如需了解标准往返流程及潜在问题,请参阅../datex-studio-shared/configuration-roundtrip.md

Workflow

工作流程

[Phase 1: Setup + Requirements]
Follow branch-setup.md for branch/connection selection
        |
[requirements brief in context?]
  +-----+-----+
  |            |
 YES          NO -> invoke `requirements-gathering`
  |            |
  +-----+------+
        |
[Phase 2: Author hub body]
Decide what the hub IS:
  - which filters scope the experience
  - which tabs (grids / other components) mount inside it
  - role-gating, on_init access guard, hub-local flows
Consult references/hubs.md for file shape, $hub runtime,
required top-level fields, common patterns
        |
[Phase 3: Wire toolbar / flows]
Toolbar buttons + click flows; dialog openers via $shell
Audit dead-wiring trap (hub filter -> tab configParameters
-> grid inParams MUST stay in sync) — invoke
`component-wiring-check` if mounted grids/selectors
need extension
        |
[Phase 4: Validate + push]
dxs configuration validate hub -b <branchId> -D body.json
        |
   +----+----+
   |         |
  CREATE   MODIFY-EXISTING
   |         |
   |         use the corrected round-trip
   |         (get -O envelope -> jq .json -> body)
   |         |
   +----+----+
        |
        v
dxs configuration upsert hub -b <branchId> -D body.json
   (upsert creates or updates by referenceName — one command for both)
        |
[Phase 5: Verify in Studio (optional)]
Reload the hub in the running app; confirm filters render,
tabs query, toolbar buttons fire
        |
[invoke `post-edit-verification`; then `component-validator`]
[阶段1:设置与需求收集]
遵循branch-setup.md完成分支/连接选择
        |
[对话上下文是否有需求简报?]
  +-----+-----+
  |            |
 是          否 -> 调用`requirements-gathering`
  |            |
  +-----+------+
        |
[阶段2:编写hub配置体]
确定hub的功能:
  - 哪些过滤器用于限定体验范围
  - 内部挂载哪些标签页(网格/其他组件)
  - 角色权限控制、初始化访问守卫、hub本地流程
查阅references/hubs.md了解文件结构、$hub运行时、
必填顶级字段及常见模式
        |
[阶段3:绑定工具栏/流程]
工具栏按钮+点击流程;通过$shell打开对话框
审核死绑定陷阱(hub过滤器 -> 标签页configParameters
-> 网格inParams必须保持同步)——若需扩展已挂载的网格/选择器,
调用`component-wiring-check`
        |
[阶段4:验证与推送]
dxs configuration validate hub -b <branchId> -D body.json
        |
   +----+----+
   |         |
  创建     修改现有配置
   |         |
   |         使用修正后的往返流程
   |         (获取-O envelope -> jq .json -> body)
   |         |
   +----+----+
        |
        v
dxs configuration upsert hub -b <branchId> -D body.json
   (upsert通过referenceName创建或更新——单个命令即可完成两种操作)
        |
[阶段5:在Studio中验证(可选)]
在运行的应用中重新加载hub;确认过滤器渲染、
标签页查询、工具栏按钮触发正常
        |
[调用`post-edit-verification`;随后调用`component-validator`]

Phase Details

阶段详情

Phase 1: Setup + Requirements

阶段1:设置与需求收集

  1. Follow ../datex-studio-shared/branch-setup.md for branch and connection selection. Never assume a branch ID — ask the user to confirm, or run
    dxs source branch list --all-repos --status feature
    for selection.
  2. Check whether a requirements brief already exists in the conversation context (produced by
    requirements-gathering
    or another calling skill).
    • Brief exists — use it. The brief provides intent (what the hub is for), the scoping filters users need, the tabs/grids that should mount inside, role-gating rules, and any toolbar actions.
    • No brief — invoke the
      requirements-gathering
      skill first. Hubs are top-level entry points; getting the filter set and tab layout right up front saves rework.
  1. 遵循../datex-studio-shared/branch-setup.md完成分支和连接选择。切勿默认分支ID——请让用户确认,或运行
    dxs source branch list --all-repos --status feature
    进行选择。
  2. 检查对话上下文是否已有需求简报(由
    requirements-gathering
    或其他调用技能生成)。
    • 已有简报——直接使用。简报包含hub的用途、用户所需的范围过滤器、内部应挂载的标签页/网格、角色权限控制规则及工具栏操作。
    • 无简报——先调用
      requirements-gathering
      技能。Hub是顶级入口点,提前确定过滤器集和标签页布局可减少返工。

Phase 2: Author hub body

阶段2:编写hub配置体

Decide what the hub IS, then build
body.json
:
  1. File basics. Per the Pre-Flight Checklist below + ../datex-studio-conventions/universal-checklist.md; see references/hubs.md → File Location & Naming for the
    -hub.json
    file shape.
  2. Filters. Each filter field's
    configId
    /
    moduleId
    must resolve to a real selector (
    *-selector.json
    ). If the selector doesn't exist on the branch yet, invoke
    selector-creator
    first. Every selector
    configParameter
    gets an entry in the filter's
    dropdownConfig.configParameters
    (use
    value: ""
    for ones that don't apply).
  3. Tabs. Every tab declares a
    contentConfig
    pointing at a grid (or other component) on the branch. If the target grid doesn't exist yet, invoke
    grid-creator
    first. The tab's
    configParameters
    array must mirror the target's
    inParams
    exactly — see the Phase 3 dead-wiring check.
  4. vars
    array.
    Every
    $hub.vars.<id>
    written in hub flow code must be declared at the top-level
    vars
    array. See references/hubs.md → Runtime Globals and ../component-wiring-check/references/component-wiring.md.
  5. onInitFlowConfig
    .
    Common home for initial-filter defaulting, context loading, and the access-gated hub pattern (permission check →
    $hub.close()
    on deny). See references/hubs.md → Common Patterns.
  6. TypeScript-expression encoding.
    hubTitle
    ,
    hubDescription
    , any
    value
    /
    tooltip
    /
    placeholder
    /
    label
    follows the three-encoding rule — display text wrapped in backticks:
    "`Widget overview`"
    . See ../datex-studio-conventions/file-format.md → Declarative String Values Are TypeScript Expressions.
确定hub功能后,构建
body.json
  1. 文件基础。遵循下方预检清单../datex-studio-conventions/universal-checklist.md;请参阅references/hubs.md → 文件位置与命名了解
    -hub.json
    文件结构。
  2. 过滤器。每个过滤字段的
    configId
    /
    moduleId
    必须指向真实的选择器(
    *-selector.json
    )。若选择器尚未在分支上存在,先调用
    selector-creator
    。每个选择器的
    configParameter
    需在过滤器的
    dropdownConfig.configParameters
    中添加条目(不适用的条目设为
    value: ""
    )。
  3. 标签页。每个标签页需声明
    contentConfig
    指向分支上的网格(或其他组件)。若目标网格尚未存在,先调用
    grid-creator
    。标签页的
    configParameters
    数组必须与目标组件的
    inParams
    完全匹配——请参阅阶段3的死绑定检查。
  4. vars
    数组
    。Hub流程代码中所有
    $hub.vars.<id>
    必须在顶级
    vars
    数组中声明。请参阅references/hubs.md → 运行时全局变量../component-wiring-check/references/component-wiring.md
  5. onInitFlowConfig
    。常用于设置初始过滤器默认值、加载上下文及实现权限控制hub模式(权限检查→拒绝时调用
    $hub.close()
    )。请参阅references/hubs.md → 常见模式
  6. TypeScript表达式编码
    hubTitle
    hubDescription
    、任何
    value
    /
    tooltip
    /
    placeholder
    /
    label
    需遵循三重编码规则——显示文本用反引号包裹:
    "`Widget overview`"
    。请参阅../datex-studio-conventions/file-format.md → 声明式字符串值为TypeScript表达式

Phase 3: Wire toolbar / flows

阶段3:绑定工具栏/流程

  1. Toolbar buttons + click flows. Each toolbar button entry has a
    clickFlowConfig
    pointing at a hub-local flow or an external function. From hub code, invoke functions via
    $flows.<Package>.<fn>
    and open forms/editors via
    $shell.<Package>.open<referenceName>Dialog(...)
    . Never call actions directly — wrap them in a function. See ../datex-studio-runtime/calling-conventions.md and references/hubs.md → Common Patterns for the engine-toggle, configure-options-dialog, access-gated
    on_init
    , and shared-local-flow patterns.
  2. Dead-wiring trap audit. The single most common hub bug: a hub filter binds into a tab's
    configParameters
    for an id the mounted grid doesn't actually declare as an inParam. The binding looks wired but the grid never receives the value.
    The rule: every binding in a tab's
    configParameters
    must be named in the mounted grid's
    inParams
    — and every inParam the grid declares must have an entry in the tab's
    configParameters
    (unused entries use
    value: ""
    or
    value: null
    ).
    When a hub filter exists to scope a specific tab's grid (e.g. a
    projects
    filter scoping a rules grid by
    project_ids
    , or a
    contract
    filter scoping a documents grid by
    contract_id
    ), audit the mounted grid's top-level
    inParams
    in the same edit. If a binding is needed and the grid doesn't declare a matching inParam, extend the grid in the same edit (and the underlying datasource, since grid flows read
    $grid.inParams.<id>
    when building the datasource call).
    Invoke
    component-wiring-check
    to audit the full reference contract — moduleId, configParameters mirror, vars declared — before push. See references/hubs.md → Invocation Contract and ../component-wiring-check/references/component-wiring.md.
  3. Toolbar / tab IDs are unique within the hub. Flow code addresses them by
    id
    (
    $hub.toolbar.save.control...
    ,
    $hub.tabs.rules.hidden = ...
    ) — collisions silently overwrite.
  1. 工具栏按钮+点击流程。每个工具栏按钮条目包含
    clickFlowConfig
    指向hub本地流程或外部函数。在hub代码中,通过
    $flows.<Package>.<fn>
    调用函数,通过
    $shell.<Package>.open<referenceName>Dialog(...)
    打开表单/编辑器。禁止直接调用动作——需将动作包装在函数中。请参阅../datex-studio-runtime/calling-conventions.mdreferences/hubs.md → 常见模式了解引擎切换、配置选项对话框、权限控制
    on_init
    及共享本地流程模式。
  2. 死绑定陷阱审核。最常见的hub错误:hub过滤器绑定到标签页
    configParameters
    中的某个ID,但挂载的网格并未将其声明为
    inParam
    。绑定看似正常,但网格永远无法接收该值。
    规则:标签页
    configParameters
    中的每个绑定必须与挂载网格的
    inParams
    中的名称一致
    ——且网格声明的每个
    inParam
    必须在标签页的
    configParameters
    中有对应条目(未使用的条目设为
    value: ""
    value: null
    )。
    当hub过滤器用于限定特定标签页网格的范围(如
    projects
    过滤器通过
    project_ids
    限定规则网格,或
    contract
    过滤器通过
    contract_id
    限定文档网格),需在同一编辑操作中审核挂载网格的顶级
    inParams
    。若需要绑定但网格未声明匹配的
    inParam
    需在同一编辑操作中扩展网格(及底层数据源,因为网格流程在构建数据源调用时会读取
    $grid.inParams.<id>
    推送前调用
    component-wiring-check
    审核完整参考契约——moduleId、configParameters匹配、变量声明。请参阅references/hubs.md → 调用契约../component-wiring-check/references/component-wiring.md
  3. 工具栏/标签页ID在hub内唯一。流程代码通过
    id
    定位它们(
    $hub.toolbar.save.control...
    $hub.tabs.rules.hidden = ...
    )——重复ID会静默覆盖。

Phase 4: Validate + push

阶段4:验证与推送

bash
undefined
bash
undefined

Validate the body locally against the branch

针对分支本地验证配置体

dxs configuration validate hub -b <branchId> -D body.json
dxs configuration validate hub -b <branchId> -D body.json

For a new hub

创建新hub

dxs configuration upsert hub -b <branchId> -D body.json
dxs configuration upsert hub -b <branchId> -D body.json

For modify-existing (round-trip — never skip the jq extract)

修改现有配置(往返流程——切勿跳过jq提取步骤)

dxs configuration get hub <configId> -b <branchId> -O envelope.json jq .json envelope.json > body.json
dxs configuration get hub <configId> -b <branchId> -O envelope.json jq .json envelope.json > body.json

... edit body.json ...

... 编辑body.json ...

dxs configuration upsert hub -b <branchId> -D body.json

Validation surfaces missing required fields, malformed `configParameters` shapes, and selector/grid reference errors before push. It does not catch the dead-wiring trap (configParameters whose `id` is absent from the mounted grid's `inParams`) — that's a contract concern between two components, audited via `component-wiring-check` and the Phase 3 rule above.
dxs configuration upsert hub -b <branchId> -D body.json

验证会在推送前发现缺失的必填字段、格式错误的`configParameters`及选择器/网格引用错误。但无法检测死绑定陷阱(`configParameters`中的`id`未在挂载网格的`inParams`中存在)——这是两个组件间的契约问题,需通过`component-wiring-check`及上述阶段3的规则审核。

Phase 5: Verify in Studio (optional)

阶段5:在Studio中验证(可选)

Reload the hub in the running app:
  • Filters render and the dropdowns populate (selectors wired correctly).
  • Tabs query when filters change (the tab
    configParameters
    ↔ grid
    inParams
    contract holds).
  • Toolbar buttons fire their click flows; dialog openers return;
    $hub.refresh()
    propagates state.
  • Role-gated tabs hide for unauthorized users (access-gated
    on_init
    flow runs).
If the running app isn't available, re-fetch the config and diff against
body.json
(using the corrected
jq .json
extract pattern) to confirm the push landed.
在运行的应用中重新加载hub:
  • 过滤器正常渲染且下拉列表填充(选择器绑定正确)。
  • 过滤器变更时标签页查询正常(标签页
    configParameters
    ↔ 网格
    inParams
    契约有效)。
  • 工具栏按钮触发点击流程;对话框正常打开;
    $hub.refresh()
    传播状态。
  • 未授权用户无法看到角色权限控制的标签页(权限控制
    on_init
    流程正常运行)。
若无法访问运行的应用,重新获取配置并与
body.json
对比(使用修正后的
jq .json
提取模式)以确认推送成功。

Pre-Flight Checklist

预检清单

Before push, walk the full checklist in references/hubs.md → Pre-Flight Checklist. The fast version:
  1. File basics:
    configurationTypeId: 2
    ,
    referenceName
    ends
    _hub
    — plus the universal checks (../datex-studio-conventions/universal-checklist.md).
  2. Tabs carry full
    configParameters
    contracts (mirrors the mounted grid's
    inParams
    exactly — no extras, no missing entries).
  3. Filter bindings are contract-complete (selector references resolve; every selector configParameter has an entry).
  4. Vars declared (every
    $hub.vars.<id>
    in flow code is in top-level
    vars
    ).
  5. Calling-tier compliance (functions via
    $flows.<Package>.<fn>
    ; dialog openers via
    $shell.<Package>.open<referenceName>Dialog(...)
    ; no direct action calls).
  6. Toolbar/tab IDs are unique within the hub.
  7. TypeScript-expression strings wrapped correctly; dynamic tooltips go through declared
    $hub.vars.<name>
    .
推送前,请完成references/hubs.md → 预检清单中的所有检查。简化版:
  1. 文件基础:
    configurationTypeId: 2
    referenceName
    _hub
    结尾——加上通用检查项(../datex-studio-conventions/universal-checklist.md)。
  2. 标签页包含完整的
    configParameters
    契约(与挂载网格的
    inParams
    完全匹配——无多余或缺失条目)。
  3. 过滤器绑定契约完整(选择器引用有效;每个选择器configParameter都有对应条目)。
  4. 变量已声明(流程代码中所有
    $hub.vars.<id>
    都在顶级
    vars
    中)。
  5. 符合调用层规范(通过
    $flows.<Package>.<fn>
    调用函数;通过
    $shell.<Package>.open<referenceName>Dialog(...)
    打开对话框;禁止直接调用动作)。
  6. 工具栏/标签页ID在hub内唯一。
  7. TypeScript表达式字符串包裹正确;动态提示需绑定到已声明的
    $hub.vars.<name>

Common Mistakes

常见错误

MistakeFix
Tab
configParameters
binds an id the grid doesn't declare as an inParam
Dead wiring — the value is silently dropped. Either drop the binding, or extend the grid's
inParams
(and underlying datasource) in the same edit. See Phase 3.
Piping
dxs configuration get -O envelope.json
directly into
dxs configuration upsert -D envelope.json
Silently destroys config content. Always
jq .json envelope.json > body.json
before editing. See "Round-trip rule" above.
Writing
$hub.vars.<id> = ...
in flow code without declaring
<id>
in the top-level
vars
array
The var is undeclared — write fails silently or runtime error. Declare every var.
Calling an action directly from hub code (
$flows.<Package>.<action_name>(...)
)
UI-tier rule: invoke functions only; wrap actions in a function. See
../datex-studio-runtime/calling-conventions.md
.
Assigning to a filter or toolbar button's
.control.tooltip
from flow code
No-op for dynamic tooltips — must bind to a declared
$hub.vars.<name>
instead. See
references/hubs.md → Pre-Flight Checklist
item 7.
description
exceeds 100 chars
SQL column limit — push will fail validation. Tighten.
referenceName
doesn't end in
_hub
or doesn't match filename stem
Import / lookup breaks. Snake_case,
_hub
suffix, filename stem matches.
Tab
moduleId
set to the hub's package instead of the mounted grid's
Cross-component reference rule —
moduleId
is always the target's package. See
../component-wiring-check/references/component-wiring.md
.
Two toolbar buttons (or two tabs) sharing the same
id
Silent overwrite — flow code can only address one of them. Make IDs unique within the hub.
After your edit, invoke
post-edit-verification
to surface description/JSON/schema violations. For a final review, invoke
component-validator
.
错误修复方案
标签页
configParameters
绑定了网格未声明为
inParam
的ID
死绑定——值会被静默丢弃。要么删除绑定,要么在同一编辑操作中扩展网格的
inParams
(及底层数据源)。请参阅阶段3。
直接将
dxs configuration get -O envelope.json
传入
dxs configuration upsert -D envelope.json
静默破坏配置内容。编辑前必须执行
jq .json envelope.json > body.json
。请参阅上方「往返规则」。
在流程代码中写入
$hub.vars.<id> = ...
但未在顶级
vars
数组中声明
<id>
变量未声明——写入操作静默失败或触发运行时错误。必须声明所有变量。
从hub代码中直接调用动作(
$flows.<Package>.<action_name>(...)
UI层规则:仅调用函数;将动作包装在函数中。请参阅
../datex-studio-runtime/calling-conventions.md
从流程代码中为过滤器或工具栏按钮的
.control.tooltip
赋值
动态提示无效——必须绑定到已声明的
$hub.vars.<name>
。请参阅
references/hubs.md → 预检清单
第7项。
description
超过100字符
SQL列限制——推送会验证失败。请精简内容。
referenceName
未以
_hub
结尾或与文件名主干不匹配
导入/查找失败。使用蛇形命名法、
_hub
后缀,文件名主干需与referenceName匹配。
标签页
moduleId
设为hub的包而非挂载网格的包
跨组件引用规则——
moduleId
始终为目标组件的包。请参阅
../component-wiring-check/references/component-wiring.md
两个工具栏按钮(或两个标签页)使用相同的
id
静默覆盖——流程代码只能定位其中一个。确保hub内ID唯一。
编辑完成后,调用
post-edit-verification
检查描述/JSON/架构违规。如需最终审核,调用
component-validator
",