Context
Follow-up from #172 (PR #367). That fix made createProcessInstance.startInstructions[].elementId
resolve to a real, broker-accepted model element by adding:
providesElements: {id,type}[] on deployment fixtures (the model's typed-element ABox), and
modelElementTypes on the ElementId semantic type (acceptable element types, in
preference order, excluding startEvent).
This is correct and decoupled (no BPMN vocabulary in planner code), and it works. But it places a
per-field-site constraint onto the semantic type, which is conceptually the wrong layer.
The abstraction gap
ElementId is a single semantic shared across many request sites, each with different
acceptable-element rules:
| Site |
Acceptable elements |
createProcessInstance.startInstructions[].elementId |
any flow node except start event |
runtimeInstructions[].afterElementId |
flow nodes incl. end event |
modifyProcessInstance.activateInstructions[].elementId |
activatable elements |
…terminateInstructions[].elementInstanceKey |
active element instances (runtime, not model) |
migration mappingInstructions source/target |
mappable elements |
| element filters |
any referenced element |
Putting modelElementTypes on the ElementId semantic flattens a per-site predicate onto the
type. It's harmless today because only createProcessInstance uses the literal model-derived
fallback (all other sites use runtime emission: __PENDING__ + step-extract), but it won't
generalise: the moment a second site needs a literal model element with a different rule, the
single modelElementTypes list is wrong for one of them.
Proposed direction
Introduce a middle ontology layer — affordance — between semantics (field meaning) and
runtime-states (server state machine):
(model-element kind) x (request-field role/site) -> selection predicate + expected runtime-state effect
Concretely:
- A small local element-type taxonomy (subsumption:
serviceTask is-a task is-a activity
is-a flowNode; startEvent is-a event is-a flowNode; ...) so rules can be expressed as
flowNode \ startEvent rather than enumerating every concrete type.
- A field-site affordance vocabulary keyed by request field-role (not by semantic type), each
binding a selection predicate over the taxonomy plus the expected runtime-state effect for the
test expectation.
- Migrate
modelElementTypes off the ElementId semantic and onto the per-site affordance.
sBPMN assessment
sBPMN 2.0 was evaluated as the element-type TBox. It would give us
the subsumption hierarchy for free, but it's heavyweight, BPMN-specific external OWL, and the repo
already has its own ontology idiom (semantics / runtime-states / artifact-kinds). Recommendation:
a lightweight local taxonomy over importing sBPMN wholesale. sBPMN can inform the taxonomy's
shape.
Notes
providesElements on fixtures is the right ABox either way — no change needed there.
- This is an "ask first" new ontology sub-tree per AGENTS.md; design review before implementation.
Spun off from #172.
Context
Follow-up from #172 (PR #367). That fix made
createProcessInstance.startInstructions[].elementIdresolve to a real, broker-accepted model element by adding:
providesElements: {id,type}[]on deployment fixtures (the model's typed-element ABox), andmodelElementTypeson theElementIdsemantic type (acceptable elementtypes, inpreference order, excluding
startEvent).This is correct and decoupled (no BPMN vocabulary in planner code), and it works. But it places a
per-field-site constraint onto the semantic type, which is conceptually the wrong layer.
The abstraction gap
ElementIdis a single semantic shared across many request sites, each with differentacceptable-element rules:
createProcessInstance.startInstructions[].elementIdruntimeInstructions[].afterElementIdmodifyProcessInstance.activateInstructions[].elementId…terminateInstructions[].elementInstanceKeymappingInstructionssource/targetPutting
modelElementTypeson theElementIdsemantic flattens a per-site predicate onto thetype. It's harmless today because only
createProcessInstanceuses the literal model-derivedfallback (all other sites use runtime emission:
__PENDING__+ step-extract), but it won'tgeneralise: the moment a second site needs a literal model element with a different rule, the
single
modelElementTypeslist is wrong for one of them.Proposed direction
Introduce a middle ontology layer — affordance — between
semantics(field meaning) andruntime-states(server state machine):Concretely:
serviceTaskis-ataskis-aactivityis-a
flowNode;startEventis-aeventis-aflowNode; ...) so rules can be expressed asflowNode \ startEventrather than enumerating every concrete type.binding a selection predicate over the taxonomy plus the expected runtime-state effect for the
test expectation.
modelElementTypesoff theElementIdsemantic and onto the per-site affordance.sBPMN assessment
sBPMN 2.0 was evaluated as the element-type TBox. It would give us
the subsumption hierarchy for free, but it's heavyweight, BPMN-specific external OWL, and the repo
already has its own ontology idiom (semantics / runtime-states / artifact-kinds). Recommendation:
a lightweight local taxonomy over importing sBPMN wholesale. sBPMN can inform the taxonomy's
shape.
Notes
providesElementson fixtures is the right ABox either way — no change needed there.Spun off from #172.