Optional technical reference. This material is for developers, integration specialists and platform administrators. For the consultant lesson, read the practical guide.
Preserved from source baseline
d4587c7c0e073e58c2d430342f65ac55dd701bf4; source/static examples retain their stated scope. They are not new runtime verification or required consultant setup steps.
Current model-key correction — 8 November 2026. The preserved examples below contain historical camelCase record-type/field keys. Do not copy those keys into the current editor or API: use record type leave_request and the lowercase field keys in the current model worksheet, including request_id, employee_id, manager_id, start_date, end_date, requested_days and decision_comment. Form, rule and case input names are separate declarations; map them explicitly rather than mechanically renaming every input. The preserved body remains historical source material, not a current executable model payload.
Build the leave application’s data and rules
This tutorial supplies the data/rule foundation for a reader-created Leave requests application. It does not claim Inflow contains a built-in HR product or that a JSON fragment imports a complete application. The story uses Nadia as builder, Mohammad as employee and Sara as manager; the identity lab supplies real accounts/grants. Every server-issued ID, revision, version, impact receipt and publication must come from the reader’s admitted environment.
Read schema publication, rule kinds and expression inputs when a concept is new. The path is logical draft → immutable schema → reviewed physical publication → synthetic records → published eligibility/read rules. These stages deliberately expose their different authorities and outputs.
The examples are source-reviewed teaching procedures. They have not been executed against a product runtime/provider as part of this documentation work. Use only an owned authorized fixture; current human/runtime/data/source/provider holds remain.
flowchart LR
Draft[Logical model draft] --> Version[Published schema version]
Version --> Applied[Reviewed APPLIED destination]
Applied --> Rows[Synthetic secured records]
Rows --> Query[Published governed query]
Policy[Admitted balance facts] --> Eligibility[Published eligibility rule]
Query --> Consumers[Published interfaces and workflow mappings]
Eligibility --> Consumers
Milestone 1 — Prepare a scoped learning workspace and fixture worksheet
Scenario and inputs. Nadia is the builder, Mohammad the employee and Sara the manager. These are story labels; the identity lab supplies actual account IDs, normal sessions and scoped grants. Use a new owner-admitted people-ops learning workspace and a teaching connector/namespace. Do not reuse production personnel data or assume root/development headers model ordinary-user admission.
Procedure. 1. Complete only milestones1–4 of the identity and permissions lab now, or their explicitly authorized fixture equivalent. Its application-contribution and ordinary-user milestones wait until these data, interface and workflow publications exist; return to those later stages afterward. 2. Confirm Nadia can manage the intended model/rules and view the admitted target connector; Sara and Mohammad do not inherit authoring/admin access merely by appearing in example data. 3. Record the actual workspace ID/key, actor IDs, connector ID, namespace and expected publication owner. 4. Write the fixture values below into a worksheet, replacing employee/manager identifiers with the actual admitted values before any execution.
| Business input | Teaching value | Meaning |
|---|---|---|
| requestId | leave-2026-014 |
Unique business identity, not a task ID. |
| employeeId / managerId | Actual fixture IDs for Mohammad / Sara | Stored data; not authorization. |
| startDate / endDate | 2026-12-14 / 2026-12-18 |
Calendar dates. |
| requestedDays | 5 |
Explicit integer quantity; calendar policy is separate. |
| status | PENDING |
Business record state, distinct from engine/task status. |
| decisionComment | Omitted initially | Optional text with its own disclosure policy. |
Expected result. The reader has an explicit actor/environment boundary and no business object yet. A stable requestId is a business key, while actor IDs and later native record identities serve different contracts.
Failure and recovery. If the workspace or source is unavailable, resolve the specific missing role/publication/destination with its owner. Do not create a privileged account or broaden a shared grant to keep following the tutorial.
Sources. DataModelController.java, DataModelController.java.
Milestone 2 — Create and inspect the actual logical model draft
Scenario and inputs. The reader has the workspace and target worksheet from milestone 1. The logical model key is leave and its modeled type is leaveRequest. The following is a full current create-draft JSON body; it is neither a deployed schema nor a complete application import package.
Procedure. 1. Review the field types, requiredness, enumeration and natural/business key. 2. Create through POST /api/data-models/drafts in the normal authenticated workspace context, or enter the equivalent model in Studio. 3. Retain the actual draft ID and returned revision. 4. Read /api/data-models/drafts/{draftId} and compare all saved fields, not just the displayed name. 5. Treat the default primary-key policy separately from requestId: unless deliberately changed through a supported policy, the model uses its system identity.
{
"key": "leave",
"name": "Leave requests",
"description": "Synthetic teaching application",
"schema": {
"recordTypes": [
{
"key": "leaveRequest",
"name": "Leave request",
"pluralName": "Leave requests",
"origin": "MODELED",
"fields": [
{
"key": "requestId",
"name": "Request ID",
"type": {
"mode": "PORTABLE",
"portable": "STRING"
},
"required": true,
"unique": true
},
{
"key": "employeeId",
"name": "Employee identifier",
"type": {
"mode": "PORTABLE",
"portable": "STRING"
},
"required": true,
"unique": false
},
{
"key": "managerId",
"name": "Manager identifier",
"type": {
"mode": "PORTABLE",
"portable": "STRING"
},
"required": false,
"unique": false
},
{
"key": "startDate",
"name": "Start date",
"type": {
"mode": "PORTABLE",
"portable": "DATE"
},
"required": true,
"unique": false
},
{
"key": "endDate",
"name": "End date",
"type": {
"mode": "PORTABLE",
"portable": "DATE"
},
"required": true,
"unique": false
},
{
"key": "requestedDays",
"name": "Requested days",
"type": {
"mode": "PORTABLE",
"portable": "INTEGER"
},
"required": true,
"unique": false
},
{
"key": "status",
"name": "Status",
"type": {
"mode": "PORTABLE",
"portable": "ENUM",
"enumValues": [
"PENDING",
"APPROVED",
"DECLINED"
]
},
"required": true,
"defaultValue": "PENDING"
},
{
"key": "decisionComment",
"name": "Decision comment",
"type": {
"mode": "PORTABLE",
"portable": "TEXT"
},
"required": false,
"unique": false
}
],
"naturalKey": [
"requestId"
]
}
],
"relationships": [],
"metadata": {}
}
}
Expected result. The saved draft contains the intended typed record contract. It creates no external table, runtime case, task or account. The source-backed JSON is syntactically complete; resource availability, schema validation and execution still belong to the actual environment.
Failure and recovery. A duplicate key or validation issue should lead to a deliberate draft correction. Preserve the returned revision and another builder’s work; never solve a logical-model conflict by altering production tables or replacing the model’s source origin.
Sources. DataModelController.java, RecordType.java, FieldTypeRef.java.
Milestone 3 — Validate and publish an immutable logical schema
Scenario and inputs. Nadia’s saved draft now has a real revision. She must separate a sound edit from a published release, and neither one proves a physical target is ready. Any concurrent builder can make the earlier local copy stale.
Procedure. 1. Validate the exact draft using the model editor or POST /api/data-models/drafts/{draftId}/validate with the supported current schema/target context. 2. Correct issues by saving the reviewed full schema with the latest actual expectedRevision; do not merely edit the timestamp. 3. Use the native Publish flow, review the actual publication impact and resolve its blocking findings. 4. The native schema publication endpoint is /drafts/{draftId}/publish-version; its coordinated impact header comes from the actual review flow, never a fabricated string. 5. Retain the returned immutable model version and the exact draft/content association.
Expected result. There is now an immutable logical schema version that can be inspected by its actual model/version coordinates. It remains distinct from the editable draft revision and from a later APPLIED destination publication.
Failure and recovery. A stale revision requires reloading and reconciling intended changes. A changed/expired publication impact requires a new review of the changed candidate, not a forged receipt or blind retry. Do not choose an unrelated latest version because its label looks similar.
Sources. DataModelController.java, DataModelController.java.
Milestone 4 — Review and activate the physical teaching destination
Scenario and inputs. The operator has admitted an empty owned teaching destination. Nadia has logical version coordinates from milestone 3 and the required publication/connector authority. Applying DDL is consequential and is not authorized by reading this tutorial.
Procedure. 1. Inspect the destination’s supported deployment dialect and namespace through the native model publication flow. 2. Review the DDL preview for this exact model/version/target, including identities, fields and constraints. 3. Review activation impact and obtain the actual issued plan/receipt. 4. Apply through the native make-live/publication flow, retaining the original idempotency intent. The HTTP publication body contains targetConnectorId, targetSchema, idempotencyKey and impactReceiptId. 5. Read the resulting /api/data-models/publications/{publicationId} and retain its real ID/status before making the source selectable for runtime consumers.
Expected result. Only an actual APPLIED publication qualifies this physical target for the following source-dependent steps. Logical publication alone, a successful DDL preview or a displayed connector name cannot replace it.
Failure and recovery. If the call fails or disconnects, inspect the original publication and physical statement evidence before any retry. Nontransactional dialects can leave partial DDL. Do not drop/rebuild a schema, choose a new idempotency key or advertise fake APPLIED state to bypass the operator’s recovery decision.
Sources. DataModelController.java, DataModelController.java.
Milestone 5 — Create synthetic rows through the actual secured record contract
Scenario and inputs. The applied teaching source exists and the actor has the record-management authority required by this administrative record endpoint. The sample creates business data, not a process instance. In an ordinary end-user application, use the separately published and admitted generated form/action instead of exposing administrator record management.
Procedure. 1. Replace modelId/typeKey/publicationId and actor identifiers with the actual fixture coordinates. 2. Create one row through POST /api/data-models/{modelId}/record-types/leaveRequest/records using the complete body below and one original idempotency key for that intended create. 3. Retain the actual returned id and record; do not call the business requestId a runtime task ID or assume the result includes a universal receipt field. 4. Read the permitted record list and verify the stored fields. 5. Create separately reviewed 014/015/016 fixtures with distinct business and idempotency identities when exercising paging/filtering.
{
"values": {
"requestId": "leave-2026-014",
"employeeId": "actual-mohammad-id",
"managerId": "actual-sara-id",
"startDate": "2026-12-14",
"endDate": "2026-12-18",
"requestedDays": 5,
"status": "PENDING"
},
"idempotencyKey": "leave-training-original-create-014",
"publicationId": "actual-applied-publication-id"
}
Expected result. The secured writer applies the actual publication and declared field contract. A successful create means a record exists at that boundary; it does not automatically instantiate the leave workflow or grant Mohammad/Sara access to arbitrary model rows.
Failure and recovery. A duplicate identity, invalid date/type, denied source or uncertain response needs its native record/intent recovery. Preserve the original intent and inspect the supported result before resubmitting. Do not fabricate an opaque handle from the numeric/system ID; use handles only where the actual read/action contract issues them.
Sources. DataModelRecordsController.java, DataRecordWriteService.java.
Milestone 6 — Publish eligibility and a reusable governed query
Scenario and inputs. The record source contains the synthetic rows. Nadia needs a pure eligibility decision and a read query; they should not be hidden mutations or trust a claimant’s unverified balance. AvailableDays must be supplied from the application’s admitted balance/policy source.
Procedure. 1. Create the eligibility draft using the full request below and validate its declared inputs. 2. Test 5/12,13/12,0/12 and missing-required-input cases under the intended caller. 3. Publish the actual reviewed draft, recording its version. 4. Build a QUERY rule using the Query Builder cases, explicit published leave source and minimal projection. 5. Use canonical namespaced input expressions and keep the guided/expression representation coherent. 6. Publish only the intended query result contract; record whether consumers can satisfy required inputs and which adapters are supported.
{
"ruleKey": "leave-eligible",
"name": "Leave eligibility",
"kind": "EXPRESSION",
"body": "inputs:requestedDays > 0 and inputs:requestedDays <= inputs:availableDays",
"inputs": [
{
"name": "requestedDays",
"typeName": "INTEGER",
"required": true,
"multiple": false
},
{
"name": "availableDays",
"typeName": "INTEGER",
"required": true,
"multiple": false
}
]
}
Expected result. The resulting eligibility rule returns a Boolean and the QUERY performs an authorized read. Neither true nor a matching row means that a manager approved the request, a balance was deducted, or a task completion was accepted.
Failure and recovery. A type/input/dependency failure should be repaired at its exact contract. Do not make the rule permissive to hide unknown balances or choose an unscoped query to manufacture a total. Hyphenated rule keys use supported quoted bracket namespace/helper syntax when referenced from expressions.
Sources. RuleDefinitionController.java, RuleInputDefinition.java, QueryRuleRuntime.java.
Handoff worksheet and next tutorial
| Output | Record the actual value | Next consumer |
|---|---|---|
| Workspace and actors | Real IDs and scoped roles from the identity fixture | All following calls and sessions. |
| Logical model | Actual modelId/key, version, type key and field contract | Query and screen metadata. |
| Physical publication | Actual APPLIED publicationId/target | Governed reads/writes; never an arbitrary latest destination. |
| Synthetic row | Actual returned record identity, requestId and any natively issued handle | Published record view/action mapping. |
| Eligibility rule | leave-eligible and actual published version/input contract |
Workflow decision logic. |
| Read query | Actual key/version/return shape and input requirements | A supported DataGrid/Table/Repeater adapter. |
Continue with query-driven application and App Shell/interface build. The vacation workflow and human tasks tutorial maps startDate/endDate/requestedDays into the real case-file contract. Its employee/manager USER values come from actual identity selection, not an authority-bearing cast of record text. Creating the record is not an automatic workflow-start event unless a separately authored and admitted trigger actually defines that behavior.
Before calling this learning exercise successful, inspect the actual saved/published objects and authorized results in your fixture. Record any runtime failure at its real boundary. Source parity and valid JSON alone are not an executed application demo.