Help us shape the future of Go! Take the 2026 Go Developer Survey

compiler

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package compiler turns a BPMN model into an immutable, integer-indexed CompiledProcess (ADR-0004). Element ids become array indices, topology lives in shared contiguous arrays, and per-type data lives in detail tables, so the runtime hot path is pointer arithmetic with no strings, maps, or locks (invariant I5).

This is the minimal target structure plus a programmatic Builder. The XML parse/resolve/validate front end (compiler.md stages 1–5) is a later milestone; the linearized result here is the shape the engine consumes.

Index

Constants

View Source
const (
	ConstantSourceModel       = "model"
	ConstantSourceApplication = "application"
	ConstantSourceServer      = "server"
)

Constant sources (ADR-0453, ADR-0456).

View Source
const (
	ApplicationNamespace = "application"
	ServerNamespace      = "server"
)

ApplicationNamespace and ServerNamespace are the variables an instance holds the constants in whose values the installation holds (ADR-0456): one object each, so a model reads application.TENANT_ID or server.ENVIRONMENT_URL in FEEL and $application.TENANT_ID in PowerShell, and the source of every value is in the name it is read by. A namespace exists only in an instance of a process that declares one of its members, and is then a constant itself — nothing in the run may replace it.

View Source
const (
	RuleReachability           = "reachability"
	RuleGatewayNoOutgoing      = "gateway.no-outgoing"
	RuleGatewayNoIncoming      = "gateway.no-incoming"
	RuleGatewayMultipleDefault = "gateway.multiple-default"
	RuleGatewayMissingDefault  = "gateway.missing-default"
	RuleBoundaryIncomingFlow   = "boundary.incoming-flow"
	RuleBoundaryInvalidHost    = "boundary.invalid-host"
	RuleFlowCrossScope         = "flow.cross-scope"
	// RuleAgentTool marks a tool of an agent-driven ad-hoc that gives the model nothing to
	// go on: an entry activity with no <bpmn:documentation>, so the model is told the tool
	// exists and not what it is for (ADR-0253). A
	// warning, not an error: the tool still runs, and a model that guesses well enough is
	// not an unrunnable model — but it is one nobody can predict.
	RuleAgentTool = "agent.tool"
	// RuleErrorUnhandled marks an error end event with no statically matching enclosing
	// error boundary or error event subprocess in the same process (ADR-0089). A warning,
	// not an error: the catch may live at a call-activity caller one process cannot see,
	// and the runtime incident is the real terminal for a truly uncaught error.
	RuleErrorUnhandled = "error.unhandled"
	// RuleCancelEndOutsideTransaction marks a cancel end event whose enclosing scope is not a
	// transaction — an error, since BPMN allows a cancel end only within a <transaction> (ADR-0108).
	RuleCancelEndOutsideTransaction = "cancel.end-outside-transaction"
	// RuleCancelBoundaryInvalidHost marks a cancel boundary attached to something other than a
	// transaction — an error, since a cancel boundary may attach only to a <transaction> (ADR-0108).
	RuleCancelBoundaryInvalidHost = "cancel.boundary-invalid-host"
	// RuleTransactionNoCancelBoundary marks a transaction that has a cancel end event but no
	// cancel boundary (ADR-0108). A warning: the cancellation tears the transaction down with
	// no recovery route, usually a modeling mistake, but not structurally invalid.
	RuleTransactionNoCancelBoundary = "transaction.no-cancel-boundary"
	// RuleEventGatewayTarget marks an event-based gateway whose outgoing flow leads to a
	// non-catch element — an error, since a deferred choice can only race catch events
	// (message/timer/signal intermediate catch); a task or gateway cannot participate (ADR-0110).
	RuleEventGatewayTarget = "event-gateway.invalid-target"
	// RuleTimerStartSchedule marks a timer start event whose constant FEEL schedule cannot be
	// resolved to a valid duration/date/cycle at deploy (ADR-0111). It is an error: a start
	// schedule that will not resolve arms nothing, so the process would silently never trigger.
	// A start-event FEEL schedule is compiler-constant (references no variables, ADR-0056), so it
	// evaluates the same way at deploy as at arm and can be checked without an instance.
	RuleTimerStartSchedule = "timer.start-schedule"
	// RuleLoopUnbounded marks a standard loop whose only bound is its FEEL condition
	// (ADR-0133): nothing in the model says how often it may run, so a condition that
	// never turns false loops until the instance is cancelled. A warning, not an error
	// — such a loop is legal BPMN and often correct — and the engine's safety ceiling
	// stops a runaway; the warning is what turns the bound into a stated decision.
	RuleLoopUnbounded = "loop.unbounded"
	// RuleLoopCounterMapping marks a looping activity whose zeebe:ioMapping writes the
	// name the loop's own counter uses (ADR-0077/ADR-0133). An error: the mapping lands
	// in the very scope the engine binds loopCounter into, so it overwrites the fact the
	// loop reads to know which round just finished — every round then looks like the
	// first, the loop never reaches its maximum, and it repeats until someone cancels
	// the instance. Map to a different name and read loopCounter as it is.
	RuleLoopCounterMapping = "loop.counter-mapping"
	// RuleDottedTarget marks a model that writes to a variable name containing a dot —
	// a result variable, an I/O mapping target, a loop's input element or output
	// collection. An error: Atlas writes a *variable of that name*, it does not write a
	// field inside a structure, so `customers.gesamtumsatz` silently produces a variable
	// literally called that beside the `customers` it was meant to extend. The author
	// finds out by reading the variable list and wondering, which is exactly the kind of
	// quiet wrong answer a deploy check exists to prevent.
	RuleDottedTarget = "variable.dotted-target"
	// RuleVariableShadowsDataObject marks a model that writes a variable under the name
	// of one of its own data objects. A warning, not an error: it is legal, and one
	// name for one idea is a reasonable thing to want. But the two are not one thing.
	// A data object carries a type, a data state and a recorded history; a variable
	// carries a value. They live in separate records and are written by separate
	// events, and a FEEL expression can see only the variable — an object is readable
	// solely through a data input association, which copies it into a variable. So a
	// write to either leaves the other as it was, and two things drift apart under one
	// name while every expression in the model quietly means just one of them.
	RuleVariableShadowsDataObject = "variable.shadows-data-object"

	// RuleDecisionVersionTag marks a business rule task bound with Camunda's
	// `versionTag`, which Atlas cannot honour: a decision version carries no tag
	// here. It used to be read as latest, so a model that pinned a tag ran whatever
	// was newest. A deploy refuses it; a definition already deployed with one is
	// brought back on reload and keeps the behaviour it had (ADR-0177,
	// ADR-0423).
	RuleDecisionVersionTag = "decision.version-tag"

	// RuleConditionalStart marks a process-level start event carrying a conditional
	// event definition. Atlas runs a conditional event only inside an instance — a
	// catch, a boundary or an event subprocess (ADR-0137) — because a condition reads
	// variables, and before an instance exists there are none. The start used to be
	// compiled as a plain start with its condition dropped, so the model deployed,
	// never started on its own, and ran unconditionally when started by hand. A
	// deploy refuses it; a definition already deployed with one is brought back on
	// reload and keeps the behaviour it had (ADR-0177, ADR-0393,
	// ADR-0429).
	RuleConditionalStart = "start.conditional"

	// RuleEventGatewayKind marks an event-based gateway of a kind atlas does not run:
	// instantiate="true", which makes the gateway start the instance, or
	// eventGatewayType="Parallel", which makes it wait for every event rather than the
	// first. atlas runs the exclusive deferred choice inside a running instance
	// (ADR-0110) and used to run these as that, so the model deployed and did something
	// other than its diagram says. A deploy refuses it; a definition already deployed
	// with one is brought back on reload and keeps the behaviour it had (ADR-0177,
	// ADR-0393, #804).
	RuleEventGatewayKind = "event-gateway.kind"

	// The wizard rules (ADR-0449). A wizard is an embedded subprocess marked
	// atlas:wizard: one sitting of one filler, walked user task by user task.
	//
	// RuleWizardValue marks an atlas:wizard value that names no kind. An error: the
	// author meant something by it, and whatever it was would silently not happen.
	RuleWizardValue = "wizard.value"
	// RuleWizardNested marks a wizard inside a wizard. An error: a filler sees one
	// sitting at a time, so a sitting within a sitting has no meaning they could see.
	RuleWizardNested = "wizard.nested"
	// RuleWizardEventSubProcess marks an event subprocess marked as a wizard. An
	// error: nobody enters an event subprocess, so there is no filler to carry.
	RuleWizardEventSubProcess = "wizard.event-subprocess"
	// RuleWizardPublicAssignment marks a user task inside a public wizard that names an
	// assignee or candidate groups. An error: the holder of a public wizard's step is
	// whoever holds the sitting's pass, and a second answer to "who holds this" is one
	// too many.
	RuleWizardPublicAssignment = "wizard.public-assignment"
	// RuleWizardWait marks an element inside a wizard that waits on something other
	// than the filler: a message, a signal, a timer, a condition, an event-based race,
	// or a called process, whose steps live in another instance the continuation does
	// not follow. A warning: it runs, but the filler is left looking at a screen that
	// says to wait.
	RuleWizardWait = "wizard.wait"
	// RuleWizardNoTimeout marks a wizard with no interrupting timer boundary event. A
	// warning: a sitting nobody finishes then stays open for good. For a public wizard
	// the publication of a start link refuses it (UntimedPublicWizard), because there
	// every abandoned attempt of an anonymous visitor would stay a live instance.
	RuleWizardNoTimeout = "wizard.no-timeout"
)

Rule identifiers are stable machine slugs for the check that produced a Problem, so a UI can group, filter, or link to documentation by rule without parsing the human-readable Message (which is deliberately not a stable API). They are grouped by the three validation families of ROADMAP Milestone 1: reachability, gateway coverage, and scope consistency.

View Source
const (
	// RuleParse marks a document that will not decode at all, or a model with no
	// executable process — a model-level failure with no single owning element.
	RuleParse = "parse"
	// RuleCompile marks a per-process failure in an earlier compile stage (an
	// unknown flow reference, a bad FEEL expression) — the pool named nothing the
	// graph checks could inspect, so its error is surfaced as one Problem instead.
	RuleCompile = "compile"
	// RuleNullCall marks a stored definition brought back across a reload although
	// it calls a FEEL function this build does not have (ADR-0388). The call keeps
	// compiling to the constant null it has always been, because that is what the
	// definition has been running as; the record is how the operator is told to fix
	// the model, instead of the server refusing to start
	// (ADR-0393). A deploy never raises it —
	// there the same fault is a refusal.
	RuleNullCall = "feel.null-call"

	// RuleConstantName marks a stored definition brought back across a reload although
	// one of its constants is not named in capitals (or takes a reserved name), which a
	// deploy has refused since constant names were written in capitals (ADR-0454,
	// amended). An error, reported rather than raised: the model ran under the name it
	// has, and refusing it on a restart would take the server down for a spelling.
	RuleConstantName = "constant.name"

	// RuleConstantConflict marks a stored definition brought back across a reload although
	// one of its constants contradicts the rest of it — a variable it asks for, declares
	// personal or writes, or a fact the constant's namespace carries — which a deploy
	// refuses (ADR-0454, ADR-0456). 0.12.0 deployed such models before the namespaces
	// made a variable called application one of them. An error, reported rather than
	// raised: the process still runs, its constant seeded first and the write that would
	// replace it dropped, and refusing it on a restart would take the server down
	// (ADR-0393).
	RuleConstantConflict = "constant.conflict"
)

Rule slugs for whole-model dry-run findings that ValidateModel raises outside the per-node graph checks — a fault that stops the compile before a linearized graph exists, so it cannot be anchored the way the graph rules above are.

View Source
const AdJobType = "io.atlas.ad"

AdJobType is the reserved job type an Active Directory task carries. AD speaks LDAP, so it dials like the generic LDAP worker, but it adds the AD-specific provisioning primitives the generic worker cannot express: setting a password via unicodePwd over LDAPS, enabling/disabling an account via userAccountControl, and adding/removing a group member incrementally (ADR-0166).

View Source
const AdJobTypeIndex int32 = 19

AdJobTypeIndex is the interned index AdJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twentieth (after the nineteen job types above), so it is always 19. This lets a single in-process AD worker subscribe by one global index across every deployed process, the same way the LDAP worker uses LdapJobTypeIndex (ADR-0166).

View Source
const AgentJobType = "io.atlas.ai.agent"

AgentJobType is the reserved job type an agent-driven ad-hoc subprocess creates on the container itself, once per round (ADR-0253). It is not a service-task worker like the ones above: the job does not do the round's work, it *decides* it — the Worker Instance behind it calls the model and completes the job with either the tools to run next or a final answer, and the engine turns that into activations.

View Source
const AgentJobTypeIndex int32 = 27

AgentJobTypeIndex is the interned index AgentJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-eighth, so it is always 27.

View Source
const AiTaskJobType = "io.atlas.ai.task"

AiTaskJobType is the reserved job type an AI task carries: one call to a language model, one answer into one variable, no tools and no rounds (ADR-0256). It sits beside AgentJobType rather than inside it because the two are different shapes — a step that asks a question once, and a container whose model chooses what runs — and two shapes that never have to be told apart by looking inside a payload are worth an index. One kind serving several job types is clio's shape already.

View Source
const AiTaskJobTypeIndex int32 = 28

AiTaskJobTypeIndex is the interned index AiTaskJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-ninth, so it is always 28.

View Source
const CardDAVJobType = "io.atlas.carddav"

CardDAVJobType is the reserved job type a CardDAV task carries (ADR-0490). One job type serves every operation on an address book — find, read, search, list, create, update and delete a contact, and change its groups — because they share a server, a credential and WebDAV's answers; the operation is a modeled value, as it is for Google Contacts.

Like Google Contacts', nothing in the engine subscribes to it: the kind is worker-only, so the password that reads somebody's address book never enters the engine.

View Source
const CardDAVJobTypeIndex int32 = 37

CardDAVJobTypeIndex is the interned index CardDAVJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-eighth, so it is always 37.

View Source
const ClioQueryJobType = "io.atlas.clio.query"

ClioQueryJobType is the reserved job type a clio "query" task carries. The in-process clio worker subscribes to it to read projected state (get_state) or run a stored query (run_query) on the configured clio instance and write the result back into the task's result variable (ADR-0036).

View Source
const ClioQueryJobTypeIndex int32 = 8

ClioQueryJobTypeIndex is the interned index ClioQueryJobType is guaranteed to occupy: NewBuilder reserves it ninth, so it is always 8.

View Source
const ClioReadJobType = "io.atlas.clio.read"

ClioReadJobType is the reserved job type a clio "read" task carries. The in-process clio worker subscribes to it to read a subject's events (read_events) from the configured clio instance and write them back into the task's result variable as a JSON array (ADR-0036).

View Source
const ClioReadJobTypeIndex int32 = 9

ClioReadJobTypeIndex is the interned index ClioReadJobType is guaranteed to occupy: NewBuilder reserves it tenth, so it is always 9.

View Source
const ClioWriteJobType = "io.atlas.clio.write"

ClioWriteJobType is the reserved job type a clio "write-events" task carries. The in-process clio worker subscribes to it to append the event to the configured clio instance (ADR-0036), the same way the DMN worker subscribes to DMNJobType.

View Source
const ClioWriteJobTypeIndex int32 = 7

ClioWriteJobTypeIndex is the interned index ClioWriteJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it eighth, so it is always 7. This lets a single in-process clio worker subscribe by one global index across every deployed process, the same way the DMN worker uses DMNJobTypeIndex — which is what wires the clio worker into the server run loop (ADR-0036).

View Source
const CsvImportJobType = "io.atlas.csv-import"

CsvImportJobType is the reserved job type a CSV-import service task carries. An in-process worker parses an uploaded CSV (a `csvText` variable) against a column layout (a `columnConfig` variable, typically set by a preceding script task) into a `rows` collection — so a process ingests and validates a batch of records entirely on the engine, the upload arriving through a user-task form rather than a side-channel endpoint (ADR-0087).

View Source
const CsvImportJobTypeIndex int32 = 11

CsvImportJobTypeIndex is the interned index CsvImportJobType is guaranteed to occupy: NewBuilder reserves it twelfth, so it is always 11. A single in-process CSV worker subscribes by this global index across every deployed process, the same way the mail worker uses MailJobTypeIndex.

View Source
const DMNJobType = "io.atlas.dmn"

DMNJobType is the reserved job type business rule tasks carry. The in-process DMN worker subscribes to it to pick up decisions for evaluation, the same way an external worker subscribes to a service task's job type.

View Source
const DMNJobTypeIndex int32 = 0

DMNJobTypeIndex is the interned index DMNJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it first, so it is always 0. Job type indices are otherwise per-process (interned in build order), which makes a global int32-keyed job runner ambiguous across processes — index 3 could be a service task's type in one process and something else in another. Pinning the DMN type to a single global index lets one in-process DMN worker serve every deployed process without colliding with any service-task type (which always interns to >= 1). See ADR-0014.

View Source
const DiscordJobType = "io.atlas.discord"

DiscordJobType is the reserved job type a Discord task carries (ADR-0258). One job type serves every Discord operation — send a message, edit or delete one, read one, list a channel's messages, or open a thread — because they share a bot identity, a credential and an error envelope; the operation is a modeled value rather than a reserved index of its own, as it is for Jira (ADR-0201) and Google Sheets (ADR-0235).

View Source
const DiscordJobTypeIndex int32 = 29

DiscordJobTypeIndex is the interned index DiscordJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirtieth, so it is always 29. Together with the name it lets a job carry its type as an integer and the in-process Discord worker subscribe by one global index across every deployed process, the same way the Jira worker uses JiraJobTypeIndex.

View Source
const EntraJobType = "io.atlas.entra"

EntraJobType is the reserved job type a Microsoft Entra ID task carries. Entra is Graph, so a process could in principle reach it with the REST worker; what this type marks is a task that names a *lifecycle operation* instead of a URL and a JSON fragment, the same argument the AD worker makes against generic LDAP (ADR-0166/0171).

Like the SQL types above it, no in-process handler subscribes to it: the kind is worker-only, so the tenant's client secret never enters the engine.

View Source
const EntraJobTypeIndex int32 = 23

EntraJobTypeIndex is the interned index EntraJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-fourth, so it is always 23.

View Source
const ExchangeJobType = "io.atlas.exchange"

ExchangeJobType is the reserved job type a Microsoft Exchange task carries (ADR-0462). One job type serves every Exchange operation — a mailbox, a permission on one, a distribution group, a mailbox setting — and both targets, Exchange Online and Exchange Server: which cmdlet runs is decided by the operation and by the Worker's target, not by a reserved index of its own.

Like Entra's, nothing in the engine subscribes to it: the kind is worker-only, so an app registration or a service account that can administer every mailbox in an organization never enters the engine.

View Source
const ExchangeJobTypeIndex int32 = 33

ExchangeJobTypeIndex is the interned index ExchangeJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-fourth, so it is always 33.

View Source
const GoogleContactsJobType = "io.atlas.googlecontacts"

GoogleContactsJobType is the reserved job type a Google Contacts task carries (ADR-0476). One job type serves every operation on an address book — find, read, list, create, update and delete a contact, label one, and search the organization's directory — because they share an account, a credential and Google's error envelope; the operation is a modeled value, as it is for Google Sheets (ADR-0235).

Like Exchange's, nothing in the engine subscribes to it: the kind is worker-only, so a service account that reads a person's address book never enters the engine.

View Source
const GoogleContactsJobTypeIndex int32 = 36

GoogleContactsJobTypeIndex is the interned index GoogleContactsJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-seventh, so it is always 36.

View Source
const GoogleSheetsJobType = "io.atlas.googlesheets"

GoogleSheetsJobType is the reserved job type a Google Sheets task carries (ADR-0235). One job type serves every spreadsheet operation — create a spreadsheet, add a sheet, read, write, append, clear, delete a sheet or trash the file — because they share a credential and an error envelope; the operation is a modeled value rather than a reserved index of its own, as it is for Jira (ADR-0201).

View Source
const GoogleSheetsJobTypeIndex int32 = 26

GoogleSheetsJobTypeIndex is the interned index GoogleSheetsJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-seventh, so it is always 26. Together with the name it lets a job carry its type as an integer and the in-process Google Sheets worker subscribe by one global index across every deployed process, the same way the Jira worker uses JiraJobTypeIndex.

View Source
const JiraJobType = "io.atlas.jira"

JiraJobType is the reserved job type a Jira task carries (ADR-0201). One job type serves every Jira operation — create an issue, read one, update, transition, comment, assign, or search — because they share an instance, a credential and an error envelope; the operation is a modeled value rather than a reserved index of its own, as it is for the directory workers (ADR-0153/0154/0166/0172).

View Source
const JiraJobTypeIndex int32 = 25

JiraJobTypeIndex is the interned index JiraJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-sixth, so it is always 25. Together with the name it lets a job carry its type as an integer and the in-process Jira worker subscribe by one global index across every deployed process, the same way the mail worker uses MailJobTypeIndex.

View Source
const JsJobType = "io.atlas.script.javascript"

JsJobType is the reserved job type a JavaScript script task carries; the in-process Node worker subscribes to it (ADR-0047), like the PowerShell worker.

View Source
const JsJobTypeIndex int32 = 6

JsJobTypeIndex is the interned index JsJobType is guaranteed to occupy: NewBuilder reserves it seventh, so it is always 6, giving the in-process Node worker one global index across every deployed process.

View Source
const LdapJobType = "io.atlas.ldap"

LdapJobType is the reserved job type a generic LDAP task carries. Like the REST/SCIM workers it authors its endpoint in the model — the LDAP server URL, bind DN, and target/base DN — and names a server-side secret for the bind password (ADR-0041); the in-process LDAP worker subscribes to it to perform the directory operation (search/add/modify/delete/modify-password) off the hot path (ADR-0154).

View Source
const LdapJobTypeIndex int32 = 17

LdapJobTypeIndex is the interned index LdapJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it eighteenth (after the seventeen job types above), so it is always 17. This lets a single in-process LDAP worker subscribe by one global index across every deployed process, the same way the SCIM worker uses ScimJobTypeIndex (ADR-0154).

View Source
const LdifJobType = "io.atlas.ldif"

LdifJobType is the reserved job type a directory-file task carries: LDIF (RFC 2849) or DSML v1, read or written (ADR-0171).

It has an in-process handler as well as a worker one, and that is not a lapse from ADR-0164: parsing a file is pure computation with no network and no credential, the same category as a FEEL script or a local DMN evaluation, which that record explicitly leaves in the engine. It is offloadable all the same.

View Source
const LdifJobTypeIndex int32 = 24

LdifJobTypeIndex is the interned index LdifJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-fifth, so it is always 24.

View Source
const LoopCounterVariable = "loopCounter"

LoopCounterVariable is the name of the 1-based per-iteration counter a loop binds into each round's own scope (ADR-0077/ADR-0133, matching Zeebe). The engine writes it and reads it back to know which round just finished, so it is the engine's name to own inside a loop: the deploy refuses a model that maps onto it there (loop.counter-mapping), and both sides name it from here rather than repeating the string.

View Source
const MailJobType = "io.atlas.mail.send"

MailJobType is the reserved job type an outbound mail task carries. The in-process mail worker subscribes to it to send the model-authored message through a server-registered mail provider off the hot path (ADR-0079), the same way the clio worker subscribes to ClioWriteJobType.

View Source
const MailJobTypeIndex int32 = 10

MailJobTypeIndex is the interned index MailJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it eleventh (after the ten job types above), so it is always 10. This lets a single in-process mail worker subscribe by one global index across every deployed process, the same way the REST worker uses RestJobTypeIndex (ADR-0067/0078).

View Source
const MariaDBJobType = "io.atlas.mariadb"

MariaDBJobType is the reserved job type a MariaDB (or MySQL) task carries. Statements use ?-style positional placeholders only.

View Source
const MariaDBJobTypeIndex int32 = 21

MariaDBJobTypeIndex is the interned index MariaDBJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-second, so it is always 21.

View Source
const MsSqlJobType = "io.atlas.mssql"

MsSqlJobType is the reserved job type a Microsoft SQL Server task carries. Statements use @p1-style placeholders and may bind by name.

View Source
const MsSqlJobTypeIndex int32 = 20

MsSqlJobTypeIndex is the interned index MsSqlJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-first (after the twenty job types above), so it is always 20.

View Source
const NumBpmnTypes = numBpmnTypes

NumBpmnTypes is the size a behavior dispatch table indexed by BpmnType needs.

View Source
const PostgresJobType = "io.atlas.postgres"

PostgresJobType is the reserved job type a PostgreSQL task carries. Statements use $1-style positional placeholders only.

View Source
const PostgresJobTypeIndex int32 = 22

PostgresJobTypeIndex is the interned index PostgresJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it twenty-third, so it is always 22.

View Source
const PwshJobType = "io.atlas.script.powershell"

PwshJobType is the reserved job type a PowerShell script task carries. The in-process PowerShell script worker subscribes to it to run the script off the hot path and write its result back, the same way the DMN worker subscribes to DMNJobType (ADR-0047). Each polyglot script language gets its own reserved job type so a customer can deploy and secure only the worker(s) they need.

View Source
const PwshJobTypeIndex int32 = 2

PwshJobTypeIndex is the interned index PwshJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it third (after DMN and user tasks), so it is always 2. This lets a single in-process PowerShell worker subscribe by one global index across every deployed process, the same way the DMN worker uses DMNJobTypeIndex (see ADR-0047).

View Source
const PythonJobType = "io.atlas.script.python"

PythonJobType is the reserved job type a Python script task carries; the in-process Python worker subscribes to it (ADR-0047), like the PowerShell worker.

View Source
const PythonJobTypeIndex int32 = 5

PythonJobTypeIndex is the interned index PythonJobType is guaranteed to occupy: NewBuilder reserves it sixth (after DMN, user tasks, PowerShell, the temis worker, and REST), so it is always 5, giving the in-process Python worker one global index across every deployed process.

View Source
const RemedyJobType = "io.atlas.remedy.entry"

RemedyJobType is the reserved job type a BMC Remedy task carries. The in-process Remedy worker subscribes to it to create an entry (e.g. an incident) in a Remedy form through the BMC AR System REST API off the hot path (ADR-0106), the same way the mail worker subscribes to MailJobType. The provider host and credentials live in a server-registered worker, like clio/mail; only the form name and its field values are model-authored.

View Source
const RemedyJobTypeIndex int32 = 13

RemedyJobTypeIndex is the interned index RemedyJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it fourteenth (after the thirteen job types above), so it is always 13. This lets a single in-process Remedy worker subscribe by one global index across every deployed process, the same way the mail worker uses MailJobTypeIndex (ADR-0079/0106).

View Source
const RestJobType = "io.atlas.http.rest"

RestJobType is the reserved job type an HTTP-REST task carries. The in-process REST worker subscribes to it to call the model-authored REST endpoint off the hot path and write the response back (ADR-0036/0067), the same way the clio worker subscribes to ClioWriteJobType.

View Source
const RestJobTypeIndex int32 = 4

RestJobTypeIndex is the interned index RestJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it fifth (after DMN, user tasks, PowerShell, and the temis worker), so it is always 4. This lets a single in-process REST worker subscribe by one global index across every deployed process, the same way the DMN worker uses DMNJobTypeIndex (ADR-0067).

View Source
const S3JobType = "io.atlas.s3"

S3JobType is the reserved job type an object-store task carries (ADR-0442). One job type serves every object operation — put one down, read a small one back, ask whether it is there, list what is under a prefix, copy one, delete one, or mint a time-limited URL somebody can open it with — because they share a bucket, a credential and an error envelope; the operation is a modeled value rather than a reserved index of its own, as it is for Jira (ADR-0201), Google Sheets (ADR-0235) and Discord (ADR-0258).

View Source
const S3JobTypeIndex int32 = 32

S3JobTypeIndex is the interned index S3JobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-third, so it is always 32. Together with the name it lets a job carry its type as an integer and the in-process S3 worker subscribe by one global index across every deployed process, the same way the Jira worker uses JiraJobTypeIndex.

View Source
const SafeLoopCeiling = 1000

SafeLoopCeiling is how many runs a standard loop that states no loopMaximum gets before the engine stops it and raises an incident (ADR-0133, amended). It is a safety net for the one construct that can spin on its own — a FEEL loop condition that never turns false — not a semantic limit: a loop that states its own loopMaximum is bounded by that number alone, however large, because the author said it out loud and the deploy validated it. The engine enforces the ceiling; the compiler names it in the loop.unbounded warning, so both read the same number.

View Source
const ScimJobType = "io.atlas.scim"

ScimJobType is the reserved job type a SCIM 2.0 task carries. Like the REST worker it authors its endpoint in the model — the SCIM base URL and resource type — and names a server-side secret for authentication (ADR-0041); the in-process SCIM worker subscribes to it to perform the resource operation off the hot path and write the response back, the same way the REST worker subscribes to RestJobType (ADR-0153).

View Source
const ScimJobTypeIndex int32 = 16

ScimJobTypeIndex is the interned index ScimJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it seventeenth (after the sixteen job types above), so it is always 16. This lets a single in-process SCIM worker subscribe by one global index across every deployed process, the same way the REST worker uses RestJobTypeIndex (ADR-0153).

View Source
const SharePointJobType = "io.atlas.sharepoint.createitem"

SharePointJobType is the reserved job type a SharePoint create-item task carries. The in-process SharePoint worker subscribes to it to create a list item in a model-authored SharePoint site/list through a server-registered SharePoint provider (Microsoft Graph) off the hot path (ADR-0141), the same way the mail worker subscribes to MailJobType.

It serves create-item and nothing else, although the Worker Type has grown every other list and library operation since: those carry SharePointOpsJobType. The split is what keeps a worker built before the operations existed from performing them. Such a worker reads a job as "create an item from these fields" whatever else it carries, so a get-item or a delete-item handed to it would create an item and complete the job as if it had done what was asked. Under a job type it does not subscribe to, the same job waits for a worker that knows it.

View Source
const SharePointJobTypeIndex int32 = 12

SharePointJobTypeIndex is the interned index SharePointJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirteenth (after the twelve job types above), so it is always 12. This lets a single in-process SharePoint worker subscribe by one global index across every deployed process, the same way the mail worker uses MailJobTypeIndex (ADR-0141).

View Source
const SharePointOpsJobType = "io.atlas.sharepoint"

SharePointOpsJobType is the reserved job type every SharePoint operation but create-item carries (ADR-0141, amended): reading, updating, deleting and listing list items, and uploading, downloading, inspecting, listing, creating and deleting what a document library holds. One job type serves all of them because they share a Worker, a credential and Graph's error envelope; the operation is a modelled value, as it is for S3 and Jira.

It exists beside SharePointJobType rather than replacing it for the reason given there: the job type is the one contract an older worker can be held to, and a worker that has never heard of this one leaves its jobs alone.

View Source
const SharePointOpsJobTypeIndex int32 = 35

SharePointOpsJobTypeIndex is the interned index SharePointOpsJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-sixth, so it is always 35.

View Source
const ShopCommandJobType = "io.atlas.shop.command"

ShopCommandJobType is the reserved job type of a shop send task in mode `command` (ADR-0429 §4, §10 decision 1): the point where a process issues an action on a position it does not carry. It is a type of its own because its handler acts through the order act, which waits on the run loop, so it may run only in a round that works its jobs off the loop — never in the in-process drive a fork or a migration runs on it.

View Source
const ShopCommandJobTypeIndex int32 = 31

ShopCommandJobTypeIndex is the interned index ShopCommandJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-second, so it is always 31.

View Source
const ShopJobType = "io.atlas.shop"

ShopJobType is the reserved job type a shop send task carries (ADR-0429 §4): the point where a product's process states how an action ended, or — in a later mode — issues one of its own. The server serves it itself: it only changes state the run loop owns, reaches no system and holds no credential, which is the one exception ADR-0164 and ADR-0233 allow for an engine-only job type.

View Source
const ShopJobTypeIndex int32 = 30

ShopJobTypeIndex is the interned index ShopJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-first, so it is always 30.

View Source
const ShopModeCommand = "command"

ShopModeCommand issues an action on a position the instance does not carry — an HR leaver process returning a right, a maintenance process resetting a password. It acts in the name of the process's application, which the product must list, and only for an action an operator or a system may ask for (ADR-0429 §10, decision 1).

View Source
const ShopModeOutcome = "outcome"

ShopModeOutcome states how the command this instance carries ended.

View Source
const SoapJobType = "io.atlas.soap"

SoapJobType is the reserved job type a SOAP / Web Services (WSDL) task carries. Like the REST/SCIM workers it authors its endpoint in the model — the web-service URL, the operation, and the request body — and names a server-side secret for any authentication credential (ADR-0041); the in-process SOAP worker worker subscribes to it to wrap the body in a SOAP envelope, invoke the operation, and parse the response off the hot path (ADR-0165).

View Source
const SoapJobTypeIndex int32 = 18

SoapJobTypeIndex is the interned index SoapJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it nineteenth (after the eighteen job types above), so it is always 18. This lets a single in-process SOAP worker subscribe by one global index across every deployed process, the same way the LDAP worker uses LdapJobTypeIndex (ADR-0165).

View Source
const TeamsPhoneJobType = "io.atlas.teamsphone"

TeamsPhoneJobType is the reserved job type a Microsoft Teams Phone task carries (ADR-0463). One job type serves every voice-app operation — resolving users, ensuring a resource account, a call queue or an auto attendant, and removing them — because they share a tenant, a credential and an error envelope; the operation is a modeled value rather than a reserved index of its own, as it is for Entra (ADR-0172).

Like Entra's it has no in-process handler: the kind is worker-only, so the app's certificate never enters the engine, and the work is PowerShell that only a worker host with the MicrosoftTeams module can run.

View Source
const TeamsPhoneJobTypeIndex int32 = 34

TeamsPhoneJobTypeIndex is the interned index TeamsPhoneJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-fifth, so it is always 34.

View Source
const TemisDecisionJobType = "io.atlas.temis.decision"

TemisDecisionJobType is the reserved job type a *central* business rule task carries — one whose decision is evaluated by a remote temis service rather than the embedded temis library. The in-process temis decision worker subscribes to it to evaluate the decision off the hot path and write the result back (ADR-0050), the same way the local DMN worker subscribes to DMNJobType.

View Source
const TemisDecisionJobTypeIndex int32 = 3

TemisDecisionJobTypeIndex is the interned index TemisDecisionJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it fourth (after DMN, user tasks, and PowerShell), so it is always 3. This lets a single in-process temis worker subscribe by one global index across every deployed process, the same way the DMN worker uses DMNJobTypeIndex (ADR-0050).

View Source
const UserConnectorJobType = "io.atlas.user.provision"

UserConnectorJobType is the reserved job type a user-provisioning task carries (ADR-0123). The in-process user-provisioning worker subscribes to it to create, set the password of, or disable an Atlas login through the internal user store off the hot path, the same way the mail worker subscribes to MailJobType. It is gated to the protected system project and opt-in server-side; nothing about the credential is model-authored (there is none — it mutates the local store).

View Source
const UserConnectorJobTypeIndex int32 = 15

UserConnectorJobTypeIndex is the interned index UserConnectorJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it sixteenth (after the fifteen job types above), so it is always 15. This lets a single in-process user-provisioning worker subscribe by one global index across every deployed process, the same way the mail worker uses MailJobTypeIndex (ADR-0123).

View Source
const UserTaskJobType = "io.atlas.user-task"

UserTaskJobType is the reserved job type user tasks carry. The in-process Tasks app (or an external task client) subscribes to it to list and complete human tasks, the same way the DMN worker subscribes to DMNJobType (ADR-0028).

View Source
const UserTaskJobTypeIndex int32 = 1

UserTaskJobTypeIndex is the interned index UserTaskJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it second (after DMN), so it is always 1. This lets the task-list endpoint scan activatable jobs by a single global index, the same way the DMN worker uses DMNJobTypeIndex.

View Source
const WebScrapeJobType = "io.atlas.webscrape"

WebScrapeJobType is the reserved job type a web-scraping task carries. The in-process web-scraping worker subscribes to it to fetch a model-authored URL and extract the elements matching a CSS selector off the hot path (ADR-0118), the same way the REST worker subscribes to RestJobType. The URL and selector live in the model (like REST's endpoint); nothing about the target is registry-held.

View Source
const WebScrapeJobTypeIndex int32 = 14

WebScrapeJobTypeIndex is the interned index WebScrapeJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it fifteenth (after the fourteen job types above), so it is always 14. This lets a single in-process web-scraping worker subscribe by one global index across every deployed process, the same way the mail worker uses MailJobTypeIndex (ADR-0118).

View Source
const WikiwikibangbangJobType = "io.atlas.wikiwikibangbang"

WikiwikibangbangJobType is the reserved job type a wikiwikibangbang task carries (ADR-0498). One job type serves every operation on the wiki — create, read, update and move an item, comment on it, query items, read a page as Markdown and append to one — because they share a wiki, an account and its error envelope; the operation is a modeled value, as it is for Jira (ADR-0201).

Like CardDAV's, nothing in the engine subscribes to it: the kind is worker-only, so the token that writes as the wiki account never enters the engine.

View Source
const WikiwikibangbangJobTypeIndex int32 = 38

WikiwikibangbangJobTypeIndex is the interned index WikiwikibangbangJobType is guaranteed to occupy in every compiled process: NewBuilder reserves it thirty-ninth, so it is always 38.

Variables

This section is empty.

Functions

func FirstDynamicJobTypeIndex added in v0.3.0

func FirstDynamicJobTypeIndex() int32

FirstDynamicJobTypeIndex is the lowest index available to a model-authored job type (a <zeebe:taskDefinition type>). The engine-wide registry assigns from here up; see [dynamicJobTypeFloor] for why it is not simply one past the reserved range.

func HasErrors

func HasErrors(ps []Problem) bool

HasErrors reports whether any Problem is error severity — the condition under which a deploy is refused. Warnings alone leave a model deployable.

func InfoFields added in v0.13.0

func InfoFields(namespace string) []string

InfoFields lists the facts a namespace carries besides its constants, in a stable order.

func MailOperations added in v0.9.0

func MailOperations() []string

MailOperations lists the operations a mail task may name, sorted.

func ParseConstantValue added in v0.12.0

func ParseConstantValue(typ, raw string) (expr.ValueKind, bool, string, error)

ParseConstantValue turns a value declared with one of the four constant types into the canonical (kind, bool, text) form a variable is stored in, or says why it is not a value of that type. The API parses an application's values with it when they are saved (ADR-0453), so they are held in exactly the form a model constant is and the engine never parses either.

func ReloadNamed added in v0.4.0

func ReloadNamed(key uint64, version int32, r io.Reader, processId string) (*CompiledProcess, []Problem, error)

ReloadNamed is ParseNamed for a definition that is already deployed: it compiles the named process *without* the deploy-time validation gate, and returns what that gate would have said about it today alongside the process (ADR-0177).

Validation is a gate on deploying a model, not a condition for running one (I5, see validation.go): the compiled process is identical either way. A definition in a deployment store passed the gate of the day it was deployed and has been running under it since, so re-applying today's rules to it on every restart means a rule added to help authors can take a server down instead — on a model nobody touched, with every other definition and every running instance unreachable behind it. The rule still does its job at deploy, where the author is watching and can fix the model.

The returned Problems are what the gate raised — the full list, warnings included, exactly as ValidationError carries it — and are empty when today's rules do not refuse the model at all, so a caller can report drift on len() > 0. A model that cannot be compiled at all still returns an error: there is no definition to bring back.

func ReservedJobTypeCount added in v0.3.0

func ReservedJobTypeCount() int32

ReservedJobTypeCount is how many built-in job types exist in this build, and so the exclusive upper bound of the reserved index range. It grows whenever a worker is added, which is exactly why it is not the same number as FirstDynamicJobTypeIndex.

func ReservedJobTypes added in v0.3.0

func ReservedJobTypes() []string

ReservedJobTypes returns the reserved job-type names in index order, so index i of the result is the job type whose reserved index is i. It returns a copy: the slice is the definition of those indices, and a caller reordering it would re-point every job already written under them.

func SummarizeProblems added in v0.4.0

func SummarizeProblems(ps []Problem) string

SummarizeProblems renders the error-severity Problems into one line — the same reading ValidationError.Error gives a refused deploy, available to a caller that holds the findings rather than the error (the reload path logs them). Warnings are left out: they name a smell, not a reason anything was refused.

func ValidConstantName added in v0.13.0

func ValidConstantName(name string) error

ValidConstantName says why name cannot name a constant, or nil. A constant's name is written in capitals — letters A–Z, digits and underscores, starting with a letter, such as TENANT_ID (ADR-0454, amended) — so a reader tells a constant from a variable at a glance in every expression and script, and the API applies the same rule to an application's constants so the two names a binding joins can never differ in case.

Types

type AdConfig added in v0.3.0

type AdConfig struct {
	// Worker is the Console-configured directory this task talks to, or "" for a
	// task that carries its own URL and bind DN the old way.
	Connector   string
	URL         RestExpr
	BindDN      RestExpr
	BindSecret  string
	StartTLS    bool
	Op          string
	DN          RestExpr
	MemberDN    RestExpr
	EntryVar    string
	NewPassword RestExpr
	Retries     int32
	NewDN       RestExpr
	// The fields of the two operations that read a subtree rather than acting on one
	// entry: sync (a DirSync delta) and search (what is there now). Scope belongs to
	// search alone — AD answers DirSync only for the whole subtree — and CookieVar and
	// ObjectSecurity to sync alone.
	BaseDN         RestExpr
	Filter         RestExpr
	Scope          string
	CookieVar      string
	ResultVar      string
	MaxEntries     int32
	ObjectSecurity bool
}

AdConfig is the deploy-time configuration of an Active Directory task (ADR-0166). URL is the server (ldaps://host:636 — a password set needs LDAPS) and BindDN the bind identity — literal-or-FEEL values; BindSecret names the server-side secret for the bind password (empty → an anonymous bind); StartTLS upgrades a plain ldap:// connection. Op is the operation ("create-user"|"set-password"|"enable"| "disable"|"add-group-member"|"remove-group-member"). DN is the target user or group entry; MemberDN is the member added/removed for the group operations; EntryVar names the process variable holding the create-user attribute object; NewPassword is the set-password value.

type AdHocDetail added in v0.2.0

type AdHocDetail struct {
	CompletionCondition *expr.Compiled
	CancelRemaining     bool

	AgentDriven bool
	AgentWorker int32 // interned agent Worker name → index, -1 when not agent-driven
	AgentModel  int32 // interned language model name → index, -1 → the Worker's own model
	// AgentContext are the interned names of the process variables this agent is given,
	// in the order they were authored (ADR-0257). Empty means
	// the agent knows its goal, its tools and what its own calls returned, and nothing
	// of the case it is working on — which is a real design, not an oversight, when its
	// tools fetch what it needs.
	//
	// Names rather than values: what an agent may reach is the diagram (ADR-0253), and
	// what it may read is in the diagram for the same reason. A reviewer reads the
	// element and sees what leaves the process.
	AgentContext     []int32
	ResultCollection int32 // interned variable name a tool result is appended to, -1 if none
	ResultElement    *expr.Compiled
	Tools            []AgentTool
}

AdHocDetail is the per-ad-hoc-subprocess configuration the runtime needs (ADR-0138). CompletionCondition is an optional boolean FEEL expression re-evaluated after each contained activity completes; nil means the ad-hoc completes when its scope drains instead. When it holds, CancelRemaining (the BPMN cancelRemainingInstances default, true) decides whether the still-running contained activities are cancelled. Ordering is always the BPMN default, parallel — every entry activity is activated at once; a model asking for sequential ordering is refused at deploy until that driver lands, so no flag is carried for it.

An **agent-driven** ad-hoc (ADR-0253) inverts the entry rule: entering it activates nothing and creates one job on the container, and the model behind that job picks which contained activity to run. AgentDriven marks it; AgentWorker names the configured agent Worker the job resolves against (ADR-0203); ResultCollection / ResultElement are where a tool call's result is appended, the multi-instance pair exactly (ADR-0077); Tools is the deploy-time index of what the model may choose from. AgentModel names the language model the round asks and is -1 when the container names none, in which case the Worker's configured model is what runs (ADR-0256). The run's limits ride the agent Worker's own configuration (ADR-0117) and are not carried here.

Tools is a slice rather than a span of a shared array like the entry index: it is read once per round, when the container's job is built, and never per token — off the hot path (I1).

type AgentParam added in v0.5.0

type AgentParam struct {
	Name        int32
	Type        int32
	Description int32
	Required    bool
}

AgentParam is one <atlas:agentParam> declared on a tool activity: a value the model must supply when it calls that tool. It is <atlas:startVariable>'s shape (ADR-0028) one level down — a typed, named, optionally described input — declared at deploy so a tool's schema is compiled rather than recovered from expressions at run time (I5). All string fields are interned indices; Description is -1 when none was given.

type AgentTaskConfig added in v0.5.0

type AgentTaskConfig struct {
	Worker    string
	Model     string
	Prompt    RestExpr
	ResultVar string
	Retries   int32
}

AgentTaskConfig is the deploy-time configuration of an AI task (ADR-0256): one call to a language model, one answer into one variable. Worker names the agent Worker an operator configured — the endpoint, the credential and the wire format are its business and never enter the model (ADR-0041/0069/0168). Model names the language model to ask and may be empty, in which case the Worker's configured model is what runs. Prompt is the question, a literal-or-FEEL value evaluated over the variables the task sees at call time, and ResultVar is where the answer lands.

type AgentTool added in v0.5.0

type AgentTool struct {
	Element int32 // the contained node's element id
	Params  []AgentParam
}

AgentTool is one contained entry activity offered to the model as a tool (ADR-0253). It carries no name or description of its own on purpose: the tool's name is the element's BPMN id (CompiledProcess.ElementBpmnId) and its description is the element's own <bpmn:documentation> (ElementDocumentation, ADR-0025) — the sentence a modeler wrote for the next human is the one the model reads, and a second copy could only drift from it.

type Assignment added in v0.7.0

type Assignment struct {
	Literal string
	Expr    *expr.Compiled
}

Assignment is what a model wrote for a user task's assignee or its candidate groups: a literal name, or a FEEL expression to evaluate when the task activates. It is a type rather than two strings so the compiler cannot build a user task while forgetting that one of them was an expression — which is precisely the defect this shape was introduced to make impossible.

func Assign added in v0.7.0

func Assign(taskID, what, raw string) (Assignment, error)

Assign reads one assignment attribute the way the model vocabulary means it: a value beginning with "=" is a FEEL expression, anything else a literal name. That is the same rule zeebe:input sources and a REST worker's fields already follow, so a modeller writes one thing everywhere.

what names the attribute for the error message; taskID names the task. An empty value is an absent assignment, not an empty expression.

It compiles strictly, as a deploy does. The compile path calls [assign] with the gate its own parse carries, so a reload keeps a stored expression the build that stored it kept (see feelcalls.go).

type BoundaryEventDetail

type BoundaryEventDetail struct {
	HostNode       int32 // ElementId of the activity this event is attached to
	Interrupting   bool  // true = cancel the host on fire (BPMN cancelActivity); false = run alongside
	Kind           BoundaryEventKind
	Schedule       TimerSchedule  // BoundaryTimer: when it fires; a cycle (non-interrupting only) recurs (ADR-0054)
	MessageName    string         // BoundaryMessage: the message it subscribes to
	CorrelationKey *expr.Compiled // BoundaryMessage: correlation-key expression (ADR-0020)
	SignalName     string         // BoundarySignal: the signal it subscribes to (ADR-0088)
	ErrorCode      string         // BoundaryError: the error code it catches; "" is a catch-all (ADR-0089)
	EscalationCode string         // BoundaryEscalation: the escalation code it catches; "" is a catch-all (ADR-0125)
	Condition      *expr.Compiled // BoundaryConditional: the boolean FEEL condition it fires on (ADR-0137)
	// CompensationHandler is the ElementId of the compensation handler activity this
	// boundary links its host to (BoundaryCompensation, ADR-0103). It is resolved at
	// compile time from the BPMN <association> joining the boundary to the handler;
	// -1 means unresolved (a compensation boundary with no association — a deploy error).
	CompensationHandler int32
}

BoundaryEventDetail is the per-boundary-event data a behavior needs at runtime. A boundary event is attached to a host activity (HostNode) and arms while the host runs; when it fires it either interrupts the host (Interrupting) or spawns a parallel token. The timer fields apply when Kind is BoundaryTimer, the message fields when Kind is BoundaryMessage (ADR-0040).

type BoundaryEventKind

type BoundaryEventKind uint8

BoundaryEventKind discriminates what a boundary event waits on.

const (
	BoundaryTimer        BoundaryEventKind = iota // waits a fixed duration, then fires
	BoundaryMessage                               // waits for a correlating message, then fires
	BoundarySignal                                // waits for a broadcast signal by name, then fires (ADR-0088)
	BoundaryError                                 // catches an error propagating up to it by code, then fires; always interrupting (ADR-0089)
	BoundaryCompensation                          // links a host activity to its compensation handler; inert — never armed as an element instance, only read on host completion to record the activity as compensable (ADR-0103)
	BoundaryCancel                                // on a transaction only: catches the transaction's cancellation and routes its recovery flow; armed inert like an error boundary, and always interrupting (ADR-0108)
	BoundaryEscalation                            // catches an escalation propagating up to it by code, then fires; honors cancelActivity — may be interrupting or non-interrupting (ADR-0125)
	BoundaryConditional                           // fires while the host runs when its boolean FEEL condition becomes true; armed inert (no subscription), re-evaluated on variable change; honors cancelActivity — may be interrupting or non-interrupting (ADR-0137)
)

type BpmnType

type BpmnType uint8

BpmnType is the kind of a BPMN element. It is stored in element-instance state (as uint8) for O(1) behavior dispatch.

const (
	TypeUnspecified BpmnType = iota
	TypeStartEvent
	TypeEndEvent
	TypeServiceTask
	TypeScriptTask
	TypeBusinessRuleTask
	TypeExclusiveGateway
	TypeTimerCatchEvent
	TypeMessageCatchEvent
	TypeMessageThrowEvent
	TypeTask              // an undefined/manual task: no execution semantics, passes straight through
	TypeParallelGateway   // AND gateway: forks a token onto every outgoing flow, joins by waiting for all incoming
	TypeInclusiveGateway  // OR gateway: forks onto every flow whose condition holds, joins by waiting for all that could still arrive
	TypeMessageStartEvent // a start event that a correlating message instantiates (ADR-0035); at runtime it behaves like a none start (flows straight on)
	TypeConnectorTask     // a service task that delegates to a server-registered worker via the job path (ADR-0036); like a service task it creates a job and waits
	TypeUserTask          // a human task: parks a token, creates a job, waits for a person to complete it via the Tasks app (ADR-0028)
	TypeBoundaryEvent     // a timer/message event attached to a host activity; arms while the host runs and, when it fires, interrupts the host or spawns a parallel token (ADR-0040)
	TypeScriptJobTask     // a script task authored in a general-purpose language (PowerShell, …) that runs via the job path, not inline like a FEEL script task (ADR-0047); like a service task it creates a job and waits
	TypeTimerStartEvent   // a start event that a due timer instantiates on a schedule (duration/date/cycle/cron, ADR-0051); at runtime it behaves like a none start (flows straight on)
	TypeMessageEndEvent   // an end event that publishes a message, then ends the instance (ADR-0052); the send-and-stop counterpart of a message throw event, so it reuses the throw detail table
	TypeSubProcess        // an embedded subprocess: a container that is itself a scope; a token entering it runs its inner start→…→end in a child scope, and it completes when that scope empties (ADR-0074)
	TypeCallActivity      // a call activity: starts a separate process as a child instance, waits for it, then continues; variables pass in/out by mapping (ADR-0076)
	// TypeEventSubProcessStart is a runtime-only element type: the armed trigger of an
	// event subprocess (ADR-0082). No compiled node carries it (the handler compiles as
	// TypeSubProcess); the engine arms one waiting instance per event subprocess in a
	// scope, and its firing activates the handler. It is excluded from the scope's
	// active-child counter so it never blocks scope completion.
	TypeEventSubProcessStart

	TypeSignalCatchEvent // an intermediate catch event that waits for a broadcast signal by name (ADR-0088)
	TypeSignalThrowEvent // an intermediate throw event that broadcasts a signal by name to every waiting catch (ADR-0088)
	TypeSignalEndEvent   // an end event that broadcasts a signal, then ends the instance (ADR-0088); reuses the throw detail table
	TypeSignalStartEvent // a start event that a broadcast signal instantiates (ADR-0088); at runtime it flows straight on like a message start

	TypeErrorEndEvent // an end event that throws an error, ending its scope abnormally and propagating up to the nearest matching handler (ADR-0089); the send-and-stop counterpart of a BPMN error throw

	TypeReceiveTask // an activity that waits for a correlating message, then continues (ADR-0102); the message intermediate catch's semantics in task form, so it accepts boundary events, I/O mappings, and multi-instance

	TypeCompensationThrowEvent // an intermediate throw event that triggers compensation — runs the handlers of completed compensable activities in its scope, or of one named activity (ADR-0103)
	TypeCompensationEndEvent   // an end event that triggers compensation, then ends its scope (ADR-0103); the trigger-and-stop counterpart of a compensation throw, reusing the throw detail table

	TypeCancelEndEvent // an end event inside a transaction that cancels it: compensates the transaction's completed activities in reverse order, then routes out the transaction's cancel boundary (ADR-0108)

	TypeEventBasedGateway // a deferred choice: arms every target catch event (message/timer/signal) at once and takes the branch whose event fires first, cancelling the rest (ADR-0110)

	TypeSendTask // a send task: a job-creating activity identical in execution to a service task (ADR-0112) — it creates a job and waits, reusing ServiceTaskDetail and serviceTaskBehavior; a distinct type only to preserve the send-task identity, like TypeConnectorTask

	TypeTerminateEndEvent // an end event that ends its enclosing flow scope at once (ADR-0116): it terminates every other live token in the scope (cancelling their jobs), then completes the scope — at the root the instance ends, inside a subprocess that subprocess ends and the parent continues. cancelEndEventBehavior minus compensation and the cancel boundary

	TypeMockupTask // a service task simulated by the engine itself (ADR-0120): on activation it writes an optional FEEL result and arms a one-shot timer for a random duration, then completes (or, per a fail probability, raises an incident) — no external worker. A distinct type because its execution (timer-wait, no job) differs from a service task, like TypeConnectorTask.

	TypeEscalationThrowEvent // an intermediate throw event that raises an escalation, propagating up to the nearest matching handler, then continues on its outgoing flow (ADR-0125); the continue-after-throw counterpart of TypeMessageThrowEvent
	TypeEscalationEndEvent   // an end event that raises an escalation, propagating up to the nearest matching handler, then ends its path (ADR-0125); unlike an error end the catch may be non-interrupting and an uncaught escalation is benign (no incident)

	TypeLinkThrowEvent // a link intermediate throw event: a goto to the link catch of the same name in the same scope (ADR-0133). Resolved at compile to a synthetic sequence flow to the catch; runs as a pass-through (no execution semantics of its own)
	TypeLinkCatchEvent // a link intermediate catch event: the landing point of a link throw of the same name (ADR-0133). Reached only via the compile-time synthetic flow; runs as a pass-through, flowing on its real outgoing flow

	TypeConditionalCatchEvent // a conditional intermediate catch event: waits until its boolean FEEL condition over the process's variables becomes true, then flows on (ADR-0137). Arms inert (no subscription) and is driven to Completing by a variable-change re-check; a conditional boundary/event-sub reuses TypeBoundaryEvent/TypeEventSubProcessStart with BoundaryConditional

	TypeAdHocSubProcess // an ad-hoc subprocess: a container scope whose contained activities run on demand, in any order, zero or more times — not driven by sequence flow from a start event (ADR-0138). On entry it activates every entry activity (a contained node with no incoming flow) at once; after each contained activity completes an optional boolean FEEL completion condition is re-evaluated, and the first time it holds the remaining work is cancelled and the ad-hoc completes (else it completes on scope-drain)

	TypeNoneThrowEvent // an intermediate throw event with no event definition: it throws nothing and waits for nothing, and runs as a pass-through. Its whole purpose is the fact it leaves behind — one named point in the instance's history, on the path, where no task sits (ADR-0307; the method's milestone marker, ADR-0305)

)

func (BpmnType) String

func (t BpmnType) String() string

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder constructs a CompiledProcess programmatically. It stands in for the XML parse/resolve/linearize pipeline until that front end exists: callers add nodes and flows, and Build linearizes them into the immutable form (assigning the shared topology array, detail tables, and start-event list).

func NewBuilder

func NewBuilder(key uint64, bpmnProcessId string, version int32) *Builder

NewBuilder starts a builder for the process definition identified by key. It reserves the DMN job type as the first interned string so it always occupies DMNJobTypeIndex (0), giving the in-process DMN worker a stable, collision-free job type across every deployed process (see DMNJobTypeIndex).

func (*Builder) AddAdConnectorTask added in v0.3.0

func (b *Builder) AddAdConnectorTask(cfg AdConfig) int32

AddAdConnectorTask adds an Active Directory task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved AdJobType so the in-process AD worker picks it up, evaluates any FEEL url/dn values over the instance's variables, binds, performs the AD operation (create-user / set-password via unicodePwd / enable / disable via userAccountControl / group-member add or remove), and completes the job (ADR-0166). The server and DNs live in the model; the bind password never does (BindSecret references a server-side secret, ADR-0041).

func (*Builder) AddAdHocSubProcess added in v0.2.0

func (b *Builder) AddAdHocSubProcess(d AdHocDetail) int32

AddAdHocSubProcess adds an ad-hoc subprocess container node and returns its element id (ADR-0138). Like an embedded subprocess it is a scope whose inner flow lives in the flat node/flow arrays — create it first, then PushScope(its id) before adding its children — but its contained activities are not sequenced from a start event: on entry the runtime activates every entry activity (a contained node with no incoming flow) at once. d carries the optional FEEL completion condition, the cancel-remaining flag, and the ordering.

func (*Builder) AddAgentConnectorTask added in v0.5.0

func (b *Builder) AddAgentConnectorTask(cfg AgentTaskConfig) int32

AddAgentConnectorTask adds an AI task and returns its element id. Like every other connector task it creates a job on activation and waits; the job carries the reserved AiTaskJobType, which nothing in the engine subscribes to — the kind is worker-only (ADR-0164), so the job waits for the Worker Instance holding the provider's credential, which asks the model once and completes the job with the answer as a variable.

It is deliberately not AgentJobType. That job type is a *round* on an ad-hoc container, whose completion carries tool calls the engine turns into activations (ADR-0253/0254); this one's completion is variables, so the ordinary job handler serves it. Telling the two apart by an index rather than by looking inside a payload is the point.

A task naming no model interns to -1, which the builder's own interner already does for the empty string — and -1 is the answer "ask whatever the Worker is configured for", not "ask the model called empty string". They are different questions and only one of them is one anyone asked.

func (*Builder) AddBoundaryCancelEvent

func (b *Builder) AddBoundaryCancelEvent(host int32) int32

AddBoundaryCancelEvent adds a cancel boundary event attached to host (a transaction): it catches the transaction's cancellation and routes its recovery flow. Armed inert like an error boundary and always interrupting (ADR-0108). Returns its element id.

func (*Builder) AddBoundaryCompensationEvent

func (b *Builder) AddBoundaryCompensationEvent(host int32) int32

AddBoundaryCompensationEvent adds a compensation boundary event attached to host: an inert marker (never armed as an element instance) that makes the host compensable and links it to a compensation handler, resolved later from a BPMN <association> via SetCompensationHandler (ADR-0103). CompensationHandler starts unresolved (-1). Returns its element id.

func (*Builder) AddBoundaryConditionalEvent added in v0.2.0

func (b *Builder) AddBoundaryConditionalEvent(host int32, condition *expr.Compiled, interrupting bool) int32

AddBoundaryConditionalEvent adds a conditional boundary event attached to host that fires while the host runs when the given boolean FEEL condition becomes true (ADR-0137). It honors interrupting: an interrupting conditional boundary tears the host down on fire, a non-interrupting one runs the handler alongside the still-running host. It opens no subscription and is re-evaluated on variable change. Returns its element id.

func (*Builder) AddBoundaryErrorEvent

func (b *Builder) AddBoundaryErrorEvent(host int32, errorCode string) int32

AddBoundaryErrorEvent adds an error boundary event attached to host that catches an error propagating up to the host whose code matches errorCode ("" is a catch-all). An error boundary is always interrupting (ADR-0089): it opens no subscription and waits only to be found by propagation. Returns its element id.

func (*Builder) AddBoundaryEscalationEvent added in v0.2.0

func (b *Builder) AddBoundaryEscalationEvent(host int32, escalationCode string, interrupting bool) int32

AddBoundaryEscalationEvent adds an escalation boundary event attached to host that catches an escalation propagating up to the host whose code matches escalationCode ("" is a catch-all). Unlike an error boundary it honors interrupting: an interrupting escalation boundary tears the host down on fire, a non-interrupting one runs the handler alongside the still-running host (ADR-0125). It opens no subscription and waits only to be found by propagation. Returns its element id.

func (*Builder) AddBoundaryMessageEvent

func (b *Builder) AddBoundaryMessageEvent(host int32, interrupting bool, messageName string, correlationKey *expr.Compiled) int32

AddBoundaryMessageEvent adds a message boundary event attached to host that fires when a message named messageName correlates on key. interrupting mirrors BPMN cancelActivity (ADR-0040). Returns its element id.

func (*Builder) AddBoundarySignalEvent

func (b *Builder) AddBoundarySignalEvent(host int32, interrupting bool, signalName string) int32

AddBoundarySignalEvent adds a signal boundary event attached to host that fires when a signal named signalName is broadcast (ADR-0088). interrupting mirrors BPMN cancelActivity. Returns its element id.

func (*Builder) AddBoundaryTimerEvent

func (b *Builder) AddBoundaryTimerEvent(host int32, interrupting bool, durationNanos int64) int32

AddBoundaryTimerEvent adds a timer boundary event attached to host, firing after durationNanos. interrupting mirrors BPMN cancelActivity: true cancels the host when it fires, false spawns a parallel token (ADR-0040). Returns its element id. It is the duration convenience over AddBoundaryTimerSchedule.

func (*Builder) AddBoundaryTimerSchedule

func (b *Builder) AddBoundaryTimerSchedule(host int32, interrupting bool, schedule TimerSchedule) int32

AddBoundaryTimerSchedule adds a timer boundary event firing on the given compiled schedule. A cycle schedule on a non-interrupting boundary recurs — a repeating reminder (ADR-0054). Returns its element id.

func (*Builder) AddBusinessRuleTask

func (b *Builder) AddBusinessRuleTask(decisionId string, inputs map[string]any, retries int32) (int32, error)

AddBusinessRuleTask adds a business rule task that evaluates the named DMN decision with the given static input context, and returns its element id. It is the constant-input form of Builder.AddBusinessRuleTaskMapped (no variable mappings, result discarded).

func (*Builder) AddBusinessRuleTaskMapped

func (b *Builder) AddBusinessRuleTaskMapped(decisionId, resultVar string, staticInputs map[string]any, mappings []DecisionInputMapping, retries int32, binding DecisionBinding) (int32, error)

AddBusinessRuleTaskMapped adds a business rule task that evaluates the named DMN decision and returns its element id. Its input context is built from two layers the DMN worker merges at evaluation time: staticInputs is a constant base (JSON-encoded and interned at deploy time, never on the hot path — invariant I5), and mappings are variable-driven inputs (FEEL expressions evaluated over the instance's variables) that override a static input of the same name. If resultVar is non-empty the decision's result is written back into that process variable on job completion; an empty resultVar discards the result. It returns an error if the static inputs cannot be encoded.

func (*Builder) AddCallActivity

func (b *Builder) AddCallActivity(calledProcessId string, binding DecisionBinding, propagateAllParent, propagateAllChild bool) int32

AddCallActivity adds a call activity that starts the process with the given bpmn id as a child instance, under the given binding and variable-propagation flags (ADR-0076), and returns its element id. The called process id is interned; the called def key is resolved at deploy/runtime, not here.

func (*Builder) AddCancelEndEvent

func (b *Builder) AddCancelEndEvent() int32

AddCancelEndEvent adds a cancel end event: an end event inside a transaction that cancels it — compensating the transaction's completed activities in reverse order, then routing out the transaction's cancel boundary (ADR-0108). It carries no detail (a cancel always compensates the whole transaction). Returns its element id.

func (*Builder) AddCardDAVConnectorTask added in v0.20.0

func (b *Builder) AddCardDAVConnectorTask(cfg CardDAVConfig) int32

AddCardDAVConnectorTask adds a CardDAV task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved CardDAVJobType, which nothing in the engine subscribes to — the kind is worker-only, so the job waits for a worker that holds the address book's credential.

func (*Builder) AddClioQueryTask

func (b *Builder) AddClioQueryTask(connector, subject, reduceSpec, query, resultVar string, retries int32) int32

AddClioQueryTask adds a clio "query" task and returns its element id. It reads from the named worker's clio instance and writes the result into resultVar. When query is non-empty the worker runs it as a run_query; otherwise it reads get_state for subject (with the optional reduceSpec projection). Like a service task it creates a job on activation carrying the reserved ClioQueryJobType and waits for the in-process clio worker to complete it (ADR-0036).

func (*Builder) AddClioReadTask

func (b *Builder) AddClioReadTask(connector, subject, resultVar string, limit, retries int32) int32

AddClioReadTask adds a clio "read" task and returns its element id. It reads subject's events (up to limit; 0 = the worker's default) from the named worker's clio instance and writes them into resultVar as a JSON array. Like a service task it creates a job on activation carrying the reserved ClioReadJobType and waits for the in-process clio worker to complete it (ADR-0036).

func (*Builder) AddClioWriteTask

func (b *Builder) AddClioWriteTask(connector, subject, eventType string, retries int32) int32

AddClioWriteTask adds a clio "write-events" task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved ClioWriteJobType so the in-process clio worker picks it up, appends an event to the named worker's clio instance under subject with the given event type, and completes the job (ADR-0036).

func (*Builder) AddCompensationEndEvent

func (b *Builder) AddCompensationEndEvent() int32

AddCompensationEndEvent adds an end event that triggers compensation, then ends its scope — the trigger-and-stop counterpart of a compensation throw, reusing the throw detail table like a signal end event (ADR-0103). Returns its element id.

func (*Builder) AddCompensationThrowEvent

func (b *Builder) AddCompensationThrowEvent() int32

AddCompensationThrowEvent adds an intermediate throw event that, on activation, triggers compensation — running the handlers of completed compensable activities in its scope (or of the single activity later set via SetCompensationActivityRef) — then flows on (ADR-0103). ActivityRef defaults to -1 (compensate the whole scope) and WaitForCompletion to true, BPMN's default. Returns its element id.

func (*Builder) AddConditionalCatchEvent added in v0.2.0

func (b *Builder) AddConditionalCatchEvent(condition *expr.Compiled) int32

AddConditionalCatchEvent adds a conditional intermediate catch event that waits until the given boolean FEEL condition over the process's variables becomes true, then flows on (ADR-0137). It arms inert (opens no subscription) and is driven to Completing by a variable-change re-check. Returns its element id.

func (*Builder) AddCsvConnectorTask added in v0.2.0

func (b *Builder) AddCsvConnectorTask(cfg CsvConfig) int32

AddCsvConnectorTask adds a CSV-to-JSON task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved CsvImportJobType so the in-process CSV worker picks it up, reads the raw text from the named source variable, parses it against the authored delimiter/header/columns with the same parser the ingestion endpoint uses, and writes the JSON rows (and a rowCount) into the result variable (ADR-0139). The layout lives in the model — unlike the ADR-0087 convention, which read it from a columnConfig variable — so nothing but the file arrives at runtime.

func (*Builder) AddDataInputAssociation

func (b *Builder) AddDataInputAssociation(node int32, dataObject, variable string, value *expr.Compiled)

AddDataInputAssociation attaches a data-input association to activity node: when the activity activates, the engine reads the data object named dataObject (bound into the FEEL scope under its name), evaluates value (a FEEL transform over the instance's variables and that object, nil to copy the object's value verbatim), and writes the result into the process variable named variable, which the activity then reads (ADR-0059). Build groups a node's associations into a shared array.

func (*Builder) AddDataObject

func (b *Builder) AddDataObject(name, itemType, initialState string, isCollection bool) int32

AddDataObject declares a data object on the process: a typed, named datum with an optional declared structure (itemType) and initial data state, seeded under each instance's scope at creation (ADR-0053). It is not a flow node, so it returns the index of the entry in the data-object table, not an element id. Empty itemType or initialState intern to -1 (Intern maps that back to "").

func (*Builder) AddDataOutputAssociation

func (b *Builder) AddDataOutputAssociation(node int32, dataObject string, value *expr.Compiled, targetState, targetPath string)

AddDataOutputAssociation attaches a data-output association to activity node: when the activity completes, the engine evaluates value (a FEEL expression over the instance's variables, nil for a state-only transition) and writes it into the data object named dataObject, advancing that object's data state to targetState (empty keeps the object's current state) — ADR-0058. A non-empty targetPath writes only that member of a structured object, keeping the rest (ADR-0060).

This is the one-write case of AddDataOutputAssociationWrites, which every caller that has a single assignment to add says more plainly.

func (*Builder) AddDataOutputAssociationWrites added in v0.7.0

func (b *Builder) AddDataOutputAssociationWrites(node int32, dataObject, targetState string, writes []DataWrite)

AddDataOutputAssociationWrites attaches a data-output association carrying several writes — the association's <assignment> elements in document order, which BPMN allows any number of (ADR-0350). They are applied in order onto one value and appended as one event, so one activity writing five members of one object is one arrow and one fact.

A write with no value is not a write: it is how an association with no <assignment> at all reaches here, and ADR-0058 makes that a state-only transition. Dropping it keeps "has writes" and "writes something" the same question everywhere downstream. Build groups a node's associations into a shared array.

func (*Builder) AddDataStore added in v0.5.0

func (b *Builder) AddDataStore(name, elementId string) int32

AddDataStore records a data store this process names, by the store's own name and the BPMN id of the reference that named it. Like a data object it is not a flow node — no token passes through it — so it returns the index of the entry in the data-store table rather than an element id.

func (*Builder) AddDiscordConnectorTask added in v0.5.0

func (b *Builder) AddDiscordConnectorTask(cfg DiscordConfig) int32

AddDiscordConnectorTask adds a Discord task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved DiscordJobType so the in-process Discord worker picks it up, evaluates the authored literal-or-FEEL values over the variables the task sees, resolves the named worker's client, performs the one operation, writes what Discord returned into ResultVar (empty = discard it), and completes the job. The bot token is resolved server-side from the named worker, never authored in the model — mirroring Jira and Google Sheets (ADR-0201/0235).

func (*Builder) AddEndEvent

func (b *Builder) AddEndEvent() int32

AddEndEvent adds a none end event and returns its element id.

func (*Builder) AddEntraConnectorTask added in v0.3.0

func (b *Builder) AddEntraConnectorTask(cfg EntraConfig) int32

AddEntraConnectorTask adds an Entra ID task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved EntraJobType, which nothing in the engine subscribes to — the kind is worker-only (ADR-0164/0171), so the job waits for a worker that holds the tenant's app credential.

func (*Builder) AddErrorEndEvent

func (b *Builder) AddErrorEndEvent(errorCode string) int32

AddErrorEndEvent adds an end event that throws the given error code — ending its scope abnormally and propagating up to the nearest matching handler rather than completing normally (ADR-0089). A code-less error end throws "". Returns its element id.

func (*Builder) AddEscalationEndEvent added in v0.2.0

func (b *Builder) AddEscalationEndEvent(escalationCode string) int32

AddEscalationEndEvent adds an end event that raises the given escalation code — propagating up to the nearest matching handler — then ends its path (ADR-0125). Unlike an error end, an uncaught escalation is benign (no incident) and a matching catch may be non-interrupting. A code-less escalation raises "". Returns its element id.

func (*Builder) AddEscalationThrowEvent added in v0.2.0

func (b *Builder) AddEscalationThrowEvent(escalationCode string) int32

AddEscalationThrowEvent adds an intermediate throw event that raises the given escalation code — propagating up to the nearest matching handler — then continues on its outgoing flow (ADR-0125). A code-less escalation raises "". Returns its element id.

func (*Builder) AddEventBasedGateway

func (b *Builder) AddEventBasedGateway() int32

AddEventBasedGateway adds an event-based gateway (deferred choice) and returns its element id. It carries no detail: at runtime it arms every target catch event (each outgoing flow must lead to a message/timer/signal intermediate catch) and takes the branch whose event fires first, cancelling the rest (ADR-0110).

func (*Builder) AddExchangeConnectorTask added in v0.15.0

func (b *Builder) AddExchangeConnectorTask(cfg ExchangeConfig) int32

AddExchangeConnectorTask adds an Exchange task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved ExchangeJobType, which nothing in the engine subscribes to — the kind is worker-only, so the job waits for a worker that holds the organization's credential.

func (*Builder) AddExclusiveGateway

func (b *Builder) AddExclusiveGateway() int32

AddExclusiveGateway adds a data-based exclusive gateway (XOR split) and returns its element id. Its outgoing flows carry the conditions; see SetFlowCondition and SetFlowDefault.

func (*Builder) AddGoogleContactsConnectorTask added in v0.20.0

func (b *Builder) AddGoogleContactsConnectorTask(cfg GoogleContactsConfig) int32

AddGoogleContactsConnectorTask adds a Google Contacts task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved GoogleContactsJobType, which nothing in the engine subscribes to — the kind is worker-only, so the job waits for a worker that holds the account's credential.

func (*Builder) AddGoogleSheetsConnectorTask added in v0.5.0

func (b *Builder) AddGoogleSheetsConnectorTask(cfg GoogleSheetsConfig) int32

AddGoogleSheetsConnectorTask adds a Google Sheets task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved GoogleSheetsJobType so the in-process Google Sheets handler picks it up, evaluates the authored literal-or-FEEL values over the variables the task sees, resolves the named Worker's client, performs the one operation, writes what Google returned into ResultVar (empty = discard it), and completes the job. The credential is resolved server-side from the named Worker, never authored in the model — mirroring Jira and SharePoint (ADR-0141/0201).

The method keeps the Add*ConnectorTask name its sixteen siblings on this Builder carry; renaming that family is its own step of the ADR-0203 migration.

func (*Builder) AddInclusiveGateway

func (b *Builder) AddInclusiveGateway() int32

AddInclusiveGateway adds an inclusive (OR) gateway and returns its element id. As a split it takes every outgoing flow whose condition holds (or the default if none do); as a join it waits until every branch that could still deliver a token has, then fires once. Conditions and the default flow are set the same way as for an exclusive gateway.

func (*Builder) AddInputMapping

func (b *Builder) AddInputMapping(node int32, target string, source *expr.Compiled)

AddInputMapping attaches a zeebe:ioMapping input to activity node: when the activity activates, the engine evaluates source (a FEEL expression over the scope chain from the activity's flow scope) and writes the result into the activity-local variable named target, which the activity then sees (ADR-0068). Build groups a node's input mappings into a shared array. The parser owns validation; the builder only interns the target, mirroring the data-association adds.

func (*Builder) AddJiraConnectorTask added in v0.5.0

func (b *Builder) AddJiraConnectorTask(cfg JiraConfig) int32

AddJiraConnectorTask adds a Jira task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved JiraJobType so the in-process Jira worker picks it up, evaluates the authored literal-or-FEEL values over the variables the task sees, resolves the named worker's client, performs the one operation, writes what Jira returned into ResultVar (empty = discard it), and completes the job. The Jira base URL and credential are resolved server-side from the named worker, never authored in the model — mirroring Remedy and SharePoint (ADR-0106/0141).

func (*Builder) AddLane added in v0.2.0

func (b *Builder) AddLane(name string, parent int32) int32

AddLane adds an organizational lane and returns its index (ADR-0121). parent is the index of the enclosing lane in a nested laneSet, or -1 for a top-level lane. A lane is pure metadata — it affects no token flow.

func (*Builder) AddLdapConnectorTask added in v0.3.0

func (b *Builder) AddLdapConnectorTask(cfg LdapConfig) int32

AddLdapConnectorTask adds a generic LDAP task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved LdapJobType so the in-process LDAP worker picks it up, evaluates any FEEL url/dn/filter values over the instance's variables, binds and performs the directory operation, writes a search's entries into ResultVar, and completes the job (ADR-0154). The server and DNs live in the model; the bind password never does (BindSecret references a server-side secret, ADR-0041).

func (*Builder) AddLdifConnectorTask added in v0.3.0

func (b *Builder) AddLdifConnectorTask(cfg LdifConfig) int32

AddLdifConnectorTask adds a directory-file task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved LdifJobType, which an in-process worker and an `atlas worker` both serve — the work is a pure transform, so neither placement can block the other.

func (*Builder) AddLinkCatchEvent added in v0.2.0

func (b *Builder) AddLinkCatchEvent() int32

AddLinkCatchEvent adds a link intermediate catch event — the landing point of a link throw of the same name (ADR-0133). Like the throw it carries no detail and runs as a pass-through, flowing on its real outgoing sequence flow when the synthetic link edge activates it. Returns its element id.

func (*Builder) AddLinkThrowEvent added in v0.2.0

func (b *Builder) AddLinkThrowEvent() int32

AddLinkThrowEvent adds a link intermediate throw event — a goto (ADR-0133). It carries no detail: the link name matters only at compile, where connectScope resolves the pair to a synthetic sequence flow to the matching link catch. At runtime it is a pass-through, taking that synthetic flow. Returns its element id.

func (*Builder) AddMailConnectorTask

func (b *Builder) AddMailConnectorTask(cfg MailConfig) int32

AddMailConnectorTask adds an outbound mail task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved MailJobType so the in-process mail worker picks it up, evaluates any FEEL recipient/subject/body values over the instance's variables, resolves the named worker's provider client, sends the message, and completes the job (ADR-0079). The provider endpoint and credentials are resolved server-side from the named worker, never authored in the model — mirroring clio (ADR-0036).

func (*Builder) AddMessageCatchEvent

func (b *Builder) AddMessageCatchEvent(messageName string, correlationKey *expr.Compiled) int32

AddMessageCatchEvent adds an intermediate message catch event that, on activation, subscribes to the named message with a correlation key produced by the given compiled FEEL expression (evaluated over the instance's variables), then waits until a matching message is correlated. Returns its element id.

func (*Builder) AddMessageEndEvent

func (b *Builder) AddMessageEndEvent(messageName string, correlationKey *expr.Compiled) int32

AddMessageEndEvent adds an end event that, on activation, publishes the named message with a correlation key produced by the given compiled FEEL expression (evaluated over the ending instance's variables), then ends the instance. It reuses the throw detail table, since a message end event throws exactly like an intermediate throw event and only differs in its completion (ADR-0054). Returns its element id.

func (*Builder) AddMessageStartEvent

func (b *Builder) AddMessageStartEvent(messageName string, correlationKey *expr.Compiled, singletonStart bool) int32

AddMessageStartEvent adds a message start event and returns its element id. It is a process entry point like a none start event — at runtime it simply flows straight on — but the engine also registers it at deploy time so a correlating message (a throw event or an API publish of messageName) instantiates a fresh process instance seeded with the message's payload (ADR-0035). correlationKey is compiled for future use; message-start matching is by name today.

func (*Builder) AddMessageThrowEvent

func (b *Builder) AddMessageThrowEvent(messageName string, correlationKey *expr.Compiled) int32

AddMessageThrowEvent adds an intermediate message throw event that, on activation, publishes the named message with a correlation key produced by the given compiled FEEL expression (evaluated over the throwing instance's variables), then completes. Returns its element id.

func (*Builder) AddMockupTask added in v0.2.0

func (b *Builder) AddMockupTask(cfg MockupConfig) int32

AddMockupTask adds a mockup service task the engine simulates itself (ADR-0120) and returns its element id. Unlike a service task it creates no job: at runtime mockupTaskBehavior writes the optional FEEL result, arms a one-shot timer for a random duration, and completes (or raises an incident per the fail probability). The result variable and fail message are stored as raw strings (like ScriptTaskDetail.ResultVar); the FEEL expression is compiled by the caller at deploy time (invariant I5), as AddScriptTask takes a pre-compiled expression.

func (*Builder) AddNoneThrowEvent added in v0.7.0

func (b *Builder) AddNoneThrowEvent() int32

AddNoneThrowEvent adds an intermediate throw event with no event definition — the milestone marker (ADR-0307). It carries no detail and runs as a pass-through, flowing straight on its outgoing sequence flow. What distinguishes it from having drawn nothing at all is not its execution but its record: activating and completing it writes element events under its own id, so the visit counters (ADR-0080), the instance timeline and the Operations overlay all carry a point the business named. Returns its element id.

func (*Builder) AddOutputMapping

func (b *Builder) AddOutputMapping(node int32, target string, source *expr.Compiled)

AddOutputMapping attaches a zeebe:ioMapping output to activity node: when the activity completes, the engine evaluates source (a FEEL expression over the activity-local scope) and promotes the result into the parent (flow) scope under the variable named target (ADR-0068). Build groups a node's output mappings into a shared array.

func (*Builder) AddParallelGateway

func (b *Builder) AddParallelGateway() int32

AddParallelGateway adds a parallel (AND) gateway and returns its element id. It forks a token onto every outgoing flow and joins by waiting until a token has arrived on each of its incoming flows.

func (*Builder) AddReceiveTask

func (b *Builder) AddReceiveTask(messageName string, correlationKey *expr.Compiled) int32

AddReceiveTask adds a receive task that, on activation, subscribes to the named message with a correlation key produced by the given compiled FEEL expression, then waits until a matching message is correlated — the message-catch semantics as an activity (ADR-0102). Returns its element id.

func (*Builder) AddRemedyConnectorTask

func (b *Builder) AddRemedyConnectorTask(cfg RemedyConfig) int32

AddRemedyConnectorTask adds a BMC Remedy task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved RemedyJobType so the in-process Remedy worker picks it up, evaluates any FEEL form/field values over the instance's variables, resolves the named worker's AR System REST client, creates the entry, writes the new entry id into ResultVar (empty = discard it), and completes the job (ADR-0106). The Remedy base URL and credentials are resolved server-side from the named worker, never authored in the model — mirroring clio and mail (ADR-0036/0079).

func (*Builder) AddRestConnectorTask

func (b *Builder) AddRestConnectorTask(cfg RestConfig) int32

AddRestConnectorTask adds an HTTP-REST task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved RestJobType so the in-process REST worker picks it up, evaluates any FEEL url/header/query values over the instance's variables, calls the endpoint with the given method, writes the JSON response into ResultVar (empty = discard the response), and completes the job (ADR-0067). Method is stored as given (the parser uppercases and validates it).

func (*Builder) AddS3ConnectorTask added in v0.9.0

func (b *Builder) AddS3ConnectorTask(cfg S3Config) int32

AddS3ConnectorTask adds an object-store task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved S3JobType so the in-process S3 worker picks it up, evaluates the authored literal-or-FEEL values over the variables the task sees, resolves the named Worker's client, performs the one operation, writes what the store returned into ResultVar (empty = discard it), and completes the job. The access key is resolved server-side from the named Worker, never authored in the model — mirroring Jira, Google Sheets and Discord (ADR-0201/0235/0258).

The method keeps the Add*ConnectorTask name its siblings on this Builder carry; renaming that family is its own step of the ADR-0203 migration.

func (*Builder) AddScimConnectorTask added in v0.3.0

func (b *Builder) AddScimConnectorTask(cfg ScimConfig) int32

AddScimConnectorTask adds a SCIM 2.0 task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved ScimJobType so the in-process SCIM worker picks it up, evaluates any FEEL base-url/resource/id/filter values over the instance's variables, performs the resource operation against the provider, writes the JSON response into ResultVar (empty = discard), and completes the job (ADR-0153). The base URL and resource live in the model; credentials never do (Auth references a server-side secret, ADR-0041).

func (*Builder) AddScriptJobTask

func (b *Builder) AddScriptJobTask(jobType, language, source, resultVar string, retries int32) int32

AddScriptJobTask adds a job-based script task authored in a general-purpose language (ADR-0047) and returns its element id. Like a service task it creates a job on activation and waits; the job carries jobType — a reserved per-language sentinel (e.g. PwshJobType) the in-process script worker for that language picks up, runs source through the interpreter, and completes the job, writing the result into the resultVar process variable. The parser owns language validation and the language→jobType mapping; the builder only interns what it is given, the same way AddServiceTask and the worker adds do.

func (*Builder) AddScriptTask

func (b *Builder) AddScriptTask(e *expr.Compiled, resultVar string) int32

AddScriptTask adds a script task that evaluates the given compiled FEEL expression and writes the result to resultVar. Returns its element id.

func (*Builder) AddSendTask

func (b *Builder) AddSendTask(jobType string, retries int32) int32

AddSendTask adds a send task with the given job type and retries and returns its element id (ADR-0112). A send task is a service task under a different BPMN label: it creates a job and waits, so it reuses the service-task detail table and (at runtime) serviceTaskBehavior. Only its node type (TypeSendTask) differs, to preserve the send-task identity — the TypeConnectorTask "distinct type, shared behavior" pattern.

func (*Builder) AddServiceTask

func (b *Builder) AddServiceTask(jobType string, retries int32) int32

AddServiceTask adds a service task with the given job type and retries and returns its element id.

func (*Builder) AddSharePointConnectorTask

func (b *Builder) AddSharePointConnectorTask(cfg SharePointConfig) int32

AddSharePointConnectorTask adds a SharePoint task and returns its element id. Like a service task it creates a job on activation and waits; the job carries a reserved SharePoint job type so the SharePoint worker picks it up, evaluates the FEEL values over the instance's variables, resolves the named worker's Graph client, performs the one operation, writes what Graph returned into ResultVar, and completes the job (ADR-0141, amended). The Graph base and credentials are resolved server-side from the named worker, never authored in the model — mirroring the mail worker (ADR-0079).

Create-item keeps SharePointJobType and every other operation carries SharePointOpsJobType; see the latter for why the two are not one.

func (*Builder) AddShopCommandTask added in v0.9.0

func (b *Builder) AddShopCommandTask(cfg ShopCommandConfig) int32

AddShopCommandTask adds a shop send task in mode `command`: a connector-task node carrying the reserved shop command job type, served in-process off the run loop.

func (*Builder) AddShopTask added in v0.9.0

func (b *Builder) AddShopTask(cfg ShopConfig) int32

AddShopTask adds a shop send task: a connector-task node carrying the reserved shop job type, served in-process.

func (*Builder) AddSignalCatchEvent

func (b *Builder) AddSignalCatchEvent(signalName string) int32

AddSignalCatchEvent adds an intermediate signal catch event that waits for a broadcast signal of the given name (ADR-0088). Returns its element id.

func (*Builder) AddSignalEndEvent

func (b *Builder) AddSignalEndEvent(signalName string) int32

AddSignalEndEvent adds an end event that broadcasts the named signal, then ends the instance — the send-and-stop counterpart of a signal throw, reusing the throw detail table like a message end event (ADR-0088).

func (*Builder) AddSignalStartEvent

func (b *Builder) AddSignalStartEvent(signalName string) int32

AddSignalStartEvent adds a start event that a broadcast signal instantiates (ADR-0088); at runtime it flows straight on like a message start.

func (*Builder) AddSignalThrowEvent

func (b *Builder) AddSignalThrowEvent(signalName string) int32

AddSignalThrowEvent adds an intermediate signal throw event that, on activation, broadcasts the named signal to every waiting catch, then completes (ADR-0088).

func (*Builder) AddSoapConnectorTask added in v0.3.0

func (b *Builder) AddSoapConnectorTask(cfg SoapConfig) int32

AddSoapConnectorTask adds a SOAP / Web Services task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved SoapJobType so the in-process SOAP worker picks it up, evaluates any FEEL endpoint/action/body values over the instance's variables, wraps the body in a SOAP envelope, invokes the operation, parses the response into ResultVar (empty = discard), and completes the job (ADR-0165). The endpoint and body live in the model; credentials never do (Auth references a server-side secret, ADR-0041).

func (*Builder) AddSqlConnectorTask added in v0.3.0

func (b *Builder) AddSqlConnectorTask(cfg SqlConfig) int32

AddSqlConnectorTask adds a SQL task of cfg's product and returns its element id. Like a service task it creates a job on activation and waits; the job carries the product's reserved job type. Unlike every kind before it, nothing in the engine subscribes to that type — SQL is worker-only (ADR-0164/0170), so the job waits for a worker that holds the DSN. The engine's half is resolving the parameters against the instance's variables (ADR-0168); the statement needs no resolving, being literal.

func (*Builder) AddStartEvent

func (b *Builder) AddStartEvent() int32

AddStartEvent adds a none start event and returns its element id.

func (*Builder) AddSubProcess

func (b *Builder) AddSubProcess() int32

AddSubProcess adds an embedded subprocess container node and returns its element id. It carries no detail; its inner flow lives in the flat node/flow arrays, linked back to it only by the children's FlowScope. Create it first, then PushScope(its id) before adding its children so they land in its scope (ADR-0074).

func (*Builder) AddTask

func (b *Builder) AddTask() int32

AddTask adds an undefined/manual task — one with no execution semantics — and returns its element id. It carries no detail and simply passes the token straight through, so a model can be drafted and its routing tested before its tasks are given real implementations.

func (*Builder) AddTeamsPhoneConnectorTask added in v0.15.0

func (b *Builder) AddTeamsPhoneConnectorTask(cfg TeamsPhoneConfig) int32

AddTeamsPhoneConnectorTask adds a Teams Phone task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved TeamsPhoneJobType, which only a worker serves — the engine resolves the authored values and hands them over, the worker runs the operation and completes the job with its answer in ResultVar.

func (*Builder) AddTemisDecisionTask

func (b *Builder) AddTemisDecisionTask(connector, decisionId, resultVar string, staticInputs map[string]any, mappings []DecisionInputMapping, retries int32) (int32, error)

AddTemisDecisionTask adds a *central* business rule task: one whose decision is evaluated by the named server-registered temis worker rather than the embedded temis library (ADR-0050). It returns its element id. Authoring is otherwise identical to a local business rule task — same decision id, result variable, static inputs, and variable mappings — the only difference is that the task carries the temis job type so the remote worker picks it up.

func (*Builder) AddTerminateEndEvent added in v0.2.0

func (b *Builder) AddTerminateEndEvent() int32

AddTerminateEndEvent adds a terminate end event: reaching it ends the enclosing flow scope at once — every other live token in the scope is terminated, then the scope completes (ADR-0116). It carries no detail (a terminate has no code, message, or handler). Returns its element id.

func (*Builder) AddTimerCatchEvent

func (b *Builder) AddTimerCatchEvent(durationNanos int64) int32

AddTimerCatchEvent adds an intermediate timer catch event that waits the given fixed duration (nanoseconds) before continuing, and returns its element id. It is the duration convenience over AddTimerCatchSchedule.

func (*Builder) AddTimerCatchSchedule

func (b *Builder) AddTimerCatchSchedule(schedule TimerSchedule) int32

AddTimerCatchSchedule adds an intermediate timer catch event that waits until the given schedule's first due date, then continues. A catch fires once, so the schedule is a duration or date, never a cycle (ADR-0054). Returns its element id.

func (*Builder) AddTimerStartEvent

func (b *Builder) AddTimerStartEvent(schedule TimerSchedule) int32

AddTimerStartEvent adds a timer start event and returns its element id. Like a none start it is a process entry point that flows straight on once instantiated; what makes it a start is the deploy-time timer the engine arms from its schedule, which instantiates a fresh process instance each time it fires (ADR-0051).

func (*Builder) AddUserConnectorTask added in v0.2.0

func (b *Builder) AddUserConnectorTask(cfg UserConnectorConfig) int32

AddUserConnectorTask adds a user-provisioning task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved UserConnectorJobType so the in-process user-provisioning worker picks it up, evaluates any FEEL field over the instance's variables, performs the operation against the internal user store, and completes the job (ADR-0123). No provider or credential is involved.

func (*Builder) AddUserTask

func (b *Builder) AddUserTask(name string, assignee, candidateGroups Assignment, formId string, priority int32, dueDateNanos int64, retries int32) int32

AddUserTask adds a user task that parks a token and creates a job for a human to complete via the Tasks app (ADR-0028). assignee and candidateGroups are optional: an empty Assignment is stored as -1 and no expression. Returns its element id.

func (*Builder) AddWebScrapeConnectorTask added in v0.2.0

func (b *Builder) AddWebScrapeConnectorTask(cfg WebScrapeConfig) int32

AddWebScrapeConnectorTask adds a web-scraping task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved WebScrapeJobType so the in-process web-scraping worker picks it up, evaluates any FEEL url/selector values over the instance's variables, fetches the page, extracts the text (or the named attribute) of every element matching the selector, writes the values into Result as a JSON array, and completes the job (ADR-0118). The URL and selector live in the model, mirroring the REST worker (ADR-0067); nothing about the target is registry-held.

func (*Builder) AddWebScrapeExtractionTask added in v0.5.0

func (b *Builder) AddWebScrapeExtractionTask(cfg WebScrapeExtractionConfig) int32

AddWebScrapeExtractionTask adds a web-scraping task with the explicit extraction format and bound defined by ADR-0190. Existing callers may keep using AddWebScrapeConnectorTask, whose zero-value format remains HTML with no bound.

func (*Builder) AddWikiConnectorTask added in v0.21.0

func (b *Builder) AddWikiConnectorTask(cfg WikiConfig) int32

AddWikiConnectorTask adds a wikiwikibangbang task and returns its element id. Like a service task it creates a job on activation and waits; the job carries the reserved WikiwikibangbangJobType, which nothing in the engine subscribes to — the kind is worker-only, so the job waits for a worker that holds the wiki account's token.

func (*Builder) Build

func (b *Builder) Build() (*CompiledProcess, error)

Build linearizes the accumulated nodes and flows into an immutable CompiledProcess. It returns an error if a flow references an unknown node.

func (*Builder) Connect

func (b *Builder) Connect(source, target int32) int32

Connect adds a sequence flow from source to target and returns its flow id, so the caller can attach a condition or mark it the default.

func (*Builder) CurrentScope

func (b *Builder) CurrentScope() int32

CurrentScope reports the scope nodes are added into now (-1 at the process root).

func (*Builder) PopScope

func (b *Builder) PopScope()

PopScope closes the innermost open scope, restoring the enclosing one.

func (*Builder) PushScope

func (b *Builder) PushScope(id int32)

PushScope opens scope id: every node added until the matching PopScope carries id as its FlowScope. Scopes nest, so the outer scope is saved and restored.

func (*Builder) SetAdHocResultCollection added in v0.5.0

func (b *Builder) SetAdHocResultCollection(nodeID int32, collection string, element *expr.Compiled)

SetAdHocResultCollection names where an agent-driven ad-hoc's tool results accumulate (ADR-0253): collection is the variable on the container's scope each finished tool appends to, and element the FEEL expression evaluated over that tool's own scope to produce the entry. It exists because the name is an *interned* index inside the detail, which only a builder can mint — the same reason SetMultiInstance takes its output collection by name. An empty collection clears it.

func (*Builder) SetAgentParams added in v0.5.0

func (b *Builder) SetAgentParams(m map[string][]agentParamSpec)

SetAgentParams records the model-wide element-id → <atlas:agentParam> index, read when Build binds an agent-driven ad-hoc's tool index and ignored otherwise.

func (*Builder) SetCompensationActivityRef

func (b *Builder) SetCompensationActivityRef(throwNodeID, activityRef int32)

SetCompensationActivityRef narrows a compensation throw/end event to compensate a single activity (by element id) rather than the whole scope (ADR-0103). The node must be a compensation throw or end event.

func (*Builder) SetCompensationHandler

func (b *Builder) SetCompensationHandler(boundaryNodeID, handlerNodeID int32)

SetCompensationHandler resolves a compensation boundary event's handler link: it points the boundary node (a BoundaryCompensation) at the handler activity's element id (ADR-0103). The boundary must be a compensation boundary; other kinds are left untouched.

func (*Builder) SetCompensationWaitForCompletion added in v0.21.0

func (b *Builder) SetCompensationWaitForCompletion(throwNodeID int32, wait bool)

SetCompensationWaitForCompletion sets whether a compensation throw/end event waits for the handlers it starts before it goes on (BPMN waitForCompletion, default true). The node must be a compensation throw or end event.

func (*Builder) SetConstants added in v0.12.0

func (b *Builder) SetConstants(cs []Constant)

SetConstants records the process's constants. The engine seeds them into every instance it creates.

func (*Builder) SetDataSubjectVariable added in v0.7.0

func (b *Builder) SetDataSubjectVariable(name string)

SetDataSubjectVariable declares which variable holds the id of the person the personal variables are about (ADR-0314). It is the name the enciphering edge looks the data key up by, and the name the erasure route destroys a key under.

func (*Builder) SetDocumentation added in v0.2.0

func (b *Builder) SetDocumentation(text string)

SetDocumentation records the process's own <bpmn:documentation> — the summary a reader wants before following the diagram. Design-time metadata, like the element-level documentation above.

func (*Builder) SetElementBpmnId

func (b *Builder) SetElementBpmnId(nodeID int32, bpmnID string)

SetElementBpmnId records the source BPMN element id (e.g. "StartEvent_1") for a node so it can be mapped back for diagnostics and the live diagram overlay. It is optional: nodes without one report "" from CompiledProcess.ElementBpmnId.

func (*Builder) SetElementDocumentation added in v0.2.0

func (b *Builder) SetElementDocumentation(nodeID int32, text string)

SetElementDocumentation records a node's <bpmn:documentation> — the prose an author writes about the element in the Modeler (ADR-0025). It is design-time metadata: the processor never reads it, so it changes no execution; it is carried so a surface that shows an element to a person (the Tasks app, for a user task's work instruction) can read it from the compiled process instead of re-parsing the model (invariant I5). Empty text interns to -1, so an undocumented node costs nothing.

func (*Builder) SetEventSubProcess

func (b *Builder) SetEventSubProcess(nodeID int32, d EventSubProcessDetail)

SetEventSubProcess marks an already-added subprocess node event-triggered (ADR-0082), carrying the trigger detail its start event describes. It is applied after the subprocess and its inner start exist (like SetMultiInstance), and its EventSub field then indexes the detail. Build groups event-subprocess handlers by their parent scope so the runtime can arm them when the scope is entered.

func (*Builder) SetExecutable

func (b *Builder) SetExecutable(v bool)

SetExecutable records the process's bpmn:isExecutable flag. A non-executable process is descriptive-only — the API refuses to start it and hides it from the start surfaces (it still deploys and lists so it can be inspected).

func (*Builder) SetFlowBpmnId added in v0.21.0

func (b *Builder) SetFlowBpmnId(flowID int32, bpmnID string)

SetFlowBpmnId records the source BPMN id of a sequence flow (e.g. "Flow_1"), so a count the engine keeps per compiled flow can be drawn on the arrow it belongs to (ADR-0496). Optional, like SetElementBpmnId: a flow without one reports "" from CompiledProcess.FlowBpmnId.

func (*Builder) SetFlowCondition

func (b *Builder) SetFlowCondition(flowID int32, c *expr.Compiled)

SetFlowCondition attaches a compiled FEEL guard to a flow (an exclusive gateway takes the first flow whose condition is true).

func (*Builder) SetFlowDefault

func (b *Builder) SetFlowDefault(flowID int32)

SetFlowDefault marks a flow as its gateway's default (taken when no condition matches).

func (*Builder) SetHistoryTtl added in v0.2.0

func (b *Builder) SetHistoryTtl(nanos int64)

SetHistoryTtl records the process's history TTL in nanoseconds — how long a *finished* instance of this definition is kept before retention hard-deletes it (ADR-0144). Zero (the default) means the definition has no opinion: the server-wide max age applies, if one is configured. The parser passes an already-validated positive duration.

func (*Builder) SetInstanceTtl

func (b *Builder) SetInstanceTtl(nanos int64)

SetInstanceTtl records the process's instance TTL in nanoseconds — the self-cleaning expiry bound (ADR-0085). Zero (the default) means no TTL: instances never expire on their own. The parser passes an already-validated positive duration.

func (*Builder) SetLane added in v0.2.0

func (b *Builder) SetLane(nodeID, laneIdx int32)

SetLane records that a flow node belongs to a lane (ADR-0121). A no-op for an unknown node.

func (*Builder) SetMultiInstance

func (b *Builder) SetMultiInstance(nodeID int32, sequential bool, inputElement, outputCollection string, inputCollection, cardinality, outputElement, completionCondition *expr.Compiled)

SetMultiInstance marks an already-added node a multi-instance activity carrying the given loop characteristics (ADR-0077), interning the per-iteration and result variable names. The node keeps its real activity type; its MultiInstance field is set to index the loop detail. Applied after the node exists (like io-mappings), so any activity — task, subprocess, or call activity — can be a loop. Exactly one of inputCollection or cardinality should be non-nil (the parser enforces it).

func (*Builder) SetPersonalVariables added in v0.7.0

func (b *Builder) SetPersonalVariables(names []string)

SetPersonalVariables declares which variables hold personal data (ADR-0314). The declaration is what makes Builder.Build refuse a process that reads one of them in an expression, so it is set before Build rather than checked after it.

func (*Builder) SetRepairForm added in v0.3.0

func (b *Builder) SetRepairForm(nodeID int32, formID string)

SetRepairForm records the form an operator should be shown when a token parks on this node with an incident (ADR-0169) — the modeler's answer to "if this task goes wrong, these are the values worth looking at". Design-time metadata exactly like the documentation above: the processor never reads it, so it changes no execution, and it is carried in the compiled process so the incident surface can read it without re-parsing the model (invariant I5) and so it moves with an instance that migrates (ADR-0162). An empty id interns to -1, so a node without one costs nothing.

func (*Builder) SetSearchableVariables added in v0.5.0

func (b *Builder) SetSearchableVariables(names []string)

SetSearchableVariables declares the variable names an instance of this process can be found by. The engine maintains the variable value index for exactly these names — see CompiledProcess.IsSearchableVariable — so a process that declares none pays nothing for the feature.

func (*Builder) SetStandardLoop added in v0.2.0

func (b *Builder) SetStandardLoop(nodeID int32, testBefore bool, loopMaximum int32, condition *expr.Compiled)

SetStandardLoop marks an already-added node a BPMN standard loop (ADR-0133): it repeats its activity one iteration at a time while condition holds (nil = repeat until the cap), checked before the first iteration when testBefore is set, and at most loopMaximum times (0 = uncapped). It shares the multi-instance loop table and the node's MultiInstance index because it shares the runtime — a standard loop is a sequential loop whose iteration set is a condition rather than a collection — so a node carries at most one of the two markers (the parser refuses both).

func (*Builder) SetStartFormId

func (b *Builder) SetStartFormId(id string)

SetStartFormId records the process's start-form id — the form the UI shows before creating an instance, whose data becomes the start variables (ADR-0028). It is design-time metadata the engine ignores.

func (*Builder) SetStartVariables added in v0.12.0

func (b *Builder) SetStartVariables(vs []StartVariable)

SetStartVariables records the process's declared start variables (atlas:startForm). Like the start form, it is design-time metadata the engine ignores.

func (*Builder) SetTransaction

func (b *Builder) SetTransaction(nodeID int32)

SetTransaction marks an already-added subprocess node as a <transaction> (ADR-0108), so the runtime and validation know it may host a cancel boundary and hold a cancel end event. A no-op for an out-of-range node.

func (*Builder) SetVersionTag

func (b *Builder) SetVersionTag(s string)

SetVersionTag records the process's atlas:versionTag — an optional revision label (e.g. "1.4.0") shown in Operations beside the deploy version. Design-time metadata.

func (*Builder) SetWizard added in v0.10.0

func (b *Builder) SetWizard(nodeID int32, k WizardKind)

SetWizard marks an already-added subprocess node as a wizard of kind k (ADR-0449). It is applied before the subprocess's scope is pushed, so the mark is there when its children are added.

type BusinessRuleDecisionRef added in v0.7.0

type BusinessRuleDecisionRef struct {
	// DecisionId is the local decision the task calls, already interned to a string.
	DecisionId string
	// ElementIndex is the calling business rule task, by the identity the per-element
	// counters are keyed on. See [CallActivityRef.ElementIndex].
	ElementIndex int32
}

BusinessRuleDecisionRef is one business rule task and the local decision it calls.

It is CompiledProcess.BusinessRuleDecisions without the de-duplication, which is the whole reason it exists as a second method rather than a changed one. That enumeration answers "which decisions must exist for this model to deploy", so one entry per decision is right and the deploy-time gate reads it. This one answers "how often was this decision reached, and from where", and for that two tasks calling one decision are two places: the count on the edge is their sum, and collapsing them first would lose half of it (ADR-0400).

type BusinessRuleTaskDetail

type BusinessRuleTaskDetail struct {
	JobType       int32 // interned reserved job type (DMN local, or temis worker) → index
	DecisionId    int32 // interned DMN decision id → index
	Inputs        int32 // interned JSON object of static inputs → index, -1 if none
	ResultVar     int32 // interned result-variable name → index, -1 if none
	Connector     int32 // interned temis worker name → index, -1 = local (in-engine)
	Retries       int32
	Binding       DecisionBinding        // how the decision model is resolved (ADR-0063)
	Version       int32                  // the decision version a BindingVersion task names; 0 otherwise
	InputMappings []DecisionInputMapping // variable-driven inputs, evaluated off the hot path
}

BusinessRuleTaskDetail is the per-business-rule-task data a behavior needs at runtime. A business rule task delegates to a DMN decision, evaluated off the hot path by the temis engine (ADR-0014). Like a service task it runs as a job, so it carries a JobType (a reserved DMN sentinel) the in-process DMN worker subscribes to; DecisionId names the decision to evaluate.

Its inputs come from two layers the worker merges: Inputs is an interned JSON object of static constant inputs (a literal base), and InputMappings are the variable-driven inputs — FEEL expressions evaluated over the instance's variables, which override a static input of the same name. ResultVar, if set, is the process variable the decision's result is written back into on job completion (the output mapping); -1 if the task discards its result.

Worker selects the evaluation locus (ADR-0050): -1 (the default) means the decision is evaluated locally by the embedded temis library (ADR-0014); a set Worker is the interned name of a server-registered temis worker that evaluates the decision centrally, and the task then carries the temis job type instead of the local DMN job type.

type CallActivityDetail

type CallActivityDetail struct {
	CalledProcessId    int32 // interned bpmn process id of the called process
	Binding            DecisionBinding
	PropagateAllParent bool // pass all caller variables into the child (default true)
	PropagateAllChild  bool // return all child variables to the caller (default true)
}

CallActivityDetail is the per-call-activity data a behavior needs at runtime: the bpmn process id of the process to start as a child instance (interned), the binding that picks its version (latest vs this deployment), and whether variables propagate wholesale in and out (Zeebe's propagateAll flags — when off, only the activity's input/output mappings pass variables, giving an isolated child) (ADR-0076). The called def key is resolved at deploy/runtime, not compiled here.

type CallActivityRef

type CallActivityRef struct {
	ElementId string
	// ElementIndex is the same element as ElementId, by the identity the engine uses:
	// the node's position in the compiled table. It is what joins a reference to a
	// maintained per-element counter, since those are keyed by (definition, element
	// index) and never by the id a modeller typed (ADR-0080, ADR-0400). It is
	// version-local — the interning is per compiled process — so it means nothing
	// outside the definition it came from.
	ElementIndex       int32
	CalledProcessId    string
	Binding            DecisionBinding
	PropagateAllParent bool
	PropagateAllChild  bool
	MultiInstance      bool
	// Loop is true when the call activity carries a standard loop marker instead —
	// it calls the process again and again while a condition holds (ADR-0133), where
	// MultiInstance calls it once per collection element. At most one is ever true.
	Loop bool
}

CallActivityRef is the static, read-only view of one call activity: the BPMN element that hosts it, the process id it calls, the version binding, whether variables propagate wholesale in/out, and whether it is a multi-instance loop (spawning one child per collection element). It carries no resolved def key — which deployed definition the call reaches is a per-server, deploy-time fact the server layer computes on top of this (ADR-0076).

type CardDAVConfig added in v0.20.0

type CardDAVConfig struct {
	Worker     string
	WorkerExpr RestExpr
	Op         string
	ContactID  RestExpr
	Query      RestExpr
	Field      RestExpr
	Group      RestExpr
	Contact    RestExpr
	ContactVar string
	MaxResults int32
	ResultVar  string
	Retries    int32
}

CardDAVConfig is the deploy-time configuration of a CardDAV task (ADR-0490). Worker names the configured address book and WorkerExpr carries it as literal-or-FEEL when a process picks the address book at runtime; Op is a row of connector/carddav/catalog. ContactID, Query, Field and Group are literal-or-FEEL values. Contact is the authored contact object compiled to one FEEL context, ContactVar the variable holding it instead; the compiler has refused a model that sets both. MaxResults bounds a listing, with its default applied, and is zero on every other operation.

type CompensationDetail

type CompensationDetail struct {
	ActivityRef int32
	// WaitForCompletion is BPMN's waitForCompletion: the throw (or end event) goes on only
	// once every handler it started has finished. True unless the model says
	// waitForCompletion="false", which keeps the fire-and-continue behaviour
	// (ADR-0508).
	WaitForCompletion bool
}

CompensationDetail is the per-compensation-throw data the runtime needs (ADR-0103), shared by the compensation throw and end events like the message/signal throw table. ActivityRef is the ElementId of the single activity to compensate, or -1 to compensate every completed compensable activity in the throw's scope (reverse completion order).

type CompiledDataObject

type CompiledDataObject struct {
	Name         int32 // interned data-object name → index
	ItemType     int32 // interned itemDefinition reference → index, -1 if untyped
	InitialState int32 // interned initial data state → index, -1 if none
	IsCollection bool
}

CompiledDataObject is one BPMN data object declared by a process: a typed, named datum with an optional declared structure and initial data state. Unlike a CompiledNode it is not a flow node — no token flows through it (ADR-0053) — so it lives in its own table, not the node array, and the engine seeds one under each instance's scope at creation. All string fields are interned indices (resolve with CompiledProcess.Intern); -1 means unset.

type CompiledDataStore added in v0.5.0

type CompiledDataStore struct {
	Name      int32
	ElementId int32
}

CompiledDataStore is one BPMN data store a process names: a place instances of a class outlive the process that made them. Name is the store's own name — the <dataStore>'s where a <dataStoreReference> resolves to one, the reference's own otherwise — because the reference is one view on a diagram while the store is the thing every process means. ElementId is the reference's BPMN id, so a finding about the store can be marked on the box that named it. Both are interned indices.

type CompiledFlow

type CompiledFlow struct {
	Id        int32
	Source    int32 // ElementId
	Target    int32 // ElementId
	Condition *expr.Compiled
	Default   bool
}

CompiledFlow is a sequence flow between two nodes. Condition is the compiled FEEL guard an exclusive gateway evaluates to decide whether to take this flow (nil = unconditional); Default marks the flow taken when no condition matches.

type CompiledNode

type CompiledNode struct {
	ElementId       int32 // == index in nodes[]
	Type            BpmnType
	OutgoingStart   int32 // offset into outgoingFlows
	OutgoingCount   int32
	IncomingCount   int32 // number of sequence flows targeting this node (a parallel join waits for all)
	FlowScope       int32 // ElementId of enclosing scope, -1 = process root
	Detail          int32 // index into the matching detail table, -1 if none
	BoundaryStart   int32 // offset into boundaryEvents (the node ids of events attached to this activity)
	BoundaryCount   int32 // number of boundary events attached (0 for a non-host node)
	DataOutStart    int32 // offset into dataOutAssocs (the data-output associations of this activity)
	DataOutCount    int32 // number of data-output associations (0 for a node with none)
	DataInStart     int32 // offset into dataInAssocs (the data-input associations of this activity)
	DataInCount     int32 // number of data-input associations (0 for a node with none)
	IOInStart       int32 // offset into ioInputs (the zeebe:ioMapping inputs of this activity)
	IOInCount       int32 // number of input mappings (0 for a node with none)
	IOOutStart      int32 // offset into ioOutputs (the zeebe:ioMapping outputs of this activity)
	IOOutCount      int32 // number of output mappings (0 for a node with none)
	ScopeStartStart int32 // offset into scopeStarts (the start events nested directly in this subprocess)
	ScopeStartCount int32 // number of nested start events (0 for a non-subprocess node)
	MultiInstance   int32 // index into multiInstances, -1 if this node is not a multi-instance loop (ADR-0077)
	EventSub        int32 // index into eventSubProcesses, -1 if this subprocess is not event-triggered (ADR-0082)
	EventSubStart   int32 // offset into eventSubs (the event-subprocess handler nodes nested directly in this scope)
	EventSubCount   int32 // number of event subprocesses in this scope (0 for a node that hosts none)
	Transaction     bool  // this subprocess is a <transaction>: it may hold a cancel end event and host a cancel boundary (ADR-0108)
	// Wizard is atlas:wizard on an embedded subprocess, WizardNone on every other node
	// (ADR-0449). It sits in the padding after Transaction, so the node does not grow.
	Wizard WizardKind
	// CompensationHandler marks an isForCompensation activity some compensation boundary
	// links to (ADR-0103). The engine reads it when such a handler finishes, to release a
	// compensation throw waiting for it (ADR-0508).
	// It too sits in the padding after Transaction, so the node does not grow.
	CompensationHandler bool
	Lane                int32 // index into lanes, -1 if this node is in no lane; organizational metadata with no execution effect (ADR-0121)
}

CompiledNode is one BPMN element. It stays small; type-specific data lives in detail tables referenced by Detail.

type CompiledProcess

type CompiledProcess struct {
	Key           uint64 // ProcessDefinitionKey
	BpmnProcessId int32  // interned
	Version       int32
	// contains filtered or unexported fields
}

CompiledProcess is the immutable result of compiling one process definition. It is safe for concurrent reads without synchronization.

func Parse

func Parse(key uint64, version int32, r io.Reader) (*CompiledProcess, error)

Parse reads a BPMN 2.0 XML model and compiles the first <process> into an immutable CompiledProcess keyed by key at the given version. It is the front end to the linearizer (compiler.md stages 1–2 and 6): it parses the XML, resolves string element ids to integer indices, and pours the result into the shared Builder. Validation beyond reference integrity (reachability, gateway coverage) is a later stage.

Service-task job types come from the Zeebe task-definition extension element (<zeebe:taskDefinition type="..." retries="..."/>), the de-facto standard for executable BPMN.

func ParseNamed

func ParseNamed(key uint64, version int32, r io.Reader, processId string) (*CompiledProcess, error)

ParseNamed compiles the single process with the given BPMN process id — a stored deployment records which process (by id) within its (possibly collaboration) XML it represents, so it can be recompiled under its original key. It compiles gate and all: a model that fails graph-wide validation is refused, as at any deploy. Bringing a definition back from a deployment store is the one case that wants the same compile *without* the gate, and uses ReloadNamed for it (ADR-0177).

func (*CompiledProcess) AdHoc added in v0.2.0

func (p *CompiledProcess) AdHoc(detail int32) *AdHocDetail

AdHoc returns the ad-hoc subprocess detail at the given table index (ADR-0138).

func (*CompiledProcess) AdHocEntries added in v0.2.0

func (p *CompiledProcess) AdHocEntries(id int32) []int32

AdHocEntries returns the element ids of an ad-hoc subprocess's entry activities — the contained flow nodes with no incoming sequence flow, which the runtime activates when the ad-hoc is entered (ADR-0138). Like ScopeStartEvents it is a slice into the shared topology array (no allocation); empty for a non-ad-hoc node or an ad-hoc with no contained activity.

func (*CompiledProcess) Binds added in v0.13.0

func (p *CompiledProcess) Binds(namespace string) bool

Binds reports whether the process declares a member of namespace, and so whether its instances carry that namespace. A scan of a handful of declarations — no allocation (I1).

func (*CompiledProcess) BoundaryEvent

func (p *CompiledProcess) BoundaryEvent(detail int32) *BoundaryEventDetail

BoundaryEvent returns the boundary-event detail at the given table index.

func (*CompiledProcess) BoundaryEvents

func (p *CompiledProcess) BoundaryEvents(id int32) []int32

BoundaryEvents returns the element ids of the boundary events attached to the activity node id, as a slice into the shared topology array (no allocation). Empty for a node with no attached boundary events.

func (*CompiledProcess) BundleBoundDecisions added in v0.7.0

func (p *CompiledProcess) BundleBoundDecisions() []string

BundleBoundDecisions returns the DMN decision ids this process's *local, deployment-bound* business rule tasks reference, distinct and in node order — the references that need a model bundled with this deployment, because that is literally what they evaluate (ADR-0063).

It is the complement of CompiledProcess.LatestBoundDecisions over the same local tasks, and the deploy-time gate reads the two differently: a latest-bound reference can be satisfied by a decision deployment already in the registry, and a deployment-bound one cannot (ADR-0327).

func (*CompiledProcess) BusinessRuleDecisionRefs added in v0.7.0

func (p *CompiledProcess) BusinessRuleDecisionRefs() []BusinessRuleDecisionRef

BusinessRuleDecisionRefs returns one reference per business rule task that calls a local decision, in node order — the same elements CompiledProcess.BusinessRuleDecisions walks, before it collapses them by decision id.

Worker-mode tasks are skipped here for the same reason they are skipped there: a central decision is evaluated by a remote temis service (ADR-0050), so there is no local decision for an edge to point at.

func (*CompiledProcess) BusinessRuleDecisions

func (p *CompiledProcess) BusinessRuleDecisions() []string

BusinessRuleDecisions returns the DMN decision ids this process's business rule tasks reference, distinct and in node order — empty if it has none. The server uses it at deploy time to pick and deploy the DMN model that provides those decisions into the DMN registry, so the tasks can be evaluated (ADR-0014).

func (*CompiledProcess) BusinessRuleTask

func (p *CompiledProcess) BusinessRuleTask(detail int32) *BusinessRuleTaskDetail

BusinessRuleTask returns the detail at the given table index.

func (*CompiledProcess) CallActivities

func (p *CompiledProcess) CallActivities() []CallActivityRef

CallActivities returns every call activity in this process, in node order — empty if it has none. It mirrors BusinessRuleDecisions: a static enumeration of an outbound reference (here the called process id) that the server surfaces so operators can see and manage the call activities deployed on a server — which process calls which, and whether the target resolves (ADR-0076).

func (*CompiledProcess) CallActivity

func (p *CompiledProcess) CallActivity(detail int32) *CallActivityDetail

CallActivity returns the call-activity detail at the given table index.

func (*CompiledProcess) CatchesErrorCode added in v0.15.0

func (p *CompiledProcess) CatchesErrorCode(code string) bool

CatchesErrorCode reports whether code is one of CompiledProcess.CaughtErrorCodes.

func (*CompiledProcess) CaughtErrorCodes added in v0.15.0

func (p *CompiledProcess) CaughtErrorCodes() []string

ConnectorRefs returns every worker reference the process makes, in node order. An element that names no worker is left out; see NodeConnectorRef. ReceivableMessageNames returns every message name this definition can be *delivered* on, sorted and without duplicates: a message start event, an intermediate catch, a receive task, a boundary message event, and a message-triggered event subprocess.

Message *throws* are deliberately absent. A throw sends; this answers the question "what would arrive here", which is what an operator deciding who may receive an inbound event needs (ADR-0205). Computed by scanning the detail tables, so it belongs off the hot path — a deploy-time or console question, never a per-message one. CaughtErrorCodes is every error code an error boundary or error event subprocess in this process catches, sorted, with no duplicates. A code-less catch-all is not in it: it catches every code but names none. It is what decides whether a script that fails with a code threw a BPMN error or simply failed (ADR-0461). The slice is shared; a caller must not modify it.

func (*CompiledProcess) CompensationThrow

func (p *CompiledProcess) CompensationThrow(detail int32) *CompensationDetail

CompensationThrow returns the compensation-throw detail at the given table index — shared by the compensation throw and end events (ADR-0103).

func (*CompiledProcess) Conditional added in v0.2.0

func (p *CompiledProcess) Conditional(detail int32) *ConditionalDetail

Conditional returns the conditional-catch detail at the given table index (ADR-0137).

func (*CompiledProcess) ConnectorRefs added in v0.3.0

func (p *CompiledProcess) ConnectorRefs() []ConnectorRef

func (*CompiledProcess) ConnectorTask

func (p *CompiledProcess) ConnectorTask(detail int32) *ConnectorTaskDetail

ConnectorTask returns the connector-task detail at the given table index.

func (*CompiledProcess) ConnectorTaskOf

func (p *CompiledProcess) ConnectorTaskOf(id int32) (*ConnectorTaskDetail, error)

ConnectorTaskOf returns the connector-task detail for element node id, or an error if id is not a task in this compiled process. It is the bounds-checked accessor for the job-worker path: a persisted job can outlive the process definition that compiled its element as a task (e.g. a job created before a redeploy that recompiled the element into something else, or dropped its worker-task table), and resolving such a stale job must fail it into an incident (ADR-0061) rather than index out of range and panic the job-runner goroutine — an unrecovered panic there crashes the whole server. A worker that gets an error returns it, and FailJob retries then parks the token.

func (*CompiledProcess) Constants added in v0.12.0

func (p *CompiledProcess) Constants() []Constant

Constants returns the process's constants in the order they were declared, nil when it declares none. The slice is shared and must not be modified.

func (*CompiledProcess) DataInputAssociations

func (p *CompiledProcess) DataInputAssociations(id int32) []DataInputAssociation

DataInputAssociations returns the data-input associations of activity node id, as a slice into the shared array (no allocation). Empty for a node with none. The engine evaluates them when the activity activates to read its data objects into process variables (ADR-0059).

func (*CompiledProcess) DataObjects

func (p *CompiledProcess) DataObjects() []CompiledDataObject

DataObjects returns the process's declared data objects — the typed, named data seeded under each instance's scope at creation (ADR-0053). Empty for a process that declares none. String fields are interned; resolve with Intern.

func (*CompiledProcess) DataOutputAssociations

func (p *CompiledProcess) DataOutputAssociations(id int32) []DataOutputAssociation

DataOutputAssociations returns the data-output associations of activity node id, as a slice into the shared array (no allocation). Empty for a node with none. The engine evaluates them when the activity completes to write its data objects (ADR-0058).

func (*CompiledProcess) DataStores added in v0.5.0

func (p *CompiledProcess) DataStores() []CompiledDataStore

DataStores returns the data stores this process names — where its data lives beyond one instance (ADR-0230). Like a data object a store is not a flow node: no token passes through it, so it carries no behavior and adds nothing to the dispatch table. The engine does not read this table at all; it exists so a deploy can resolve the store against the owning application's information model and say whether the sentence the model wrote is true.

func (*CompiledProcess) DataSubjectVariable added in v0.7.0

func (p *CompiledProcess) DataSubjectVariable() string

DataSubjectVariable is the variable holding the id of the person this process's personal variables are about (ADR-0314), or "" when nothing is personal. An edge that enciphers reads this variable's value to find the data key; an edge that deciphers does not need it, because an enciphered value names its own subject.

func (*CompiledProcess) DecisionsPinned added in v0.7.0

func (p *CompiledProcess) DecisionsPinned() bool

DecisionsPinned reports whether this definition resolved its latest-bound decision references at deploy time. False means it was deployed before that existed, and its latest-bound tasks still resolve the newest deployed model at task activation (ADR-0063) — the behavior it has been running under.

func (*CompiledProcess) Documentation added in v0.2.0

func (p *CompiledProcess) Documentation() string

Documentation returns the process's own <bpmn:documentation> — the summary that describes the process as a whole — or "" if it has none.

func (*CompiledProcess) ElementBpmnId

func (p *CompiledProcess) ElementBpmnId(id int32) string

ElementBpmnId returns the source BPMN element id for a node (the string id bpmn-js uses, e.g. "StartEvent_1"), or "" if the node index is out of range or no id was recorded. Used to map runtime element instances back onto a diagram.

func (*CompiledProcess) ElementDocumentation added in v0.2.0

func (p *CompiledProcess) ElementDocumentation(id int32) string

ElementDocumentation returns the prose an author wrote about a node — its <bpmn:documentation> (ADR-0025) — or "" when the node is undocumented or the index is out of range. It is design-time metadata the engine never reads: it changes no execution, and is carried so a surface that shows an element to a person can read it here rather than re-parsing the model. The Tasks app uses it as a user task's work instruction.

func (*CompiledProcess) ElementIndexOf added in v0.5.0

func (p *CompiledProcess) ElementIndexOf(bpmnId string) (int32, bool)

ElementIndexOf is CompiledProcess.ElementBpmnId read backwards: the node index for a source BPMN element id, and false when the model has no such element. A caller that arrives with an id off a diagram — an operator clicking a shape — needs this direction to reach anything the engine keyed by node index.

It is a scan of the id table rather than a map, because it answers one lookup per request on a read path and a model has tens to hundreds of elements. It is never called from the processor: the hot path deals in indices already (I5).

func (*CompiledProcess) EnclosingWizard added in v0.10.0

func (p *CompiledProcess) EnclosingWizard(id int32) int32

EnclosingWizard returns the nearest wizard subprocess enclosing node id, and -1 when none does (ADR-0449). It walks the compiled FlowScope chain, so the answer is the deploy-time graph's and costs the nesting depth; nothing on the processor's path asks it.

The walk ends at an index the graph does not hold, and after as many steps as the graph has nodes. Validate also runs on processes a Builder assembled by hand, and a malformed chain has to end in "none" rather than in a panic or a loop.

func (*CompiledProcess) ErrorEnd

func (p *CompiledProcess) ErrorEnd(detail int32) *ErrorEndDetail

ErrorEnd returns the error-end detail at the given table index (ADR-0089).

func (*CompiledProcess) Escalation added in v0.2.0

func (p *CompiledProcess) Escalation(detail int32) *EscalationDetail

Escalation returns the escalation-event detail (throw or end) at the given table index (ADR-0125).

func (*CompiledProcess) EventSubProcess

func (p *CompiledProcess) EventSubProcess(detail int32) *EventSubProcessDetail

EventSubProcess returns the event-subprocess detail at the given table index — the trigger the runtime arms while the parent scope runs (ADR-0082).

func (*CompiledProcess) EventSubprocesses

func (p *CompiledProcess) EventSubprocesses(id int32) []int32

EventSubprocesses returns the handler node ids of the event subprocesses nested directly in the subprocess scope id — the triggers the runtime arms when that subprocess is entered — as a slice into the shared topology array (no allocation). Empty for a scope that hosts none. Use RootEventSubprocesses for the process root.

func (*CompiledProcess) Flow

func (p *CompiledProcess) Flow(id int32) *CompiledFlow

Flow returns the flow with the given id.

func (*CompiledProcess) FlowBpmnId added in v0.21.0

func (p *CompiledProcess) FlowBpmnId(id int32) string

FlowBpmnId returns the source BPMN id of a sequence flow — the id bpmn-js draws the arrow under — or "" when the index is out of range or the flow has no arrow: the goto the compiler makes up for a link event (ADR-0133). The engine counts the flows a token takes by index; this is how such a count reaches the diagram (ADR-0496).

func (*CompiledProcess) FlowCount added in v0.21.0

func (p *CompiledProcess) FlowCount() int

FlowCount is how many sequence flows the process compiled to, so a caller outside this package can walk them: flow ids are the dense range [0, FlowCount).

func (*CompiledProcess) HasConditionalEvents added in v0.2.0

func (p *CompiledProcess) HasConditionalEvents() bool

HasConditionalEvents reports whether the process contains any conditional event, so the runtime only re-checks conditionals for instances that can have one (ADR-0137).

func (*CompiledProcess) HasConstants added in v0.12.0

func (p *CompiledProcess) HasConstants() bool

HasConstants reports whether the process declares any. The engine asks it first on every variable write into an instance root, so a process that declares none pays one length check rather than a lookup — the same shape as HasSearchableVariables.

func (*CompiledProcess) HasPersonalVariables added in v0.7.0

func (p *CompiledProcess) HasPersonalVariables() bool

HasPersonalVariables reports whether this process declares any, so a process that declares none pays one length check and nothing else.

func (*CompiledProcess) HasPublicWizard added in v0.10.0

func (p *CompiledProcess) HasPublicWizard() bool

HasPublicWizard reports whether the process holds a public wizard (ADR-0449): whether a public start of it hands its visitor a pass.

func (*CompiledProcess) HasSearchableVariables added in v0.5.0

func (p *CompiledProcess) HasSearchableVariables() bool

HasSearchableVariables reports whether this process declares any. The engine asks this first on every variable write, so a process that declares none pays one comparison rather than a lookup.

func (*CompiledProcess) HistoryTtlNanos added in v0.2.0

func (p *CompiledProcess) HistoryTtlNanos() int64

HistoryTtlNanos returns the process's history TTL in nanoseconds, or 0 when none is configured. A positive value is this definition's own retention max age (ADR-0144): the retention sweep hard-deletes a finished instance of this definition once it is older than the TTL and its events are provably exported. Zero falls back to the server-wide max age.

func (*CompiledProcess) IOInputs

func (p *CompiledProcess) IOInputs(id int32) []IOMapping

IOInputs returns the zeebe:ioMapping input mappings of activity node id, as a slice into the shared array (no allocation). Empty for a node with none. The engine evaluates them when the activity activates to write its activity-local scope (ADR-0068).

func (*CompiledProcess) IOOutputs

func (p *CompiledProcess) IOOutputs(id int32) []IOMapping

IOOutputs returns the zeebe:ioMapping output mappings of activity node id, as a slice into the shared array (no allocation). Empty for a node with none. The engine evaluates them when the activity completes to promote selected values to the parent scope (ADR-0068).

func (*CompiledProcess) InclusiveJoinReach added in v0.5.0

func (p *CompiledProcess) InclusiveJoinReach(node int32) NodeSet

InclusiveJoinReach returns the set of node ids from which the given node is reachable by following sequence flows — its ancestors in the flow graph. An inclusive join uses it to decide whether any live token upstream could still arrive (if none can, and at least one has, it fires).

It is computed once, at compile time, for exactly the nodes that need it: the inclusive gateways with more than one incoming flow. Anything else gets the empty set, which is why the name says which nodes it answers for — a join that had no set would look like a join with nothing upstream, and fire early.

It used to be derived at runtime, on every arrival at every such join: a reverse adjacency over the whole graph, a map and a stack, all allocated and thrown away per token movement. That is topology, and topology is compiled, not interpreted (invariants I1 and I5, ADR-0279).

func (*CompiledProcess) InstanceTtlNanos

func (p *CompiledProcess) InstanceTtlNanos() int64

InstanceTtlNanos returns the process's instance TTL in nanoseconds, or 0 when no TTL is configured. A positive value is the self-cleaning expiry bound (ADR-0085): the engine schedules a durable expiry timer at CreatedAt+TTL when an instance activates.

func (*CompiledProcess) Intern

func (p *CompiledProcess) Intern(idx int32) string

Intern returns the string for an interned index, or "" if out of range.

func (*CompiledProcess) IsConstant added in v0.12.0

func (p *CompiledProcess) IsConstant(name string) bool

IsConstant reports whether name is a variable the process's constants occupy in an instance root: a process constant's own name, or a namespace when the process declares one of its members. A bound constant's own name is not one — it is a member of the namespace, and a variable of that name is the process's to write.

func (*CompiledProcess) IsEventSubProcess

func (p *CompiledProcess) IsEventSubProcess(id int32) bool

IsEventSubProcess reports whether the subprocess node id is event-triggered — a `<subProcess triggeredByEvent="true">` armed by its start event's event definition rather than entered by a flow (ADR-0082).

func (*CompiledProcess) IsExecutable

func (p *CompiledProcess) IsExecutable() bool

IsExecutable reports the process's bpmn:isExecutable flag. A non-executable process is descriptive-only: the API refuses to start it and omits it from the start surfaces. Absent in the source defaults to true (see the parser).

func (*CompiledProcess) IsPersonal added in v0.7.0

func (p *CompiledProcess) IsPersonal(name string) bool

IsPersonal reports whether a variable name was declared personal. The engine asks it where a value crosses an edge — enciphering on the way in, deciphering on the way out — and never in an expression, because Builder.Build has already refused a process whose expressions read one.

func (*CompiledProcess) IsSearchableVariable added in v0.5.0

func (p *CompiledProcess) IsSearchableVariable(name string) bool

IsSearchableVariable reports whether name is one of the declared names — the question the engine asks per variable write to decide whether the write is indexed. Resolved at deploy time (I5): this is a set lookup, not a parse.

func (*CompiledProcess) IsTransaction

func (p *CompiledProcess) IsTransaction(id int32) bool

IsTransaction reports whether node id is a <transaction> subprocess — a subprocess that may hold a cancel end event and host a cancel boundary (ADR-0108).

func (*CompiledProcess) JobTypeRefs added in v0.20.0

func (p *CompiledProcess) JobTypeRefs() []JobTypeRef

JobTypeRefs lists the authored job types of the process's service and send tasks, in node order. A connector task is not listed: it names its worker instead of a type, and CompiledProcess.ConnectorRefs reports it (ADR-0471).

func (*CompiledProcess) Lane added in v0.2.0

func (p *CompiledProcess) Lane(idx int32) *LaneDetail

Lane returns the lane at the given table index (ADR-0121).

func (*CompiledProcess) LanePath added in v0.2.0

func (p *CompiledProcess) LanePath(nodeID int32) []string

LanePath returns a node's lane names from the outermost lane to the leaf, for display (e.g. ["Finance", "Approver"] for a node in a nested lane). Empty when the node is in no lane (ADR-0121).

func (*CompiledProcess) LatestAtRuntime added in v0.8.0

func (p *CompiledProcess) LatestAtRuntime() bool

LatestAtRuntime reports whether this definition's latest-bound tasks resolve the newest decision deployment when their job is worked.

func (*CompiledProcess) LatestBoundDecisions added in v0.7.0

func (p *CompiledProcess) LatestBoundDecisions() []string

LatestBoundDecisions returns the DMN decision ids this process's *local, latest-bound* business rule tasks reference, distinct and in node order — the references a deployment has to resolve to an exact decision deployment (ADR-0319).

It is deliberately narrower than CompiledProcess.BusinessRuleDecisions: a deployment-bound task already names its model (the snapshot registered under this process's own key) and a central decision resolves through its worker (ADR-0050), so neither has a version to pin.

func (*CompiledProcess) MailboxUses added in v0.9.0

func (p *CompiledProcess) MailboxUses() []MailboxUse

MailboxUses lists the mail tasks whose operation is not send, in node order. It is what the deploy check reads to decide whether the deployer may use each mailbox (ADR-0438); a send is not listed, because who may use a sender is not what that check governs.

func (*CompiledProcess) MessageCatch

func (p *CompiledProcess) MessageCatch(detail int32) *MessageDetail

MessageCatch returns the message-catch detail at the given table index.

func (*CompiledProcess) MessageCatchPoints added in v0.8.0

func (p *CompiledProcess) MessageCatchPoints() []MessageCatchPoint

MessageCatchPoints lists every element of the process that waits for a message, in element order.

func (*CompiledProcess) MessageReceipts added in v0.20.0

func (p *CompiledProcess) MessageReceipts() []MessageReceipt

MessageReceipts lists every element that receives a message, in node order — the same five places CompiledProcess.ReceivableMessageNames reads, one entry per element rather than one per name, so a reader can trace a name back to the element that states it (ADR-0471).

A message start nested in an event subprocess is not listed on its own: the event subprocess carries the trigger, and it is listed once, as the subprocess element.

func (*CompiledProcess) MessageReceivers added in v0.9.0

func (p *CompiledProcess) MessageReceivers() []MessagePoint

MessageReceivers lists every element that receives a message, starts first. An event subprocess's message start is a receiver too: it is reported with its subprocess, named by its start event, as SignalPoints reports a signal one (ADR-0446 §1).

func (*CompiledProcess) MessageSenders added in v0.20.0

func (p *CompiledProcess) MessageSenders() []MessagePoint

MessageSenders lists every element that sends a message: a message throw event, a message end event, and a send task that names a message, which compiles to a throw. All three share the throw detail table (ADR-0446 §1).

func (*CompiledProcess) MessageStart

func (p *CompiledProcess) MessageStart(detail int32) *MessageDetail

MessageStart returns the message-start detail at the given table index.

func (*CompiledProcess) MessageStartEvents

func (p *CompiledProcess) MessageStartEvents() []MessageStartEvent

MessageStartEvents returns each message-start event with its element index and compiled correlation-key expression. Computed by scanning the node table at deploy time (off the hot path); empty for a process with no message start event.

func (*CompiledProcess) MessageStarts

func (p *CompiledProcess) MessageStarts() []MessageDetail

MessageStarts returns the definition's message-start-event details, one per message start event. The engine indexes these at deploy time so a correlating message can instantiate the process (ADR-0035). Empty for a process with no message start event.

func (*CompiledProcess) MessageThrow

func (p *CompiledProcess) MessageThrow(detail int32) *MessageDetail

MessageThrow returns the message-throw detail at the given table index.

func (*CompiledProcess) MockupTask added in v0.2.0

func (p *CompiledProcess) MockupTask(detail int32) *MockupTaskDetail

MockupTask returns the mockup-task detail at the given table index (ADR-0120).

func (*CompiledProcess) MultiInstance

func (p *CompiledProcess) MultiInstance(detail int32) *MultiInstanceDetail

MultiInstance returns the loop characteristics at the given table index — the per-activity multi-instance detail a node's MultiInstance field points at (ADR-0077).

func (*CompiledProcess) Node

func (p *CompiledProcess) Node(id int32) *CompiledNode

Node returns the node with the given ElementId.

func (*CompiledProcess) NodeConnectorRef added in v0.3.0

func (p *CompiledProcess) NodeConnectorRef(id int32) (ConnectorRef, bool)

NodeConnectorRef returns the worker reference one node makes, and false when it makes none. Both shapes are covered: a task (mail, REST, SharePoint, …) and a business rule task delegating to a remote decision service, which names its worker the same way. An element that names no worker — a local decision, a REST task with its URL in the model, anything that is not one of those two task types — is not a reference.

It answers the question one element at a time because that is how an *incident* asks it: a token is parked on this element, which worker is it stuck on (ADR-0160)? ConnectorRefs asks the same question of every node.

func (*CompiledProcess) NodeCount added in v0.3.0

func (p *CompiledProcess) NodeCount() int

NodeCount is how many nodes the process compiled to, so a caller outside this package can walk them: node ids are the dense range [0, NodeCount).

func (*CompiledProcess) NodeLane added in v0.2.0

func (p *CompiledProcess) NodeLane(nodeID int32) int32

NodeLane returns the leaf lane index a node belongs to, or -1 if it is in no lane (ADR-0121).

func (*CompiledProcess) Outgoing

func (p *CompiledProcess) Outgoing(id int32) []int32

Outgoing returns the flow ids leaving node id, as a slice into the shared topology array (no allocation).

func (*CompiledProcess) PersonalVariables added in v0.7.0

func (p *CompiledProcess) PersonalVariables() []string

PersonalVariables are the variable names this process declared as personal data (ADR-0314), in the order they were authored.

func (*CompiledProcess) PinDecisions added in v0.7.0

func (p *CompiledProcess) PinDecisions(pins map[string]uint64)

PinDecisions records the decision deployment each latest-bound reference resolved to, and marks this definition as one that resolved them at deploy time (ADR-0319). An empty or nil map is a meaningful call: it says "this definition was deployed under the pinning policy and had nothing to pin".

It mutates the compiled process, so it must be called on the deploying goroutine before the definition is handed to the processor — the same window Version and ResolveJobTypes are set in. After that the definition is read-only and safe for concurrent evaluation.

func (*CompiledProcess) PinnedDecisionKey added in v0.7.0

func (p *CompiledProcess) PinnedDecisionKey(decisionId string) (uint64, bool)

PinnedDecisionKey returns the decision deployment a latest-bound task on this decision id must evaluate against, and ok=false when there is none to use — either because this definition was never pinned, or (defensively) because the pin map does not carry that id. Both fall back to the runtime lookup rather than to a key nobody chose.

func (*CompiledProcess) ProcessId

func (p *CompiledProcess) ProcessId() string

ProcessId returns the source BPMN process id (the <process id="…">), used to tell one process's versions apart from another's when superseding start timers (ADR-0051).

func (*CompiledProcess) ReceivableMessageNames added in v0.5.0

func (p *CompiledProcess) ReceivableMessageNames() []string

func (*CompiledProcess) ReceiveTask

func (p *CompiledProcess) ReceiveTask(detail int32) *MessageDetail

ReceiveTask returns the receive-task detail at the given table index (ADR-0102). A receive task carries the same MessageDetail as a message catch — the message name and the compiled correlation-key expression it waits on.

func (*CompiledProcess) RepairForm added in v0.3.0

func (p *CompiledProcess) RepairForm(id int32) string

RepairForm returns the form an operator should be offered when a token parks on this node with an incident (ADR-0169), or "" when the node names none or the index is out of range.

It is a *better editor over an existing write path*, not a new one: the form names the variables worth looking at, and submitting it writes them through the same audited operator override the raw JSON editor uses (ADR-0098). The binding lives here, in the compiled model, because whoever authored the task is who knows which values its retry depends on — so it is versioned with the model, costs nothing at runtime, and rides an instance's migration (ADR-0162) rather than being runtime configuration that could drift from the task it describes.

func (*CompiledProcess) ResolveJobTypes added in v0.3.0

func (p *CompiledProcess) ResolveJobTypes(intern func(name string) (int32, error)) error

ServiceTask returns the detail at the given table index. ResolveJobTypes translates every model-authored job type in this process into the engine-wide index space, by handing each one's *name* to intern and keeping the index it returns. Service and send tasks are the only elements that need it: every other job-creating element carries a reserved job type, which is already the same index in every process (see reservedJobTypes).

It is called once per process at deploy time and again for each process on reload, so intern must be idempotent — the same name must come back with the same index. A failure aborts the whole resolution: a half-resolved process is worse than an unresolved one, because only some of its jobs would be findable.

The interner is supplied by the caller rather than imported, so the compiler stays independent of where the engine-wide table lives.

func (*CompiledProcess) ResolveLatestAtRuntime added in v0.8.0

func (p *CompiledProcess) ResolveLatestAtRuntime(pins map[DecisionVersionRef]uint64)

ResolveLatestAtRuntime marks this definition as deployed under the runtime policy: its latest-bound tasks evaluate the newest decision deployment when the job is worked, and pins records the decision deployment each version-bound reference resolved to (ADR-0423). Like PinDecisions it mutates the compiled process and must be called before the processor sees it.

func (*CompiledProcess) RootEventSubprocesses

func (p *CompiledProcess) RootEventSubprocesses() []int32

RootEventSubprocesses returns the handler node ids of the event subprocesses at the process root — the triggers armed when an instance is created (ADR-0082).

func (*CompiledProcess) ScopeStartEvents

func (p *CompiledProcess) ScopeStartEvents(id int32) []int32

ScopeStartEvents returns the element ids of the start events nested directly in the subprocess node id — the scope's entry points the subprocess behavior seeds on activation — as a slice into the shared topology array (no allocation). Empty for a non-subprocess node or a subprocess with no start event (ADR-0074).

func (*CompiledProcess) ScriptJobTask

func (p *CompiledProcess) ScriptJobTask(detail int32) *ScriptJobTaskDetail

ScriptJobTask returns the script-job-task detail at the given table index.

func (*CompiledProcess) ScriptTask

func (p *CompiledProcess) ScriptTask(detail int32) *ScriptTaskDetail

ScriptTask returns the detail at the given table index.

func (*CompiledProcess) SearchableVariables added in v0.5.0

func (p *CompiledProcess) SearchableVariables() []string

SearchableVariables are the variable names this process declared an instance can be found by (atlas:searchable), in the order they were authored. nil when the process declares none.

func (*CompiledProcess) SendTask

func (p *CompiledProcess) SendTask(detail int32) *ServiceTaskDetail

SendTask returns the detail at the given table index (ADR-0112). A send task is a service task under a different label — it reuses ServiceTaskDetail and the same detail table, so this is ServiceTask by another name, kept for call-site clarity.

func (*CompiledProcess) ServiceTask

func (p *CompiledProcess) ServiceTask(detail int32) *ServiceTaskDetail

func (*CompiledProcess) ShopOutcomePoints added in v0.9.0

func (p *CompiledProcess) ShopOutcomePoints() []ShopOutcomePoint

ShopOutcomePoints lists every shop send task of the process that states an outcome, in element order. Read at publish, to know that every action a product declares is answered (ADR-0429 §4).

func (*CompiledProcess) SignalCatch

func (p *CompiledProcess) SignalCatch(detail int32) *SignalDetail

SignalCatch returns the signal-catch detail at the given table index (ADR-0088).

func (*CompiledProcess) SignalPoints added in v0.9.0

func (p *CompiledProcess) SignalPoints() []SignalPoint

SignalPoints lists every element of the process that throws or receives a signal: what the event catalogue (ADR-0435) holds a system process to, how a server finds who listens to an event, and what the inventory of the installation's own signals is made of (ADR-0447).

func (*CompiledProcess) SignalStart

func (p *CompiledProcess) SignalStart(detail int32) *SignalDetail

SignalStart returns the signal-start detail at the given table index (ADR-0088).

func (*CompiledProcess) SignalStartEvents

func (p *CompiledProcess) SignalStartEvents() []SignalStartEvent

SignalStartEvents returns each root-scope signal-start event's signal name and element index. The engine indexes these at deploy time so a broadcast signal can instantiate the process (ADR-0088), mirroring MessageStartEvents. A signal start nested in an event subprocess is that scope's trigger, not a process entry point.

func (*CompiledProcess) SignalThrow

func (p *CompiledProcess) SignalThrow(detail int32) *SignalDetail

SignalThrow returns the signal-throw detail at the given table index — shared by the signal throw and signal end events (ADR-0088).

func (*CompiledProcess) StartEvents

func (p *CompiledProcess) StartEvents() []int32

StartEvents returns the process's entry-point element ids.

func (*CompiledProcess) StartFormId

func (p *CompiledProcess) StartFormId() string

StartFormId returns the id of the form the UI shows before starting an instance, or "" if the process has no start form (ADR-0028). It is design-time metadata; the engine never reads it.

func (*CompiledProcess) StartVariables added in v0.12.0

func (p *CompiledProcess) StartVariables() []StartVariable

StartVariables returns the process's declared start variables in the order they were authored, nil when it declares none. The start surfaces render them beside the start form, so a value the form does not ask for is still asked, and the engine seeds the default of each one a start did not supply (ADR-0455). The slice is shared and must not be modified.

func (*CompiledProcess) TimerCatch

func (p *CompiledProcess) TimerCatch(detail int32) *TimerCatchDetail

TimerCatch returns the timer-catch detail at the given table index.

func (*CompiledProcess) TimerStart

func (p *CompiledProcess) TimerStart(detail int32) *TimerStartDetail

TimerStart returns the timer-start detail at the given table index.

func (*CompiledProcess) TimerStartEvents

func (p *CompiledProcess) TimerStartEvents() []TimerStartEvent

TimerStartEvents returns each timer-start event with its element index and compiled schedule. Computed by scanning the node table at deploy time (off the hot path); empty for a process with no timer start event.

func (*CompiledProcess) UntimedPublicWizard added in v0.10.0

func (p *CompiledProcess) UntimedPublicWizard() string

UntimedPublicWizard returns the BPMN id of a public wizard that no interrupting timer boundary event bounds, and "" when the process has none (ADR-0449). A public start link is refused for such a process: every sitting an anonymous filler abandons would stay a live instance, holding what they typed, for as long as the server runs.

func (*CompiledProcess) UntriggeredStartAmbiguous added in v0.8.0

func (p *CompiledProcess) UntriggeredStartAmbiguous() bool

UntriggeredStartAmbiguous reports whether a create that nobody triggered — the API, a call activity — has no answer to where the instance begins: the process has no none start event and more than one start event (ADR-0426).

Each of those start events is a trigger, and a create by hand fired none of them. With one, seeding it is what "start this by hand" has always meant (ADR-0035). With several, seeding all of them runs branches nobody triggered — a lifecycle process would provision and deprovision in the same instant — so a caller refuses the create instead. It reads the slice the create reads anyway and allocates nothing (invariant I1).

func (*CompiledProcess) UserTask

func (p *CompiledProcess) UserTask(detail int32) *UserTaskDetail

UserTask returns the user-task detail at the given table index.

func (*CompiledProcess) VersionBoundDecisions added in v0.8.0

func (p *CompiledProcess) VersionBoundDecisions() []DecisionVersionRef

VersionBoundDecisions returns the distinct (decision, version) pairs this process's local, version-bound business rule tasks name, in node order — the references a deploy resolves to exact decision deployments (ADR-0423).

func (*CompiledProcess) VersionPinnedKey added in v0.8.0

func (p *CompiledProcess) VersionPinnedKey(decisionId string, version int32) (uint64, bool)

VersionPinnedKey returns the decision deployment a version-bound task naming this decision and version evaluates, and ok=false when the deploy recorded none. A caller must not fall back to another version on false: a task that names v2 and runs v3 is the answer this binding exists to rule out.

func (*CompiledProcess) VersionTag

func (p *CompiledProcess) VersionTag() string

VersionTag returns the process's atlas:versionTag revision label ("" if none). It is design-time metadata Operations shows beside the deploy version; the engine never reads it.

func (*CompiledProcess) WaitlessCycle added in v0.8.0

func (p *CompiledProcess) WaitlessCycle() []string

WaitlessCycle returns the element ids of a cycle in the process that passes no element waiting for something outside the token, or nil when every cycle waits. ADR-0272 already stops such a cycle at runtime with an incident; a per-position lifecycle process is refused at publish instead, because its instance lives as long as the right it carries and an incident on it stops every later operation.

The graph is the sequence flows, plus an edge from each activity to its boundary events and from each subprocess to its start events, so a cycle that leaves through a boundary or runs through a subprocess is seen.

func (*CompiledProcess) Wizard added in v0.10.0

func (p *CompiledProcess) Wizard(id int32) WizardKind

Wizard reports the wizard kind of node id (ADR-0449): WizardNone for every node but an embedded subprocess marked atlas:wizard.

type ConditionalDetail added in v0.2.0

type ConditionalDetail struct {
	Condition *expr.Compiled
}

ConditionalDetail is the per-conditional-catch-event data the runtime needs: the boolean FEEL condition it waits on (ADR-0137). A conditional intermediate catch arms inert and is driven to Completing when a variable-change re-check finds the condition true. (Conditional boundaries and event subprocesses carry their condition on BoundaryEventDetail / EventSubProcessDetail instead.)

type ConnectorRef added in v0.3.0

type ConnectorRef struct {
	ElementId string
	// ElementIndex is the same element as ElementId, by the identity the engine uses:
	// the node's position in the compiled table. It is what joins a reference to a
	// maintained per-element counter, since those are keyed by (definition, element
	// index) and never by the id a modeller typed (ADR-0080, ADR-0400). It is
	// version-local — the interning is per compiled process — so it means nothing
	// outside the definition it came from.
	ElementIndex int32
	JobType      int32
	Connector    string
}

ConnectorRef is one model reference to a server-registered worker: the element carrying it, the reserved job type that says which *kind* of worker it needs, and the name it asks for. A model refers to a worker by name only and never carries an endpoint or a secret (ADR-0036/0041), so nothing inside the model can tell whether that name is configured anywhere — which is exactly why the references have to be enumerable from outside, where the worker store is (ADR-0158).

type ConnectorTaskDetail

type ConnectorTaskDetail struct {
	JobType    int32 // interned reserved worker job type → index
	Connector  int32 // interned worker name → index, -1 if not a clio task
	Subject    int32 // interned clio target subject → index, -1 if unused
	EventType  int32 // interned clio event type → index, -1 if not a clio write task
	ClioQuery  int32 // interned clio run_query query string → index, -1 if unused
	ReduceSpec int32 // interned clio get_state reduce-spec name → index, -1 if unused
	Limit      int32 // clio read_events limit, 0 = the worker's default
	Method     int32 // interned HTTP method → index, -1 if not a REST task
	ResultVar  int32 // interned REST/clio result variable name → index, -1 if none
	// Url is the request endpoint, Headers and Query the request headers and query
	// parameters a REST task adds (ADR-0067). Each value is literal or a FEEL
	// expression evaluated over the instance's variables at call time (the
	// Camunda-style fx toggle) — see RestExpr. Url is the zero RestExpr for a
	// non-REST (clio) task; Headers/Query are then nil. Auth is an interned JSON
	// object describing the request's authentication —
	// {"type","username","apiKeyName","secretRef"} — where secretRef names a
	// server-side secret (ADR-0041), never the value; -1 when unauthenticated.
	Url     RestExpr
	Headers []RestKV
	Query   []RestKV
	Auth    int32
	Retries int32
	// Mail worker fields (JobType == MailJobType, ADR-0079). Worker (above)
	// names the server-registered mail provider; the message is authored in the
	// model as literal-or-FEEL values evaluated over the instance's variables at
	// send time. To and Bcc/Cc are comma-separated recipient lists; From overrides
	// the provider's default sender; MailSubject and Body are the message, and
	// BodyHTML is its optional HTML half (sent as multipart/alternative beside Body,
	// or alone as text/html). Each is the zero RestExpr for a non-mail task. Cc/Bcc/
	// From/BodyHTML are also zero when a mail task omits them.
	To          RestExpr
	Cc          RestExpr
	Bcc         RestExpr
	From        RestExpr
	MailSubject RestExpr
	Body        RestExpr
	BodyHTML    RestExpr
	// MailSubjectTmpl, BodyTmpl and BodyHTMLTmpl are set in place of the literal in
	// MailSubject, Body and BodyHTML when the task switched templating on and the value
	// uses the template language (ADR-0487). The worker renders them
	// over the scope's variables, escaping what a placeholder inserts into the HTML
	// body; nil means the RestExpr beside it is the value, as it always was.
	MailSubjectTmpl *feelers.Template
	BodyTmpl        *feelers.Template
	BodyHTMLTmpl    *feelers.Template
	// Mailbox fields (JobType == MailJobType, ADR-0438). MailOp is the
	// operation, "" being send — every mail task authored before mailboxes existed.
	// MailFolder is the folder a list reads, MailMessage the message an operation
	// addresses and MailDestination where a move files it, each literal-or-FEEL.
	// MailMaxResults is a list's effective cap, written here by the compiler so the
	// runtime interprets nothing (I5); MailIncludeBody and MailUnreadOnly are literal
	// flags. ResultVar (above) receives what list, get and move answer.
	MailOp          string
	MailFolder      RestExpr
	MailMessage     RestExpr
	MailDestination RestExpr
	MailMaxResults  int32
	MailIncludeBody bool
	// MailIncludeHTML is a get's includeBody="html": the HTML body is read as well
	// (ADR-0489).
	MailIncludeHTML bool
	MailUnreadOnly  bool
	// The documents half (ADR-0478). MailAttachment is
	// the attachment get-attachment and export-attachment address, literal-or-FEEL;
	// MailAllowedTypes the media types the task accepts, normalized here (I5); MailStore
	// the S3 Worker an export puts the document into — a literal name, so the deploy
	// check can see it — and MailBucket and MailKey where in it.
	MailAttachment   RestExpr
	MailAllowedTypes []string
	MailStore        string
	MailBucket       RestExpr
	MailKey          RestExpr
	// CSV worker fields (JobType == CsvImportJobType, ADR-0139). CsvSource is the
	// interned name of the process variable holding the raw CSV text (-1 → the
	// default "csvText"); CsvResult the variable the parsed rows are written to
	// (-1 → "rows"); CsvDelimiter the field delimiter (-1 → ","); CsvHasHeader
	// whether the first row is a header; CsvColumns the interned field names (empty →
	// derive them from the header row). Each is the zero value for a non-CSV task and
	// is read only by the in-process CSV worker, which the runner dispatches by the
	// CSV job type alone.
	CsvSource    int32
	CsvResult    int32
	CsvDelimiter int32
	CsvHasHeader bool
	CsvColumns   []int32
	// CsvFormat is the interned file format ("csv" | "fixed-width" | "avp"; interned
	// "" is csv, which is what every model authored before formats existed) and
	// CsvOperation the direction ("read" | "write"; interned "" is read). CsvWidths
	// holds each column's character width for a fixed-width file, positionally
	// alongside CsvColumns (ADR-0139, amended).
	CsvFormat    int32
	CsvOperation int32
	CsvWidths    []int32
	// SharePoint worker fields (JobType == SharePointJobType or SharePointOpsJobType,
	// ADR-0141, amended). Worker (above) names the server-registered SharePoint
	// provider (its Graph base and OAuth credential live server-side). SharePointOp is
	// the interned operation ("create-item" for every model authored before
	// operations existed), and it decides which of the rest are populated; the
	// compiler refuses a value on an operation that does not use it.
	//
	// Site addresses the site (a Graph site id, a host and path, or the site's URL)
	// and List the list an item operation acts on — or, for a file operation, the
	// document library, which SharePoint keeps as a list too; empty there means the
	// site's default library. Fields are column values: what an item is created or
	// updated with, or the properties an uploaded file is given. SharePointItemID
	// addresses one list item and SharePointPath one file or folder inside the
	// library. SharePointContent is what an upload writes, in the form
	// SharePointEncoding names. SharePointFilter and SharePointSelect are a listing's
	// OData filter and the columns a read returns; SharePointPageToken resumes a
	// listing where an earlier page stopped.
	//
	// SharePointEncoding and SharePointMaxResults are compiled structure rather than
	// authored values, with their defaults already applied, so the runtime interprets
	// nothing (I5). Each RestExpr is a literal-or-FEEL value evaluated over the
	// variables the task sees at call time; all are the zero value for a
	// non-SharePoint task. ResultVar (above), if set, receives what Graph returned.
	Site                 RestExpr
	List                 RestExpr
	Fields               []RestKV
	SharePointOp         int32
	SharePointItemID     RestExpr
	SharePointPath       RestExpr
	SharePointContent    RestExpr
	SharePointEncoding   int32
	SharePointFilter     RestExpr
	SharePointSelect     RestExpr
	SharePointPageToken  RestExpr
	SharePointMaxResults int32
	// Remedy worker fields (JobType == RemedyJobType, ADR-0106). Worker (above)
	// names the server-registered BMC Remedy instance; ResultVar (above), if set,
	// receives the created entry's id. RemedyForm is the Remedy form the entry is
	// created in (literal-or-FEEL, the zero RestExpr for a non-remedy task);
	// RemedyFields are the entry's field values as name/literal-or-FEEL pairs, evaluated
	// over the instance's variables at call time (nil for a non-remedy task).
	RemedyForm   RestExpr
	RemedyFields []RestKV
	// Web-scrape worker fields (JobType == WebScrapeJobType, ADR-0118/0190).
	// Url (above) is the model-authored document to fetch. HTML uses ScrapeSelector
	// (literal-or-FEEL) and optional ScrapeAttribute. ScrapeFormat is compiled from
	// format=html|rss|atom; its zero value is HTML so models compiled before ADR-0190
	// keep their semantics. ScrapeMaxItems is the deterministic first-N bound (0 =
	// unlimited). Feed modes return structured entries and never inspect selector or
	// attribute at runtime.
	//
	// ScrapeFields, when non-empty, changes what one HTML match *is*: the selector
	// picks items and every match becomes an object carrying these fields, each read
	// by its own field-relative selector and attribute (ADR-0231).
	// A field list and ScrapeAttribute are mutually exclusive. ScrapeAbsoluteLinks
	// resolves href/src reads against the fetched document's final URL (HTML only);
	// ScrapePlainText strips markup from a feed entry's description (feeds only).
	ScrapeSelector      RestExpr
	ScrapeAttribute     int32
	ScrapeFormat        WebScrapeFormat
	ScrapeMaxItems      int32
	ScrapeFields        []ScrapeField
	ScrapeAbsoluteLinks bool
	ScrapePlainText     bool
	// User-provisioning worker fields (JobType == UserConnectorJobType, ADR-0123).
	// UserOp is the interned operation ("create" | "set-password" | "disable").
	// UserName identifies the account; UserEmail/UserDisplayName/UserRoles/UserPassword
	// are the create/update values — each a literal-or-FEEL value evaluated over the
	// instance's variables at call time. Each is the zero value for a non-user task and
	// is read only by the in-process user-provisioning worker, which the runner
	// dispatches by the user job type alone. There is no Worker and no credential:
	// the worker mutates the internal user store directly, gated to the system project.
	UserOp int32
	// Shop send task fields (JobType == ShopJobType, ADR-0429 §4). ShopMode is what the
	// task does ("outcome": state how the command this instance carries ended);
	// ShopAction the product action's key and ShopOutcome the ending it states. All
	// three are literals fixed at deploy (I5): the publish check reads them to know
	// that every action is answered, which a value computed at runtime would hide.
	ShopMode    string
	ShopAction  string
	ShopOutcome string
	// ShopProduct, ShopOrder and ShopPosition say which position a `command` task
	// acts on: the product is a literal fixed at deploy, the order and the position
	// literal-or-FEEL values evaluated over the instance's variables when the task
	// runs. ShopResultVar, when set, receives the command id the act was asked under.
	ShopProduct     string
	ShopOrder       RestExpr
	ShopPosition    RestExpr
	ShopResultVar   string
	UserName        RestExpr
	UserEmail       RestExpr
	UserDisplayName RestExpr
	UserRoles       RestExpr
	UserPassword    RestExpr
	// SCIM worker fields (JobType == ScimJobType, ADR-0153). ScimBaseURL is the
	// service provider's SCIM v2 base endpoint and ScimResource the resource-type path
	// segment ("Users"/"Groups") — each a literal-or-FEEL value evaluated over the
	// instance's variables at call time. ScimOp is the interned operation
	// ("create"|"get"|"replace"|"patch"|"delete"|"search"), which the worker maps to an
	// HTTP method. ScimResourceID addresses a single resource (get/replace/patch/
	// delete); ScimFilter is the SCIM filter for a search. ScimBody is the interned name
	// of the process variable holding the create/replace/patch payload (interned "" →
	// the whole variable scope, mirroring REST). Each is the zero value for a non-SCIM
	// task; ResultVar (above) receives the JSON response and Auth (above) the
	// bearer/basic/apiKey credential reference. Read only by the in-process SCIM worker.
	ScimBaseURL    RestExpr
	ScimResource   RestExpr
	ScimOp         int32
	ScimResourceID RestExpr
	ScimFilter     RestExpr
	ScimBody       int32
	// LDAP worker fields (JobType == LdapJobType, ADR-0154). LdapURL is the server
	// (ldap://host:389 or ldaps://host:636) and LdapBindDN the bind identity — each a
	// literal-or-FEEL value evaluated over the instance's variables at call time.
	// LdapBindSecret is the interned name of the server-side secret holding the bind
	// password (interned "" → an anonymous bind); LdapStartTLS upgrades a plain
	// connection with STARTTLS. LdapOp is the interned operation
	// ("search"|"add"|"modify"|"add-values"|"delete-values"|"delete"|
	// "modify-password"). LdapDN is the target entry
	// (add/modify/delete/modify-password); LdapBaseDN/LdapFilter/LdapScope (interned
	// "base"|"one"|"sub") address a search. LdapEntryVar is the interned name of the
	// process variable holding the add/modify attribute object; LdapNewPassword is the
	// modify-password value. Each is the zero value for a non-LDAP task; ResultVar
	// (above) receives a search's entries as a JSON array. Read only by the in-process
	// LDAP worker.
	LdapURL         RestExpr
	LdapBindDN      RestExpr
	LdapBindSecret  int32
	LdapStartTLS    bool
	LdapOp          int32
	LdapDN          RestExpr
	LdapBaseDN      RestExpr
	LdapFilter      RestExpr
	LdapScope       int32
	LdapEntryVar    int32
	LdapNewPassword RestExpr
	// LdapPageSize and LdapMaxEntries bound a search (ADR-0154, amended). The compiler
	// writes the effective value here — the default when the model authored none — so
	// the runtime interprets nothing (I5); 0 means unbounded, which a model asks for
	// explicitly. LdapClientCertSecret is the interned name of the secret holding a
	// PEM certificate+key bundle for a TLS client-certificate bind (interned "" →
	// none); with no bind DN it authenticates by SASL EXTERNAL.
	LdapPageSize         int32
	LdapMaxEntries       int32
	LdapClientCertSecret int32
	// SOAP worker fields (JobType == SoapJobType, ADR-0165). SoapEndpoint is the
	// web-service URL (from the WSDL's soap:address) — a literal-or-FEEL value evaluated
	// over the instance's variables at call time. SoapOp is the interned operation name,
	// used for diagnostics and as the default SOAPAction. SoapAction is the SOAPAction
	// header value (literal-or-FEEL; the interned SoapOp is used when it evaluates to
	// empty). SoapBody is the literal-or-FEEL XML payload placed inside the envelope's
	// <soap:Body> — the operation's request element, typically FEEL-interpolated with the
	// instance's variables. SoapVersion is the interned protocol version ("1.1"|"1.2"),
	// which selects the envelope namespace and how the action is carried. Each is the zero
	// value for a non-SOAP task; ResultVar (above) receives the parsed response body and
	// Auth (above) the bearer/basic/apiKey credential reference. Read only by the
	// in-process SOAP worker.
	SoapEndpoint RestExpr
	SoapOp       int32
	SoapAction   RestExpr
	SoapBody     RestExpr
	SoapVersion  int32
	// Active Directory worker fields (JobType == AdJobType, ADR-0166). AdURL is the
	// server (ldaps://host:636) and AdBindDN the bind identity — literal-or-FEEL values.
	// AdBindSecret is the interned name of the server-side bind-password secret (interned
	// "" → anonymous); AdStartTLS upgrades a plain connection. AdOp is the interned
	// operation ("create-user"|"set-password"|"enable"|"disable"|"add-group-member"|
	// "remove-group-member", "update-attributes", "move", "delete", "create-group",
	// "search").
	// AdDN is the target user or group entry; AdMemberDN is the
	// member added/removed for the group operations; AdEntryVar is the interned name of
	// the process variable holding the create-user attribute object; AdNewPassword is the
	// set-password value. Each is the zero value for a non-AD task. Read only by the
	// in-process AD worker.
	AdURL         RestExpr
	AdBindDN      RestExpr
	AdBindSecret  int32
	AdStartTLS    bool
	AdOp          int32
	AdDN          RestExpr
	AdMemberDN    RestExpr
	AdEntryVar    int32
	AdNewPassword RestExpr
	// AdNewDN is the move operation's target distinguished name (literal-or-FEEL): the
	// entry's new place in the tree, new relative name, or both — a mover in a
	// directory *is* a DN change, so one value expresses all three.
	AdNewDN RestExpr
	// Read fields, shared by the two AD operations that read a subtree instead of
	// acting on one entry: "sync" (a DirSync delta) and "search" (what is there now).
	// AdBaseDN is the base the read starts from and AdFilter narrows it —
	// literal-or-FEEL values. AdMaxEntries caps the result (0 = the worker's
	// default), and ResultVar (above) receives it.
	//
	// AdScope is the interned search scope ("base"|"one"|"sub", interned "" → -1 for
	// every other operation); a sync authors none, because AD answers DirSync only for
	// the whole subtree. AdCookieVar is the interned name of the variable holding the
	// sync's opaque resume cookie, which the operation reads *and writes back* so a
	// loop carries itself forward, and AdObjectSecurity sets the DirSync flag that
	// lets an account without the replication right read the changes it can see.
	AdBaseDN         RestExpr
	AdFilter         RestExpr
	AdScope          int32
	AdCookieVar      int32
	AdMaxEntries     int32
	AdObjectSecurity bool
	// Generic SQL worker fields (JobType == SqlJobType, ADR-0173). Worker
	// (above) names the database the *worker* is configured for — a SQL task carries
	// no address and no credential, because the DSN never enters the engine. SqlOp is
	// the interned operation ("query"|"query-one"|"execute").
	//
	// SqlStatement is the interned SQL text, and it is an interned string rather than
	// a RestExpr on purpose: a RestExpr could hold a FEEL expression, and a statement
	// assembled from process data is an injection with no quoting bug required. Data
	// reaches the statement only through SqlParamsVar — the interned name of the
	// process variable whose value is bound to the statement's placeholders (a JSON
	// array binds positionally, an object binds by name). SqlMaxRows caps a query's
	// result set (0 = the worker's default); exceeding it fails the job rather than
	// truncating, since a short result set is a wrong answer. ResultVar (above)
	// receives the rows, the single row, or the affected count.
	//
	// Each is the zero value for a non-SQL task. No in-process worker reads these:
	// they are resolved onto the job and read by a worker (ADR-0164/0168).
	SqlOp        int32
	SqlStatement int32
	SqlParamsVar int32
	SqlMaxRows   int32
	// Microsoft Entra ID worker fields (JobType == EntraJobType, ADR-0172).
	// Worker (above) names the tenant the *worker* is configured for; a task
	// carries no tenant id and no client secret, because they never enter the engine.
	// EntraConnector, when its Expr is non-nil, resolves that tenant name at runtime
	// instead — a literal-or-FEEL value (e.g. "=tenant") for a process that serves
	// more than one tenant. It overrides Worker at resolve time; Worker then
	// still holds the authored text ("=tenant") for introspection. Only entra offers
	// this, because it is worker-only and no deploy-time credential lookup keys off a
	// fixed worker name (ADR-0172).
	// EntraOp is the interned lifecycle operation ("create-user"|"get-user"|
	// "update-user"|"delete-user"|"enable"|"disable"|"add-group-member"|
	// "remove-group-member"). EntraUserID and EntraGroupID are literal-or-FEEL values
	// addressing the user (a UPN or object id) and the group. EntraAttributesVar is
	// the interned name of the process variable holding the directory properties for
	// create-user and update-user; ResultVar (above) receives what Graph returned.
	//
	// EntraFilter, EntraSelect, EntraPageSize and EntraMaxUsers configure list-users
	// and are zero on every other operation, which the compiler enforces rather than
	// ignores — except EntraSelect, which get-user and get-group also take, because
	// Graph's default property set leaves out what a process may need to read
	// (ADR-0172, amended). EntraFilter is a literal-or-FEEL OData $filter and EntraSelect
	// the interned $select projection. EntraPageSize is the $top asked of each request
	// (0 leaves Graph its own page size) and EntraMaxUsers caps what may reach the
	// result variable (0 is unbounded); the compiler has already applied the defaults,
	// so the runtime interprets nothing (I5). EntraSearch is a literal-or-FEEL $search
	// term and EntraAdvanced asks for Graph's advanced query support; a search sets
	// the flag on its own, because Graph offers no other way to run one.
	//
	// Each is the zero value for a non-Entra task. No in-process worker reads these:
	// they are resolved onto the job and read by a worker (ADR-0164/0168).
	EntraOp            int32
	EntraConnector     RestExpr // literal-or-FEEL tenant name; when Expr != nil it overrides Worker at resolve time
	EntraUserID        RestExpr
	EntraGroupID       RestExpr
	EntraNewPassword   RestExpr // reset-password's new secret (literal-or-FEEL), zero otherwise
	EntraAttributes    RestExpr // inline attributes JSON compiled to a FEEL context, zero when a variable is named instead
	EntraAttributesVar int32
	EntraFilter        RestExpr
	EntraSelect        int32
	EntraPageSize      int32
	EntraMaxUsers      int32
	EntraSearch        RestExpr
	EntraAdvanced      bool
	// EntraDeltaLink resumes a change-tracking query (delta-users, delta-groups): a
	// literal-or-FEEL value naming the @odata.deltaLink a previous run returned, empty
	// (a fresh full enumeration) on the first run. It is the zero RestExpr on every
	// other operation, which the compiler enforces (ADR-0172).
	EntraDeltaLink RestExpr
	// Directory-file worker fields (JobType == LdifJobType, ADR-0171). LdifFormat
	// is the interned file format ("ldif" | "dsml") and LdifOperation the direction
	// ("read" | "write"). LdifSource is the interned name of the variable holding the
	// file text (read) or the entries (write); LdifResult the variable receiving the
	// entries (read) or the rendered file (write).
	//
	// Unlike the text-file worker there is no default format: a file is LDIF or it
	// is DSML, and guessing from the bytes is how a malformed file becomes a
	// plausible-looking empty result.
	LdifFormat    int32
	LdifOperation int32
	LdifSource    int32
	LdifResult    int32
	// Jira worker fields (JobType == JiraJobType, ADR-0201).
	// Worker (above) names the server-registered Jira instance — its base URL and
	// credential live in the managed worker store and the vault, never in a model.
	// JiraOp is the interned operation ("create-issue"|"get-issue"|"update-issue"|
	// "transition-issue"|"add-comment"|"assign-issue"|"search"|"search-users"), and it
	// decides which of the rest are populated; the compiler refuses a value on an
	// operation that does not use it, so a field can never be quietly ignored at call
	// time.
	//
	// JiraIssue addresses one issue by key or id (every operation but create and the two
	// searches). JiraProject, JiraIssueType, JiraSummary and JiraDescription are the
	// created issue's core fields — summary and description also carry an update.
	// JiraTransition names the workflow transition to perform, by id or by the name
	// shown in Jira; JiraComment is a comment body (its own operation, and optionally
	// alongside a transition); JiraAssignee is the account the issue is handed to.
	// JiraJQL is an issue search's query and JiraQuery an account search's term — a
	// fragment of a display name or an address, which JiraProject may restrict to the
	// accounts one project can assign. JiraMaxResults caps what either search may land in
	// the result variable — the compiler has already applied the default, so the runtime
	// interprets nothing (I5).
	//
	// JiraFields are extra issue fields as name/literal-or-FEEL pairs (create, update
	// and transition), which is how a custom field or a field this worker does not
	// name is set. Each RestExpr is a literal-or-FEEL value evaluated over the
	// variables the task sees at call time; all are the zero value for a non-Jira task.
	// ResultVar (above) receives what Jira returned, for the operations that return
	// anything.
	JiraOp          int32
	JiraIssue       RestExpr
	JiraProject     RestExpr
	JiraIssueType   RestExpr
	JiraSummary     RestExpr
	JiraDescription RestExpr
	JiraTransition  RestExpr
	JiraComment     RestExpr
	JiraAssignee    RestExpr
	JiraJQL         RestExpr
	JiraQuery       RestExpr
	JiraMaxResults  int32
	JiraFields      []RestKV
	// Google Sheets fields (JobType == GoogleSheetsJobType,
	// ADR-0235). Connector (above) names the Worker — the field
	// keeps that name because the BPMN attribute it is read from does; its credential
	// lives in the Worker store and the vault, never in a model. SheetsOp is the interned operation ("create-spreadsheet"|
	// "add-sheet"|"read-range"|"write-range"|"append-row"|"clear-range"|"delete-sheet"|
	// "delete-spreadsheet"), and it decides which of the rest are populated; the
	// compiler refuses a value on an operation that does not use it, so a field can
	// never be quietly ignored at call time.
	//
	// SheetsID addresses the spreadsheet (every operation but create). SheetsTab is a
	// tab title — the tab added or deleted, or the first tab of a new file — and
	// SheetsRange the A1 range the four cell-level operations act on, which may name
	// its own sheet ("Anträge!A2:F"). SheetsTitle and SheetsFolder are a new
	// spreadsheet's name and the Drive folder it is moved into. SheetsValues is what
	// the two writing operations write: one literal-or-FEEL value whose result is a
	// list of rows, a list of objects, or one row of cells.
	//
	// SheetsColumns, SheetsInput and SheetsHeader are compiled structure rather than
	// authored values, because each decides the *shape* of a call rather than its
	// content, and a shape that differed per token would not be one. SheetsColumns
	// names the fields and their order a list of objects is projected through;
	// SheetsInput is the interned value-input mode ("user"|"raw", already defaulted so
	// the runtime interprets nothing, I5); SheetsHeader makes a read answer with
	// objects keyed by the range's first row instead of raw rows.
	//
	// Each RestExpr is a literal-or-FEEL value evaluated over the variables the task
	// sees at call time; all are the zero value for a non-Sheets task. ResultVar
	// (above) receives what Google returned, for the operations that return anything.
	SheetsOp      int32
	SheetsID      RestExpr
	SheetsTab     RestExpr
	SheetsRange   RestExpr
	SheetsTitle   RestExpr
	SheetsFolder  RestExpr
	SheetsValues  RestExpr
	SheetsColumns []string
	SheetsInput   int32
	SheetsHeader  bool
	// Discord fields (JobType == DiscordJobType, ADR-0258). Connector
	// (above) names the configured Discord Worker — the field keeps that name because
	// the BPMN attribute it is read from does; its bot token lives in the Worker store
	// and the vault, never in a model. DiscordOp is the interned operation
	// ("send-message"|"edit-message"|"delete-message"|"get-message"|"list-messages"|
	// "create-thread"), and it decides which of the rest are populated; the compiler
	// refuses a value on an operation that does not use it, so a field can never be
	// quietly ignored at call time.
	//
	// DiscordChannel addresses the channel every operation acts in — a thread is a
	// channel in Discord, so replying in one is a send addressing the thread's id
	// rather than an operation of its own. DiscordMessage addresses one message (the
	// three that act on one, and optionally create-thread, where naming a message is
	// what hangs the thread under it instead of starting a standalone one).
	// DiscordContent is a message body and DiscordName a new thread's title.
	//
	// DiscordAfter is a list's lower bound: the message id to read after. It is
	// exclusive and Discord orders by id, so a process can page a channel forward
	// without re-reading what it already has. DiscordMaxResults caps what a list may
	// return, already defaulted by the compiler so the runtime interprets nothing (I5).
	//
	// DiscordFields are extra request-body properties as name/literal-or-FEEL pairs,
	// each keeping the JSON shape its value had — how a model reaches embeds,
	// allowed_mentions or components without this type naming every property Discord
	// will ever add. They are merged last, so a model can override what the worker
	// composed.
	//
	// Each RestExpr is a literal-or-FEEL value evaluated over the variables the task
	// sees at call time; all are the zero value for a non-Discord task. ResultVar
	// (above) receives what Discord returned, for the operations that return anything.
	DiscordOp         int32
	DiscordChannel    RestExpr
	DiscordMessage    RestExpr
	DiscordContent    RestExpr
	DiscordName       RestExpr
	DiscordAfter      RestExpr
	DiscordMaxResults int32
	DiscordFields     []RestKV
	// AI task fields (JobType == AiTaskJobType, ADR-0256). Connector (above) names the
	// agent Worker holding the endpoint, the credential and the wire format;
	// a task carries none of those, because a provider is configured and not authored.
	//
	// AgentModel is the interned language model to ask, -1 when the task names none
	// and inherits the Worker's configured default. It is authored rather than
	// configured for the same reason a decision id or a REST URL is: it says what the
	// step does, not how the deployment reaches anything, and a process wanting a
	// small model for a classification and a strong one for the advice beside it
	// should not need two Workers over one string.
	//
	// AgentPrompt is the question — a literal-or-FEEL value evaluated over the
	// variables the task sees at call time — and ResultVar (above) receives the
	// answer. There is no tool list: a step with tools is the ad-hoc container
	// (ADR-0253), not this.
	AgentModel  int32
	AgentPrompt RestExpr
	// Object-store fields (JobType == S3JobType, ADR-0442).
	// Connector (above) names the configured S3 Worker — the field keeps that name
	// because the BPMN attribute it is read from does; its access key lives in the
	// Worker store and the vault, never in a model. S3Op is the interned operation
	// ("put-object"|"get-object"|"head-object"|"list-objects"|"copy-object"|
	// "delete-object"|"presign-get"|"presign-put"), and it decides which of the rest are
	// populated; the compiler refuses a value on an operation that does not use it, so a
	// field can never be quietly ignored at call time.
	//
	// S3Bucket addresses the bucket every operation acts in and S3Key the one object the
	// seven object-level operations address — a listing has no key, because it addresses
	// S3Prefix instead. S3Content is the document a put writes and S3ContentType what
	// those bytes are, which a presigned upload also *binds*: a client using that URL
	// must send the same type.
	//
	// S3Prefix, S3Delimiter, S3StartAfter and S3MaxKeys are a listing's shape — what to
	// match, how to roll it up at a separator, where to resume from, and how much to
	// answer with. S3SourceBucket and S3SourceKey are what a copy copies from, which is
	// how a document moves between prefixes without its bytes entering this process.
	// S3ExpiresIn is a presigned URL's lifetime in seconds.
	//
	// S3Encoding, S3MaxKeys and S3ExpiresIn are compiled structure rather than authored
	// values, because each decides the shape of a call rather than its content and a
	// shape that differed per token would not be one; the compiler has already applied
	// their defaults, so the runtime interprets nothing (I5). S3Metadata are extra
	// request headers as name/literal-or-FEEL pairs — user metadata under
	// x-amz-meta-<name>, or an x-amz-* header sent as itself, which is how a model
	// reaches server-side encryption or a storage class.
	//
	// Each RestExpr is a literal-or-FEEL value evaluated over the variables the task
	// sees at call time; all are the zero value for a non-S3 task. ResultVar (above)
	// receives what the store returned, for the operations that return anything.
	S3Op           int32
	S3Bucket       RestExpr
	S3Key          RestExpr
	S3Content      RestExpr
	S3ContentType  RestExpr
	S3Encoding     int32
	S3Prefix       RestExpr
	S3Delimiter    RestExpr
	S3StartAfter   RestExpr
	S3MaxKeys      int32
	S3SourceBucket RestExpr
	S3SourceKey    RestExpr
	S3ExpiresIn    int32
	S3Metadata     []RestKV
	// Exchange fields (JobType == ExchangeJobType, ADR-0462).
	// Connector (above) names the configured Exchange Worker, and ExchangeConnector
	// carries it as literal-or-FEEL when a model picks the organization at runtime, as
	// Entra's does. ExchangeOp is the interned operation — a row of
	// connector/exchange/catalog — and ExchangeCmdlet the interned Get- cmdlet of the
	// generic read, the empty name on every other operation.
	//
	// ExchangeParameters is the authored parameter object, compiled from the model's
	// JSON template to one FEEL context at deploy (I5); ExchangeParametersVar names the
	// variable holding the object instead. At most one is set. ExchangeMaxResults bounds
	// a listing — compiled structure, with its default already applied — and is zero on
	// every other operation. ResultVar (above) receives what the cmdlet returned.
	ExchangeConnector     RestExpr
	ExchangeOp            int32
	ExchangeCmdlet        int32
	ExchangeParameters    RestExpr
	ExchangeParametersVar int32
	ExchangeMaxResults    int32
	// Teams Phone fields (JobType == TeamsPhoneJobType, ADR-0463).
	// Connector (above) names the configured tenant; its app certificate lives with the
	// worker, never in a model. TeamsPhoneOp is the interned operation
	// ("resolve-users"|"ensure-resource-account"|"ensure-call-queue"|
	// "ensure-auto-attendant"|"remove-auto-attendant"|"remove-call-queue"|
	// "remove-resource-account"), and TeamsPhoneArgs its values keyed by attribute name:
	// the authored ones literal-or-FEEL, the static settings literals the compiler
	// validated and defaulted. The compiler refuses a value the operation does not use,
	// so none is quietly ignored at call time. All are the zero value for a non-Teams
	// task; ResultVar (above) receives the operation's answer.
	TeamsPhoneOp   int32
	TeamsPhoneArgs []RestKV
	// Google Contacts fields (JobType == GoogleContactsJobType,
	// ADR-0476). Connector (above) names the configured address
	// book, and GoogleContactsConnector carries it as literal-or-FEEL when a model picks
	// the account at runtime. GoogleContactsOp is the interned operation — a row of
	// connector/googlecontacts/catalog. ContactID, Query, Field and Group are the
	// literal-or-FEEL values the operation takes; GoogleContactsContact is the authored
	// contact object compiled from the model's JSON template to one FEEL context at
	// deploy (I5), and GoogleContactsContactVar names the variable holding it instead.
	// GoogleContactsMaxResults bounds a listing, with its default applied, and is zero on
	// every other operation. All are the zero value for a task of another kind.
	GoogleContactsConnector  RestExpr
	GoogleContactsOp         int32
	GoogleContactsContactID  RestExpr
	GoogleContactsQuery      RestExpr
	GoogleContactsField      RestExpr
	GoogleContactsGroup      RestExpr
	GoogleContactsContact    RestExpr
	GoogleContactsContactVar int32
	GoogleContactsMaxResults int32
	// CardDAV fields (JobType == CardDAVJobType, ADR-0490): Google
	// Contacts' fields, for the CardDAV Worker Type's own task. Connector (above) names
	// the configured address book, and CardDAVConnector carries it as literal-or-FEEL.
	// CardDAVOp is the interned operation — a row of connector/carddav/catalog.
	// CardDAVContact is the authored contact object compiled to one FEEL context at
	// deploy (I5), and CardDAVContactVar names the variable holding it instead.
	// CardDAVMaxResults bounds a listing, with its default applied, and is zero on every
	// other operation. All are the zero value for a task of another kind.
	CardDAVConnector  RestExpr
	CardDAVOp         int32
	CardDAVContactID  RestExpr
	CardDAVQuery      RestExpr
	CardDAVField      RestExpr
	CardDAVGroup      RestExpr
	CardDAVContact    RestExpr
	CardDAVContactVar int32
	CardDAVMaxResults int32
	// wikiwikibangbang fields (JobType == WikiwikibangbangJobType,
	// ADR-0498). Connector (above) names the configured wiki,
	// and WikiConnector carries it as literal-or-FEEL. WikiOp is the interned operation —
	// a row of connector/wikiwikibangbang/catalog. WikiProperties is the authored
	// properties object compiled to one FEEL context at deploy (I5), and
	// WikiPropertiesVar names the variable holding it instead. A literal WikiBlocks is
	// the JSON array the compiler checked. WikiMaxResults bounds a query, with its
	// default applied, and is zero on every other operation. All are the zero value for a
	// task of another kind.
	WikiConnector     RestExpr
	WikiOp            int32
	WikiItem          RestExpr
	WikiSpace         RestExpr
	WikiItemType      RestExpr
	WikiParent        RestExpr
	WikiTitle         RestExpr
	WikiProperties    RestExpr
	WikiPropertiesVar int32
	WikiMatchField    RestExpr
	WikiLabels        RestExpr
	WikiText          RestExpr
	WikiBlocks        RestExpr
	WikiTransition    RestExpr
	WikiComment       RestExpr
	WikiQuery         RestExpr
	WikiMaxResults    int32
}

ConnectorTaskDetail is the per-connector-task data a behavior needs at runtime. A task delegates to a server-registered worker evaluated off the hot path by a job worker (ADR-0036). Like a service task it runs as a job, so it carries a JobType (a reserved worker sentinel) the in-process worker worker subscribes to, and Worker names the server-registered worker to resolve at runtime. The JobType also selects which Worker Type this is, and thus which of the kind-specific fields below are populated:

  • clio "write-events" (JobType == ClioWriteJobType): Worker names the server-registered clio instance; Subject and EventType are the interned clio coordinates the appended event lands under. The event body is what the task's zeebe:ioMapping inputs map, or — for a task with none — every variable it sees (ADR-0174).
  • clio "query" (JobType == ClioQueryJobType): Worker names the clio instance; the task reads projected state or runs a stored query and writes the result into ResultVar. Either ClioQuery (a run_query query string) is set — then the worker runs that query — or Subject (with the optional ReduceSpec projection) is set — then the worker reads get_state for that subject.
  • clio "read" (JobType == ClioReadJobType): Worker names the clio instance; Subject is the subject whose events are read (up to Limit, 0 = the worker's default) into ResultVar as a JSON array.
  • HTTP REST (JobType == RestJobType): Method and Url are the interned request method (e.g. "POST") and the full endpoint URL authored in the model (ADR-0067, revising ADR-0036 for REST); a method that carries one gets the body described below; ResultVar, if set, is the process variable the JSON response is written back into on completion.
  • SharePoint (JobType == SharePointJobType for create-item, SharePointOpsJobType for every other operation): Worker names the server-registered SharePoint provider; SharePointOp is the operation, Site addresses the site, List the list or document library, and the SharePoint* fields below the rest of what the operation takes (all literal-or-FEEL); what Graph returned is written into ResultVar when set (ADR-0141, amended).
  • BMC Remedy (JobType == RemedyJobType): Worker names the server-registered Remedy instance; RemedyForm and RemedyFields are the form and the entry's field values (literal-or-FEEL) an incident/entry is created with through the AR System REST API; ResultVar, if set, receives the created entry's id (ADR-0106).
  • Google Sheets (JobType == GoogleSheetsJobType): Connector names the Worker whose Google credential the server holds; SheetsOp is the spreadsheet operation and the Sheets* fields below are the values and the shape it takes; ResultVar, if set, receives what Google returned.
  • Jira (JobType == JiraJobType): Worker names the server-registered Jira instance; JiraOp is the issue-tracker operation and the Jira* fields below are the values it takes (all literal-or-FEEL); ResultVar, if set, receives what Jira returned (ADR-0201).
  • Discord (JobType == DiscordJobType): Connector names the configured Discord Worker whose bot token the server holds; DiscordOp is the chat operation and the Discord* fields below are the values it takes (all literal-or-FEEL); ResultVar, if set, receives what Discord returned (ADR-0258).
  • web scrape (JobType == WebScrapeJobType): Url is the model-authored page to fetch (literal-or-FEEL, like REST); ScrapeSelector is the CSS selector whose matches are extracted; ScrapeAttribute names the HTML attribute to read from each match (-1 → each match's text content); ResultVar receives the extracted values as a JSON array (ADR-0118). With ScrapeFields set, the selector picks items instead and each match becomes an object of those fields (ADR-0231).

Unused fields for a given kind are -1 (Intern maps that back to ""); Limit is 0 when unset. No kind carries its body in the detail: where a payload is a variable scope — the clio event body, the REST request body, the SCIM body with no body variable named — it is the task's zeebe:ioMapping inputs, or everything the task sees when it maps none (ADR-0174).

type Constant added in v0.12.0

type Constant struct {
	Name  string
	Type  string // declared type: string, number, boolean or json
	Value string // the declared value (a bound constant's fallback), as authored
	Kind  expr.ValueKind
	Bool  bool
	Text  string

	// Namespace is where the value comes from and is read: "" for a process constant,
	// which is a root variable of its own, ApplicationNamespace or ServerNamespace for one
	// the installation holds, which is a member of that namespace (Bound).
	Namespace string
	// Info marks a member Atlas fills itself — application.name, server.environment —
	// rather than one an operator holds.
	Info        bool
	HasFallback bool // a bound constant declares a value to use when the installation holds none
}

Constant is one process constant as the engine seeds it: its name, the type and value the model declares, and that value in the canonical (kind, bool, text) form a variable is stored as — computed once at deploy so the engine writes it without parsing (I5).

A constant bound to its application (FromApplication) takes the application's value of the same name on the installation where the instance starts; Kind, Bool and Text are then its fallback, meaningful only when HasFallback is set.

func (*Constant) Bound added in v0.13.0

func (k *Constant) Bound() bool

Bound reports whether the constant's value comes from the installation rather than the model.

type CsvConfig added in v0.2.0

type CsvConfig struct {
	Source    string
	Result    string
	Delimiter string
	HasHeader bool
	Columns   []string
	Retries   int32
	// Format is the file format and Operation the direction; empty means csv and
	// read. Widths carries each column's character width for a fixed-width file,
	// positionally alongside Columns.
	Format    string
	Operation string
	Widths    []int32
}

CsvConfig is the deploy-time configuration of a CSV-to-JSON task (ADR-0139). Source names the process variable holding the raw CSV text (empty → the worker's default "csvText"); Result the variable the parsed rows are written to (empty → "rows"); Delimiter the field delimiter (empty → ","); HasHeader whether the first row is a header; Columns the field names (empty → derive them from the header row). All are interned deploy-time data (I5).

type DataInputAssociation

type DataInputAssociation struct {
	DataObject int32 // interned source data-object name → index
	Variable   int32 // interned target process-variable name → index
	Value      *expr.Compiled
}

DataInputAssociation is one compiled <dataInputAssociation> on an activity: it reads a data object into a process variable when the activity activates, so the activity's FEEL can see it (ADR-0059). DataObject is the interned source data-object name (resolved from the association's sourceRef); Variable is the interned target process-variable name (its targetRef) the read value is written into; Value is the optional <assignment><from> FEEL transform, evaluated over the instance's variables plus the source object bound under its name — nil copies the object's value verbatim.

type DataObjectWrite added in v0.7.0

type DataObjectWrite struct {
	Value      *expr.Compiled
	TargetPath int32
}

DataObjectWrite is one <assignment> of a data output association: a value and the member it goes into. Value is the FEEL expression (the assignment's <from>) evaluated over the instance's variables to produce what is written.

TargetPath is the interned member path (the assignment's <to>, e.g. "name" or "customer.name") the write sets within a structured data object, -1 to write the whole value (ADR-0060). A path write reads the object's current JSON, sets that member, and keeps the rest.

type DataOutputAssociation

type DataOutputAssociation struct {
	DataObject  int32 // interned target data-object name → index
	TargetState int32
	Writes      []DataObjectWrite
}

DataOutputAssociation is one compiled <dataOutputAssociation> on an activity: it writes a data object and advances that object's data state when the activity completes (ADR-0058). DataObject is the interned target data-object name; TargetState is the interned data state the write moves the object into (from the target <dataObjectReference>'s <dataState>), -1 to keep the object's current state.

Writes are the association's <assignment> elements, in document order — BPMN gives a data association `assignment [0..*]`, so one arrow may set several members of one object and a step that captures a form's worth of fields need not be drawn as one arrow per field (ADR-0350). They are applied in order onto one accumulating value and appended as one event, so the order is not presentation: two writes to the same member mean the later one. Empty is ADR-0058's state-only transition, which keeps the object's value and moves only its state.

type DataWrite added in v0.7.0

type DataWrite struct {
	Value      *expr.Compiled
	TargetPath string
}

DataWrite is one assignment as an author states it, before interning: a FEEL value and the member path it targets (empty for the whole value). It is the builder's argument shape; DataObjectWrite is the compiled one.

type DecisionBinding

type DecisionBinding int32

DecisionBinding selects which DMN model version a local business rule task evaluates against (ADR-0063). It mirrors Camunda's zeebe:calledDecision bindingType. It applies only to local decisions; a central (worker) decision resolves through its worker, so Binding is ignored when Worker is set.

const (
	// BindingLatest evaluates the newest deployed version of the decision (the
	// default, matching Camunda). It is zero so an unset binding means "latest".
	// When "newest" is settled depends on the deployment's binding policy: when the
	// job is worked for a definition deployed from ADR-0423
	// on, at deploy time for one deployed under ADR-0319.
	BindingLatest DecisionBinding = iota
	// BindingDeployment evaluates the decision snapshotted with this process's own
	// deployment (the ADR-0014 behavior): pinned and reproducible.
	BindingDeployment
	// BindingVersion evaluates the one deployed version of the decision the task
	// names (atlas:version), resolved to its decision deployment when the process is
	// deployed (ADR-0423).
	BindingVersion
	// BindingVersionTag is Camunda's `versionTag` binding, which Atlas does not
	// support: a version cannot carry a tag here. It is kept apart rather than read
	// as latest, so the deploy can refuse it instead of running whatever is newest;
	// a definition already deployed with it keeps evaluating the newest version, as
	// it always has.
	BindingVersionTag
)

func (DecisionBinding) String

func (b DecisionBinding) String() string

String renders a binding as the lower-case token used on the wire and in the Modeler (`bindingType`): "latest" or "deployment". Any unknown value is reported verbatim so a drift is visible rather than silently mapped to latest.

type DecisionInputMapping

type DecisionInputMapping struct {
	Target string         // the decision input name this value binds to
	Source *expr.Compiled // FEEL expression evaluated over instance variables
}

DecisionInputMapping is one explicit input to a DMN decision: the decision's input name (Target) fed by a FEEL expression (Source) evaluated over the process instance's variables at evaluation time. It is the variable-driven replacement for a business rule task's static inputs (ADR-0014): the source expression is compiled once at deploy time (invariant I5) and the DMN worker evaluates it off the hot path against live variables, so a decision routes on real instance data.

type DecisionVersionRef added in v0.8.0

type DecisionVersionRef struct {
	DecisionID string
	Version    int32
}

DecisionVersionRef names one deployed version of a decision: what a version-bound business rule task evaluates.

type Deployable

type Deployable struct {
	Process     *CompiledProcess
	PoolName    string
	ProcessName string
}

Deployable is one executable process compiled from a model, plus the display metadata a collaboration provides. PoolName is the participant (pool) name that references the process — "" for a standalone <process> outside any <collaboration>; ProcessName is the process's own name attribute.

func ParseAll

func ParseAll(baseKey uint64, version int32, r io.Reader) ([]Deployable, error)

ParseAll compiles every executable process in a model — the collaboration case, where a <collaboration> has several <participant> pools, each referencing a <process>. A process is executable (and thus returned) iff it has a start event; a participant whose process is a black box (no start event, or none) is skipped rather than erroring, since a message-flow counterpart pool is often left unmodeled. The i-th executable process (document order) is keyed baseKey+i, so a caller assigning keys sequentially advances its counter by len(result). It errors only if the model has no executable process at all.

type DiscordConfig added in v0.5.0

type DiscordConfig struct {
	Connector  string
	Operation  string
	Channel    RestExpr
	Message    RestExpr
	Content    RestExpr
	Name       RestExpr
	After      RestExpr
	MaxResults int32
	Fields     []RestKV
	ResultVar  string
	Retries    int32
}

DiscordConfig is the deploy-time configuration of a Discord task (ADR-0258). Worker names the configured Discord Worker (its bot token lives server-side, never in the model) and Operation is the chat operation. The remaining values are the ones that operation takes — literal-or-FEEL values (the parser compiles the FEEL ones) evaluated over the variables the task sees at call time. MaxResults is a list's cap and After its lower bound, both already defaulted by the compiler so the runtime interprets nothing (I5). ResultVar, if set, is the process variable what Discord returned is written back into.

type EntraConfig added in v0.3.0

type EntraConfig struct {
	Connector string
	// ConnectorExpr carries the worker name as a literal-or-FEEL value when the
	// author wants the tenant chosen at runtime (e.g. "=tenant" on a multi-tenant
	// joiner). It is the zero RestExpr for the ordinary static case, where Worker
	// alone names the tenant. Only entra takes this: the kind is worker-only, so no
	// deploy-time credential lookup keys off a fixed name (ADR-0172).
	ConnectorExpr RestExpr
	Op            string
	UserID        RestExpr
	GroupID       RestExpr
	NewPassword   RestExpr
	Attributes    RestExpr
	AttributesVar string
	ResultVar     string
	Filter        RestExpr
	Select        string
	PageSize      int32
	MaxUsers      int32
	Search        RestExpr
	Advanced      bool
	// DeltaLink is the resume cursor for a change-tracking query (delta-users,
	// delta-groups): a literal-or-FEEL @odata.deltaLink from a previous run, empty on
	// the first. Zero on every other operation.
	DeltaLink RestExpr
	Retries   int32
}

EntraConfig is the deploy-time configuration of a Microsoft Entra ID worker task (ADR-0172). Worker names the tenant the worker is configured for — a task carries no tenant id and no client secret, because they never enter the engine. Op is the lifecycle operation. UserID and GroupID are literal-or-FEEL values addressing the user (a UPN or object id) and the group; AttributesVar names the process variable holding the directory properties for create-user and update-user; ResultVar receives what Graph returned (empty = discard).

Filter, Select, PageSize, MaxUsers, Search and Advanced configure list-users: the OData $filter (literal-or-FEEL), the $select projection, the $top per request, the cap on what may reach the result variable, the $search term (literal-or-FEEL), and whether the query asks for Graph's advanced query support. The compiler has already applied their defaults, set Advanced for a search, and refused all of them on the operations that return one object or none.

type ErrorEndDetail

type ErrorEndDetail struct {
	ErrorCode string
}

ErrorEndDetail is the per-error-end-event data the runtime needs: the code it throws (ADR-0089). A code-less error end throws "", which a code-less catch-all catches. It is its own small table (an error end carries no name, correlation key, or schedule).

type EscalationDetail added in v0.2.0

type EscalationDetail struct {
	EscalationCode string
}

EscalationDetail is the per-escalation-event data the runtime needs: the code it raises (ADR-0125). Shared by the escalation throw and end events (like CompensationDetail is shared by the compensation throw and end), since both just carry the escalation code. A code-less escalation raises "", which a code-less catch-all catches.

type EventSubProcessDetail

type EventSubProcessDetail struct {
	StartNode      int32 // the handler's inner start event node id
	Interrupting   bool  // true = terminate the parent scope's other work on trigger (isInterrupting)
	Kind           BoundaryEventKind
	Schedule       TimerSchedule  // BoundaryTimer: when the trigger fires
	MessageName    string         // BoundaryMessage: the message it subscribes to
	CorrelationKey *expr.Compiled // BoundaryMessage: correlation-key expression (ADR-0020)
	SignalName     string         // BoundarySignal: the signal it subscribes to (ADR-0088)
	ErrorCode      string         // BoundaryError: the error code it catches; "" is a catch-all (ADR-0089)
	EscalationCode string         // BoundaryEscalation: the escalation code it catches; "" is a catch-all (ADR-0125)
	Condition      *expr.Compiled // BoundaryConditional: the boolean FEEL condition it fires on (ADR-0137)
}

EventSubProcessDetail is the per-event-subprocess data the runtime needs to arm its trigger (ADR-0082). An event subprocess (`<subProcess triggeredByEvent="true">`) is not entered by a sequence flow; instead its start event's event definition is armed while the parent scope runs. Interrupting (from the start event's isInterrupting, default true) decides whether firing terminates the parent scope's other work before the handler runs. Kind reuses BoundaryEventKind: the timer field applies for a timer trigger, the message fields for a message trigger. StartNode is the handler's inner start event, seeded (like any message/timer start, flowing straight on) when the handler is activated on a trigger.

type ExchangeConfig added in v0.15.0

type ExchangeConfig struct {
	Worker        string
	WorkerExpr    RestExpr
	Op            string
	Cmdlet        string
	Parameters    RestExpr
	ParametersVar string
	MaxResults    int32
	ResultVar     string
	Retries       int32
}

ExchangeConfig is the deploy-time configuration of an Exchange task (ADR-0462). Worker names the configured Exchange Worker and WorkerExpr carries it as literal-or-FEEL when the organization is chosen at runtime, as Entra's does; Op is a row of connector/exchange/catalog; Cmdlet is the Get- cmdlet of the generic read and empty on every other operation. Parameters is the authored parameter object compiled to one FEEL context, ParametersVar the variable holding it instead; the compiler has refused a model that sets both. MaxResults bounds a listing and is zero on every other operation.

type GoogleContactsConfig added in v0.20.0

type GoogleContactsConfig struct {
	Worker     string
	WorkerExpr RestExpr
	Op         string
	ContactID  RestExpr
	Query      RestExpr
	Field      RestExpr
	Group      RestExpr
	Contact    RestExpr
	ContactVar string
	MaxResults int32
	ResultVar  string
	Retries    int32
}

GoogleContactsConfig is the deploy-time configuration of a Google Contacts task (ADR-0476). Worker names the configured address book and WorkerExpr carries it as literal-or-FEEL when a process picks the account at runtime; Op is a row of connector/googlecontacts/catalog. ContactID, Query, Field and Group are literal-or-FEEL values. Contact is the authored contact object compiled to one FEEL context, ContactVar the variable holding it instead; the compiler has refused a model that sets both. MaxResults bounds a listing, with its default applied, and is zero on every other operation.

type GoogleSheetsConfig added in v0.5.0

type GoogleSheetsConfig struct {
	Worker      string
	Operation   string
	Spreadsheet RestExpr
	Sheet       RestExpr
	Range       RestExpr
	Title       RestExpr
	Folder      RestExpr
	Values      RestExpr
	Columns     []string
	Input       string
	Header      bool
	ResultVar   string
	Retries     int32
}

GoogleSheetsConfig is the deploy-time configuration of a Google Sheets task (ADR-0235). Worker names the Google identity an operator configured (whose credential lives server-side, never in the model) and Operation is the spreadsheet operation. It is read from the task's `connector="…"` attribute, which keeps the pre-ADR-0203 spelling because it is authored in deployed models. The remaining values are the ones that operation takes — literal-or-FEEL values (the parser compiles the FEEL ones) evaluated over the variables the task sees at call time.

Columns, Input and Header are compiled structure rather than authored values: they decide the *shape* of what is written or read, and a shape that could differ on every token is not a shape. The compiler has already applied the Input default, so the runtime interprets nothing (I5). ResultVar, if set, is the process variable what Google returned is written back into.

type IOMapping

type IOMapping struct {
	Target int32          // interned target variable name → index
	Source *expr.Compiled // FEEL expression evaluated to produce the value
	// Verbatim marks an output mapping that hands a value its process declares personal
	// out under that value's own name, source "=iban" for target "iban" (ADR-0314,
	// amended). The engine copies the stored record — the sealed envelope it cannot open
	// — unchanged instead of evaluating Source: evaluating would re-encode the envelope,
	// and anything but the identical bytes under the identical name is a value the engine
	// computed. Set by Build; Source stays for display.
	Verbatim bool
}

IOMapping is one compiled zeebe:ioMapping entry on an activity — an input or an output — the generic, task-agnostic variable mapping of ADR-0068. Source is a FEEL expression compiled once at deploy time (invariant I5); Target is the interned variable name it writes. The two directions differ only in where they read and write at runtime (phase 4): an input evaluates Source over the scope chain from the activity's flow scope and writes Target into the activity-local scope on activation; an output evaluates Source over the local scope and writes Target into the parent (flow) scope on completion. The compiler only records them; the engine applies them.

type JiraConfig added in v0.5.0

type JiraConfig struct {
	Connector   string
	Operation   string
	Issue       RestExpr
	Project     RestExpr
	IssueType   RestExpr
	Summary     RestExpr
	Description RestExpr
	Transition  RestExpr
	Comment     RestExpr
	Assignee    RestExpr
	JQL         RestExpr
	Query       RestExpr
	MaxResults  int32
	Fields      []RestKV
	ResultVar   string
	Retries     int32
}

JiraConfig is the deploy-time configuration of a Jira task (ADR-0201). Worker names the server-registered Jira instance (its base URL and credential live server-side, never in the model) and Operation is the issue-tracker operation. The remaining values are the ones that operation takes — literal-or-FEEL values (the parser compiles the FEEL ones) evaluated over the variables the task sees at call time. MaxResults is a search's cap, already defaulted by the compiler so the runtime interprets nothing (I5). ResultVar, if set, is the process variable what Jira returned is written back into.

type JobTypeRef added in v0.20.0

type JobTypeRef struct {
	ElementId string
	JobType   string
}

JobTypeRef is one service or send task and the job type it creates: work any worker that subscribes to that type may lease (ADR-0007).

type LaneDetail added in v0.2.0

type LaneDetail struct {
	Name   int32 // interned lane name → index, -1 if unnamed
	Parent int32 // index into lanes of the enclosing lane, -1 for a top-level lane
}

LaneDetail is one BPMN lane: an organizational partition of the process's flow nodes with no execution semantics (ADR-0121). Name is the interned lane label; Parent is the index of the enclosing lane in a nested laneSet (-1 for a top-level lane), so a node's full lane path can be walked leaf-to-root for display.

type LdapConfig added in v0.3.0

type LdapConfig struct {
	URL         RestExpr
	BindDN      RestExpr
	BindSecret  string
	StartTLS    bool
	Op          string
	DN          RestExpr
	BaseDN      RestExpr
	Filter      RestExpr
	Scope       string
	EntryVar    string
	NewPassword RestExpr
	ResultVar   string
	// PageSize and MaxEntries are the effective search bounds; the compiler has
	// already applied the defaults, and 0 means unbounded. ClientCertSecret names the
	// secret holding a PEM certificate+key bundle for a client-certificate bind.
	PageSize         int32
	MaxEntries       int32
	ClientCertSecret string
	Retries          int32
}

LdapConfig is the deploy-time configuration of a generic LDAP task (ADR-0154). URL is the server (ldap://host:389 or ldaps://host:636) and BindDN the bind identity — literal-or-FEEL values; BindSecret names the server-side secret for the bind password (empty → an anonymous bind); StartTLS upgrades a plain ldap:// connection with STARTTLS. Op is the operation ("search"|"add"|"modify"|"delete"|"modify-password"). DN is the target entry (add/modify/delete/modify-password); BaseDN/Filter/Scope address a search; EntryVar names the process variable holding the add/modify attribute object; NewPassword is the modify-password value. ResultVar receives a search's entries as a JSON array.

type LdifConfig added in v0.3.0

type LdifConfig struct {
	Format    string
	Operation string
	Source    string
	Result    string
	Retries   int32
}

LdifConfig is the deploy-time configuration of a directory-file task (ADR-0171). Format is "ldif" or "dsml" and Operation "read" or "write"; Source names the variable holding the file text (read) or the entries (write), and Result the variable receiving the entries (read) or the rendered file (write).

type MailConfig

type MailConfig struct {
	Connector string
	To        RestExpr
	Cc        RestExpr
	Bcc       RestExpr
	From      RestExpr
	Subject   RestExpr
	Body      RestExpr
	BodyHTML  RestExpr
	// SubjectTemplate, BodyTemplate and BodyHTMLTemplate are the subject and bodies of
	// a task that switched templating on, where they use the template language
	// (ADR-0487); nil leaves the RestExpr beside them in charge.
	SubjectTemplate  *feelers.Template
	BodyTemplate     *feelers.Template
	BodyHTMLTemplate *feelers.Template
	Retries          int32
	// The mailbox half (ADR-0438): the operation ("" is send) and
	// what it takes. ResultVar names the variable list, get and move answer into.
	Operation   string
	Folder      RestExpr
	Message     RestExpr
	Destination RestExpr
	MaxResults  int32
	IncludeBody bool
	// IncludeHTML is includeBody="html": a get reads the HTML body as well
	// (ADR-0489).
	IncludeHTML bool
	UnreadOnly  bool
	ResultVar   string
	// The documents half (ADR-0478): the attachment an
	// operation addresses, the media types it accepts, and for an export the S3 Worker,
	// bucket and key the document goes to.
	Attachment   RestExpr
	AllowedTypes []string
	Store        string
	Bucket       RestExpr
	Key          RestExpr
}

MailConfig is the deploy-time configuration of an outbound mail task (ADR-0079). Worker names the server-registered mail provider (its host and credentials live server-side, never in the model); To/Cc/Bcc/From/Subject/Body carry literal-or-FEEL values (the parser compiles the FEEL ones) evaluated over the instance's variables at send time. To and Subject/Body are the message; Cc, Bcc and From are optional (a zero RestExpr means unset).

type MailboxUse added in v0.9.0

type MailboxUse struct {
	ElementID string
	Worker    string
	Operation string
	// Store is the S3 Worker an export-attachment writes into, "" for every other
	// operation: a second Worker the task uses, and so a second one the deployer must
	// be able to reach (ADR-0478).
	Store string
}

MailboxUse is one mail task that reads or changes its Worker's mailbox rather than sending through it: the Worker it names and the operation.

type MessageCatchPoint added in v0.8.0

type MessageCatchPoint struct {
	// Element is the BPMN element id.
	Element string
	// MessageName is the message it waits for.
	MessageName string
	// Correlated is whether it declares a correlation key. A catch without one is
	// matched by a name-only publish, which is how a stray message would reach every
	// position of a product at once.
	Correlated bool
}

MessageCatchPoint is one element that waits for a message: an intermediate message catch event, a receive task, or a message boundary event.

type MessageDetail

type MessageDetail struct {
	MessageName    string
	CorrelationKey *expr.Compiled
	// SingletonStart marks a message *start* event as one-per-correlation-key: while
	// an instance started with a given key is live, another correlating message starts
	// no duplicate (ADR-0094). Only meaningful on a message start event; ignored on
	// catch/throw/end. Default false keeps ADR-0035's start-per-message behavior.
	SingletonStart bool
}

MessageDetail is the per-message-event data a behavior needs at runtime, shared by the message intermediate catch and throw events. MessageName is the message's name (a subscription matches on it); CorrelationKey is the FEEL expression compiled once at deploy time (ADR-0015) that each side evaluates over its own variables to produce the correlation key (ADR-0020).

type MessagePoint added in v0.9.0

type MessagePoint struct {
	Element     string
	MessageName string
	Role        MessageRole
	// Interrupting is, for a boundary or an event subprocess, whether firing cancels
	// the work it guards; false for every other role.
	Interrupting bool
}

MessagePoint is one element of a process that sends or receives a message: a message start, a catch event, a receive task, a message boundary, an event subprocess's message start, or a throw.

func (MessagePoint) Receives added in v0.20.0

func (m MessagePoint) Receives() bool

Receives reports whether the element receives the message rather than sending it.

type MessageReceipt added in v0.20.0

type MessageReceipt struct {
	ElementId   string
	MessageName string
	// Starts is set on a root-scope message start event, where a message arriving
	// under this name creates an instance rather than continuing one.
	Starts bool
}

MessageReceipt is one element that waits for a message by name: a place a message published to this server under that name can reach.

type MessageRole added in v0.20.0

type MessageRole string

MessageRole says what an element does with a message. The words are the signal roles' (SignalRole), so the inventories of both channels read alike (ADR-0446).

const (
	// MessageSends is an intermediate throw event, an end event or a send task that
	// sends the message; a send task naming a message compiles to a throw (ADR-0112).
	MessageSends MessageRole = "throw"
	// MessageStarts is a start event of the process that starts an instance on the message.
	MessageStarts MessageRole = "start"
	// MessageCatches is an intermediate catch event or a receive task that waits for it.
	MessageCatches MessageRole = "catch"
	// MessageBoundary is a boundary event that fires on it.
	MessageBoundary MessageRole = "boundary"
	// MessageEventSubProcess is an event subprocess the message starts, named by its
	// start event.
	MessageEventSubProcess MessageRole = "event-subprocess"
)

type MessageStartEvent

type MessageStartEvent struct {
	MessageName    string
	ElementId      int32
	CorrelationKey *expr.Compiled
	SingletonStart bool // one live instance per correlation key (ADR-0094)
}

MessageStartEvent pairs a message-start event's message name with its element index, so the engine can index which element a starting message flows into for the collaboration replay (ADR-0038). CorrelationKey is the FEEL expression compiled at deploy time; the engine evaluates it over a starting message's payload so the created instance records which key it began with (ADR-0020). It is nil when the event declares no correlation key.

type MockupConfig added in v0.2.0

type MockupConfig struct {
	MinNanos       int64
	MaxNanos       int64
	ResultVar      string
	Expr           *expr.Compiled
	FailPerMillion int32
	FailMessage    string
	ErrorCode      string
}

MockupConfig is the authored configuration of a mockup (engine-simulated) service task (ADR-0120). MinNanos/MaxNanos bound the random simulated duration (MaxNanos >= MinNanos, both >= 0). Expr, when non-nil, is the compiled FEEL result expression written to ResultVar on activation (the input→output script). FailPerMillion is the failure probability in parts-per-million (0..1_000_000). FailMessage is the incident message used when a simulated failure occurs.

type MockupTaskDetail added in v0.2.0

type MockupTaskDetail struct {
	MinNanos       int64          // minimum simulated duration in nanoseconds
	MaxNanos       int64          // maximum simulated duration in nanoseconds (>= MinNanos)
	ResultVar      string         // result-variable name, "" if none (a raw string, like ScriptTaskDetail.ResultVar)
	Expr           *expr.Compiled // FEEL result expression compiled at deploy time (I5), nil if none
	FailPerMillion int32          // failure probability in parts-per-million, 0..1_000_000
	FailMessage    string         // incident message on a simulated failure, "" for a default
	// ErrorCode, when non-empty, makes a simulated failure throw a BPMN error with this
	// code (caught by a matching error boundary/event subprocess, ADR-0089) instead of
	// raising an incident — so business error paths, not just technical ones, are
	// exercisable. Empty keeps the incident behavior.
	ErrorCode string
}

MockupTaskDetail is the per-mockup-task data the engine reads to simulate a service task itself (ADR-0120), instead of dispatching a job to an external worker. On activation the behavior arms a one-shot timer for a random duration in [MinNanos, MaxNanos] and, if Expr is set, evaluates it over the instance's variables and writes the result into ResultVar (the input→output "script", e.g. a simulated REST response). When the timer fires the task completes — unless the fail draw selects failure, in which case a job-less incident is raised with FailMessage.

The random duration and the fail decision are derived deterministically from the frozen timer key at command time (never re-drawn on replay), so no new nondeterministic source enters the engine (invariant I6). FailPerMillion is the failure probability scaled to parts-per-million (0 = never fail, 1_000_000 = always) so the whole decision stays integer-pure across live and replay.

type MultiInstanceDetail

type MultiInstanceDetail struct {
	InputCollection     *expr.Compiled // FEEL list to iterate; nil when Cardinality is used
	Cardinality         *expr.Compiled // FEEL count; nil when InputCollection is used
	InputElement        int32          // interned per-iteration variable name, -1 if none
	OutputCollection    int32          // interned result-list variable name, -1 if none
	OutputElement       *expr.Compiled // FEEL per-iteration contribution, nil if none
	CompletionCondition *expr.Compiled // FEEL early-exit, nil if none
	Sequential          bool           // one iteration at a time (else parallel)
	Standard            bool           // a <standardLoopCharacteristics> loop (ADR-0133)
	TestBefore          bool           // standard loop: check the condition before iteration 1
	LoopCondition       *expr.Compiled // standard loop: FEEL repeat-while, nil if none
	LoopMaximum         int32          // standard loop: iteration cap, 0 = uncapped
}

MultiInstanceDetail is the per-multi-instance-activity data a behavior needs at runtime (ADR-0077). A multi-instance activity runs its node N times — once per element of InputCollection (a FEEL list), or Cardinality times — as inner element instances scoped under a body. InputElement (interned, -1 if none) is the local variable each iteration binds to its item; the standard loopCounter (1-based) is bound alongside it. Each iteration's OutputElement (a FEEL over its variables, nil if none) is appended to the OutputCollection (interned, -1 if none) list promoted to the parent when the loop completes. CompletionCondition (nil if none) is a FEEL early-exit evaluated after each iteration. Sequential runs one iteration at a time; parallel (the default) seeds them all at once. Exactly one of InputCollection or Cardinality is set — the deploy is refused otherwise.

Standard marks the other BPMN loop marker, <standardLoopCharacteristics> — the loop (circular arrow) icon (ADR-0133). It shares this struct because it shares the runtime: a standard loop is a sequential loop whose iteration set is not a collection but a condition, so it has no InputCollection, Cardinality, InputElement, or OutputCollection, and is driven instead by LoopCondition (nil means "repeat until LoopMaximum"), TestBefore (check the condition before the first iteration — a while loop; else a repeat-until that always runs at least once), and LoopMaximum (a hard iteration cap; 0 means uncapped). At least one of LoopCondition and LoopMaximum is set — the deploy is refused otherwise, since a loop with neither has no way to end.

type NodeSet added in v0.5.0

type NodeSet struct {
	// contains filtered or unexported fields
}

NodeSet is a compile-time set of node ids, held as a bitset. It answers membership and nothing else, which is all the runtime asks of it, and it is immutable once built — so one lives on the CompiledProcess and is shared by every instance of it (invariant I5).

The zero NodeSet is empty and safe to query.

func (NodeSet) Count added in v0.5.0

func (s NodeSet) Count() int

Count returns how many ids the set holds. It is for tests and diagnostics; the runtime only ever asks Has.

func (NodeSet) Has added in v0.5.0

func (s NodeSet) Has(id int32) bool

Has reports whether id is in the set.

type Problem

type Problem struct {
	Element  string   `json:"element"`
	Severity Severity `json:"severity"`
	Rule     string   `json:"rule"`
	Message  string   `json:"message"`
}

Problem is one structured validation finding on a compiled process, shaped for ADR-0026's Problems panel and the future POST /api/v1/validate endpoint. Element is the source BPMN element id it anchors to (the id bpmn-js uses, e.g. "Gateway_1"; "" for a process-level finding or a node compiled without a source id); Severity ranks it; Rule is the stable machine slug of the check that raised it; Message is a human-readable explanation.

func Validate

func Validate(cp *CompiledProcess) []Problem

Validate runs the compiler's graph-wide checks (compiler.md stage 5, ROADMAP Milestone 1) over a linearized CompiledProcess and returns every structured Problem it finds — not just the first — so a Problems panel can list them all in one pass. It never mutates cp and is safe to call concurrently on an immutable process. compileProcess calls it as the final compile stage and refuses the deploy when HasErrors holds; the future /validate dry-run returns the full list (errors and warnings) verbatim.

Problems are returned in a deterministic order — by check family, then by node or flow index within each — so a caller (and a test) sees a stable sequence.

func ValidateModel

func ValidateModel(r io.Reader) ([]Problem, error)

ValidateModel runs the compiler's real parse → resolve → build → validate pipeline over a BPMN model as a *dry run* — it mints no keys, registers no definition, and starts no instance — and returns every validation Problem (errors and warnings) across all of the model's executable pools. It is the single source of validation truth behind ADR-0026's Problems panel and the POST /api/v1/validate endpoint: the panel never re-implements these rules (that would be the interpret-don't-compile failure mode I5 forbids), it renders what this returns.

Unlike ParseAll, which stops at the first fault so a deploy fails fast, the dry run reports everything at once — that is what a Problems panel needs. Faults the graph checks cannot anchor to a node still surface as Problems so the panel renders them uniformly: a document that will not parse, or a model with no executable process, becomes one RuleParse error; a pool that fails an earlier compile stage becomes one RuleCompile error rather than aborting the whole run and blinding the panel to the other pools.

The returned error is always nil today — every modeling fault is reported as a Problem, not an error — but the signature keeps an error so a future source that does I/O can report a read failure distinctly from a modeling one.

type RemedyConfig

type RemedyConfig struct {
	Connector string
	Form      RestExpr
	Fields    []RestKV
	ResultVar string
	Retries   int32
}

RemedyConfig is the deploy-time configuration of a BMC Remedy task (ADR-0106). Worker names the server-registered Remedy instance (its base URL and credentials live server-side, never in the model). Form is the Remedy form the entry is created in (e.g. "HPD:IncidentInterface_Create"); Fields carries the entry's field values as name/literal-or-FEEL pairs evaluated over the instance's variables at call time (the fx toggle, ADR-0067). ResultVar, if set, is the process variable the created entry's id is written back into.

type RestAuth

type RestAuth struct {
	Type       string `json:"type,omitempty"`
	Username   string `json:"username,omitempty"`
	ApiKeyName string `json:"apiKeyName,omitempty"`
	SecretRef  string `json:"secretRef,omitempty"`
	TokenURL   string `json:"tokenUrl,omitempty"`
	ClientID   string `json:"clientId,omitempty"`
	Scope      string `json:"scope,omitempty"`
}

RestAuth is a REST worker task's authentication config. Type is "", "basic", "bearer", "apiKey", or "oauth2". Username (basic), ApiKeyName (the apiKey header name), ClientID/TokenURL/Scope (oauth2 client-credentials) are model data. SecretRef names a server-side secret (ADR-0041) — the basic password, bearer token, api-key value, or oauth2 client secret — resolved at runtime; the secret value itself is never authored in the model or stored here.

For Type "oauth2" the worker performs a client-credentials grant (ADR-0152): TokenURL is the token endpoint, ClientID the client identifier, SecretRef the client secret reference, and Scope the optional space-delimited scopes; the fetched access token is attached as a Bearer credential and cached until it nears expiry.

type RestConfig

type RestConfig struct {
	Method    string
	Url       RestExpr
	ResultVar string
	Headers   []RestKV
	Query     []RestKV
	Auth      RestAuth
	Retries   int32
}

RestConfig is the deploy-time configuration of an HTTP-REST task (ADR-0067). Method and ResultVar are interned; Url, Headers, and Query carry literal-or-FEEL values (the parser compiles the FEEL ones); Auth references a server-side secret.

type RestExpr

type RestExpr struct {
	Literal string
	Expr    *expr.Compiled
}

RestExpr is a REST worker field value that is either a literal string (Expr == nil, use Literal) or a FEEL expression evaluated over the instance's variables at call time (Expr != nil), compiled once at deploy time (invariant I5, ADR-0008/0067). It backs the modeler's fx toggle: a model value with a leading '=' is an expression, otherwise a literal.

type RestKV

type RestKV struct {
	Name string
	Val  RestExpr
}

RestKV is a named REST field value (one request header or query parameter): its Name and a value that may be literal or a FEEL expression.

type S3Config added in v0.9.0

type S3Config struct {
	Worker       string
	Operation    string
	Bucket       RestExpr
	Key          RestExpr
	Content      RestExpr
	ContentType  RestExpr
	Encoding     string
	Prefix       RestExpr
	Delimiter    RestExpr
	StartAfter   RestExpr
	MaxKeys      int32
	SourceBucket RestExpr
	SourceKey    RestExpr
	ExpiresIn    int32
	Metadata     []RestKV
	ResultVar    string
	Retries      int32
}

S3Config is the deploy-time configuration of an object-store task (ADR-0442). Worker names the configured S3 Worker (whose access key lives server-side, never in the model) and Operation is the object operation. It is read from the task's `connector="…"` attribute, which keeps the pre-ADR-0203 spelling because it is authored in deployed models. The remaining values are the ones that operation takes — literal-or-FEEL values (the parser compiles the FEEL ones) evaluated over the variables the task sees at call time.

Encoding, MaxKeys and ExpiresIn are compiled structure rather than authored values, because each decides the *shape* of a call rather than its content and the compiler has already applied their defaults, so the runtime interprets nothing (I5). Metadata are extra request headers as name/literal-or-FEEL pairs. ResultVar, if set, is the process variable what the store returned is written back into.

type ScimConfig added in v0.3.0

type ScimConfig struct {
	BaseURL    RestExpr
	Resource   RestExpr
	Op         string
	ResourceID RestExpr
	Filter     RestExpr
	BodyVar    string
	ResultVar  string
	Auth       RestAuth
	Retries    int32
}

ScimConfig is the deploy-time configuration of a SCIM 2.0 task (ADR-0153). BaseURL and Resource address the service provider and resource type ("Users"/"Groups"); Op is the operation ("create"|"get"|"replace"|"patch"| "delete"|"search"); ResourceID (get/replace/patch/delete) and Filter (search) carry literal-or-FEEL values (the parser compiles the FEEL ones); BodyVar names the process variable holding the create/replace/patch payload (empty → the whole variable scope); Auth references a server-side secret; ResultVar receives the JSON response (empty → discard it).

type ScrapeField added in v0.5.0

type ScrapeField struct {
	Name      int32
	Selector  int32
	Attribute int32
}

ScrapeField is one named field of a structured HTML scrape (ADR-0231): Name is the key the extracted value gets in the item's object, Selector an optional CSS selector evaluated *within* the matched item (-1 → the item element itself), and Attribute the optional attribute read from the element it resolves to (-1 → that element's text). All three are interned structural literals, never FEEL: a field list is the result's shape, and a shape that varies per instance is not a shape.

type ScriptJobTaskDetail

type ScriptJobTaskDetail struct {
	JobType   int32 // interned reserved per-language script job type → index
	Language  int32 // interned script language (e.g. "powershell") → index
	Source    int32 // interned script source text → index
	ResultVar int32 // interned result-variable name → index
	Retries   int32
}

ScriptJobTaskDetail is the per-script-job-task data a behavior needs at runtime. Unlike the inline FEEL script task (ScriptTaskDetail), a job script is authored in a general-purpose language (PowerShell first; Python/JavaScript later) and runs off the hot path in a job worker, exactly as a business rule task delegates to the DMN worker (ADR-0047). Like a service task it runs as a job, so it carries a JobType — a reserved per-language sentinel (e.g. PwshJobType) the in-process script worker subscribes to. Language is the interned language name (which also selects the worker/interpreter), Source is the interned script text (compiled/validated no further at deploy time — an interpreter runs it, invariant I5 keeps only interning and validation off the runtime path), and ResultVar is the process variable the script's result is written back into on job completion.

type ScriptTaskDetail

type ScriptTaskDetail struct {
	Expr      *expr.Compiled
	ResultVar string
}

ScriptTaskDetail is the per-script-task data a behavior needs at runtime: a FEEL expression compiled once at deploy time (ADR-0008/0015) and the name of the variable its result is written to.

type ServiceTaskDetail

type ServiceTaskDetail struct {
	JobType int32 // interned string → index, local to this compiled process
	Retries int32
	// contains filtered or unexported fields
}

ServiceTaskDetail is the per-service-task data a behavior needs at runtime.

func (*ServiceTaskDetail) GlobalJobType added in v0.3.0

func (d *ServiceTaskDetail) GlobalJobType() int32

GlobalJobType is the job type a job created for this task must carry: the engine-wide index when the process has been resolved, and otherwise the locally interned one, which is what a compiled process used before resolution existed and keeps a standalone process (a test, the conformance runner) behaving as it always did.

type Severity

type Severity string

Severity ranks a validation Problem. An error refuses deployment (compileProcess returns it as a fatal compile error, preserving the "fail at deploy, never at runtime" contract); a warning is informational and does not block a deploy. The string values are stable and chosen so the future JSON /validate endpoint and Problems panel (ADR-0026) can serialize them directly.

const (
	// SeverityError marks a problem that makes the model unrunnable or structurally
	// invalid, so the deploy is refused — the existing all-or-nothing compile-gate
	// behavior, now with a reason attached.
	SeverityError Severity = "error"
	// SeverityWarning marks a modeling smell that does not prevent the reachable
	// part of the process from executing correctly (e.g. dead, unreachable code).
	// It is surfaced to the author but never blocks a deploy.
	SeverityWarning Severity = "warning"
)

type SharePointConfig

type SharePointConfig struct {
	Connector  string
	Operation  string
	Site       RestExpr
	List       RestExpr
	Fields     []RestKV
	ItemID     RestExpr
	Path       RestExpr
	Content    RestExpr
	Encoding   string
	Filter     RestExpr
	Select     RestExpr
	PageToken  RestExpr
	MaxResults int32
	ResultVar  string
	Retries    int32
}

SharePointConfig is the deploy-time configuration of a SharePoint task (ADR-0141, amended). Worker names the server-registered SharePoint provider (its Graph base and OAuth credential live server-side, never in the model) and Operation the step the task takes, empty meaning create-item — which is what every task authored before operations existed does. Site and List address the site and the list or document library; Fields are column values; ItemID, Path, Content, Filter, Select and PageToken are the values the operation takes — all literal-or-FEEL values (the parser compiles the FEEL ones) evaluated over the instance's variables at call time. Encoding and MaxResults are compiled structure with their defaults applied. ResultVar, if set, is the process variable what Graph returned is written back into (empty = discard it).

type ShopCommandConfig added in v0.9.0

type ShopCommandConfig struct {
	Product   string
	Action    string
	Order     RestExpr
	Position  RestExpr
	ResultVar string
	Retries   int32
}

ShopCommandConfig is the deploy-time configuration of a shop send task in mode `command`.

type ShopConfig added in v0.9.0

type ShopConfig struct {
	Mode    string
	Action  string
	Outcome string
	Retries int32
}

ShopConfig is the deploy-time configuration of a shop send task.

type ShopOutcomePoint added in v0.9.0

type ShopOutcomePoint struct {
	// Element is the BPMN element id.
	Element string
	Action  string
	Outcome string
}

ShopOutcomePoint is one shop send task that states an outcome.

type SignalDetail

type SignalDetail struct {
	SignalName string
}

SignalDetail is the per-signal-event data a behavior needs at runtime, shared by the signal intermediate catch, throw, end, and start events (ADR-0088). A signal is broadcast by name: it carries no correlation key and no code, so the name is all a catch subscribes on and a throw broadcasts.

type SignalPoint added in v0.9.0

type SignalPoint struct {
	Element    string
	SignalName string
	Role       SignalRole
	// Interrupting is, for a boundary or an event subprocess, whether firing cancels
	// the work it guards; false for every other role.
	Interrupting bool
}

SignalPoint is one element of a process that throws or receives a signal.

func (SignalPoint) Receives added in v0.9.0

func (s SignalPoint) Receives() bool

Receives reports whether the element receives the signal rather than throwing it.

type SignalRole added in v0.9.0

type SignalRole string

SignalRole says what an element does with a signal.

const (
	// SignalThrows is an intermediate or end event that broadcasts the signal.
	SignalThrows SignalRole = "throw"
	// SignalStarts is a start event of the process that starts an instance on the signal.
	SignalStarts SignalRole = "start"
	// SignalCatches is an intermediate catch event that waits for it.
	SignalCatches SignalRole = "catch"
	// SignalBoundary is a boundary event that fires on it.
	SignalBoundary SignalRole = "boundary"
	// SignalEventSubProcess is an event subprocess the signal starts, named by its
	// start event.
	SignalEventSubProcess SignalRole = "event-subprocess"
)

type SignalStartEvent

type SignalStartEvent struct {
	SignalName string
	ElementId  int32
}

SignalStartEvent pairs a signal-start event's signal name with its element index, so the engine can index which element a starting signal flows into (ADR-0088).

type SoapConfig added in v0.3.0

type SoapConfig struct {
	Endpoint  RestExpr
	Op        string
	Action    RestExpr
	Body      RestExpr
	Version   string
	ResultVar string
	Auth      RestAuth
	Retries   int32
}

SoapConfig is the deploy-time configuration of a SOAP / Web Services (WSDL) task (ADR-0165). Endpoint is the service URL (from the WSDL's soap:address) and Op the operation name; Action overrides the SOAPAction header (empty → Op); Body is the XML payload placed inside the SOAP envelope's Body (literal-or-FEEL, so a request can interpolate the instance's variables); Version is the SOAP protocol version ("1.1" or "1.2"); Auth references a server-side secret; ResultVar receives the parsed response body (empty → discard it).

type SqlConfig added in v0.3.0

type SqlConfig struct {
	JobType   string
	Connector string
	Op        string
	Statement string
	ParamsVar string
	MaxRows   int32
	ResultVar string
	Retries   int32
}

SqlConfig is the deploy-time configuration of a SQL task (ADR-0173), shared by all three products. JobType is the product's reserved job type (MsSqlJobType, MariaDBJobType or PostgresJobType) — the one field that differs between them, and what decides which driver the worker opens.

Worker names the database the worker is configured for: a SQL task carries no DSN, because the connection string never enters the engine. Op is the operation ("query"|"query-one"|"execute"). Statement is the SQL text, a literal by construction so no process value can become part of it; ParamsVar names the process variable bound to its placeholders. MaxRows caps a query's result set (0 = the worker's default), and ResultVar receives the rows, the row, or the affected count (empty = discard, valid only for execute).

type StartVariable added in v0.12.0

type StartVariable struct {
	Name     string
	Type     string
	Default  string // as authored, for the start surfaces to prefill
	Required bool

	HasDefault     bool
	Kind           expr.ValueKind
	Bool           bool
	Text           string
	DefaultProblem string
}

StartVariable is one start variable a process declares (<atlas:startVariable> inside <atlas:startForm>): a name, one of the types the start surfaces render (string, number, boolean, json), the default they prefill, and whether they refuse to start without it.

The default is also what an instance starts with when whoever started it did not supply the variable (ADR-0455): Kind, Bool and Text are it in the canonical form a variable is stored as, computed once at deploy so the engine seeds it without parsing (I5), and meaningful only when HasDefault is set. A declaration whose default cannot be seeded has none, and DefaultProblem says why — the deploy warns with it rather than refusing, because a stored model is compiled again on every restart.

type TeamsPhoneConfig added in v0.15.0

type TeamsPhoneConfig struct {
	Worker    string
	Operation string
	Args      []RestKV
	ResultVar string
	Retries   int32
}

TeamsPhoneConfig is the deploy-time configuration of a Teams Phone task (ADR-0463). Worker names the configured tenant (whose app certificate lives with the worker, never in the model) and Operation is the voice-app operation. Args are the operation's values keyed by attribute name: each authored one a literal-or-FEEL value evaluated over the variables the task sees at call time, each static setting a literal the compiler has already validated and defaulted, so the runtime interprets nothing (I5). ResultVar, if set, receives the operation's answer.

type TimerCatchDetail

type TimerCatchDetail struct {
	Schedule TimerSchedule
}

TimerCatchDetail is the per-timer-intermediate-catch-event data: the compiled schedule that decides when the waiting token continues. A catch fires once, so only duration and date schedules reach here — a cycle is a compile error (ADR-0054).

type TimerSchedule

type TimerSchedule struct {
	Kind        TimerScheduleKind
	BaseNanos   int64          // Duration/CycleInterval: the interval in ns; Date: the absolute instant (unix ns)
	Repetitions int32          // remaining fires after the first; -1 = infinite; 0 = fire once
	Cron        cronSpec       // populated only for TimerCycleCron
	Expr        *expr.Compiled // populated only for the TimerFeel* kinds (ADR-0055/0056)
}

TimerSchedule is a compiled timer definition: enough to compute every due date deterministically at runtime without re-parsing the XML (invariant I5). Timer start events use the full range (ADR-0051); catch and boundary timers use only a duration today and do not carry a schedule.

func (TimerSchedule) FirstDue

func (s TimerSchedule) FirstDue(now int64) int64

FirstDue returns the due date of the first (or only) firing of a timer armed at now. The clock is read by the caller and frozen into the arming event, never here (invariant I4/I6).

func (TimerSchedule) IsFeel

func (s TimerSchedule) IsFeel() bool

IsFeel reports whether the schedule comes from a FEEL expression evaluated at runtime (ADR-0055/0056), rather than a value fixed at deploy time.

func (TimerSchedule) NextDue

func (s TimerSchedule) NextDue(now int64) (int64, bool)

NextDue returns the due date of the next firing after a timer fires at now, and whether the timer recurs at all. A one-shot (duration/date) returns ok=false. A finite cycle whose Repetitions has run out is handled by the caller via the Repetitions counter, not here — NextDue only computes when.

func (TimerSchedule) Repeats

func (s TimerSchedule) Repeats() bool

Repeats reports whether the schedule recurs (a cycle), as opposed to firing once (a duration or date). A recurring non-interrupting boundary uses it to decide whether to re-arm after each fire (ADR-0054).

func (TimerSchedule) ResolveConstant

func (s TimerSchedule) ResolveConstant() (TimerSchedule, error)

ResolveConstant evaluates a constant FEEL schedule — one whose expression reads no variables — exactly as the runtime would at arm (against an empty binding) and returns the concrete schedule, or an error if it does not resolve to a valid one. A timer *start* event's FEEL schedule is required to be constant (ADR-0056), so this lets deploy-time validation prove it will actually arm instead of being silently dropped at runtime (ADR-0111). A non-FEEL schedule resolves trivially. It must not be called on a FEEL schedule with variable inputs — those have no value at deploy — so callers check Expr.Inputs() first.

func (TimerSchedule) ResolveFeel

func (s TimerSchedule) ResolveFeel(text string) (TimerSchedule, bool)

ResolveFeel turns the evaluated text of a FEEL timer expression into the concrete schedule the literal parser would have produced for the same field — a duration, date, or cycle — so downstream FirstDue/NextDue/Repetitions are identical to a literal timer's (ADR-0056). ok is false if the text is not valid for the field (the caller then treats the timer as unresolvable). Only valid on a FEEL schedule.

func (TimerSchedule) ResolveFeelValue

func (s TimerSchedule) ResolveFeelValue(v expr.Value) (TimerSchedule, bool)

ResolveFeelValue turns a FEEL expression's evaluated *value* into the concrete schedule for the field (ADR-0057). It first reads a first-class FEEL temporal exactly — a duration's nanoseconds for a FEEL duration schedule, a date-time's instant for a FEEL date schedule — and only falls back to the canonical string form (Classify → ResolveFeel) when the value is not a usable temporal (e.g. a variable holding an ISO-8601 string, or any cycle). ok is false if neither path yields a valid schedule. Only valid on a FEEL schedule.

type TimerScheduleKind

type TimerScheduleKind uint8

TimerScheduleKind discriminates how a timer's due dates are computed.

const (
	// TimerDuration fires once, BaseNanos after the timer is armed (ISO-8601
	// <timeDuration>, e.g. PT1H).
	TimerDuration TimerScheduleKind = iota
	// TimerDate fires once, at the absolute instant BaseNanos (ISO-8601
	// <timeDate>, e.g. 2026-08-01T09:00:00Z).
	TimerDate
	// TimerCycleInterval recurs every BaseNanos, Repetitions more times after the
	// first (ISO-8601 repeating interval <timeCycle>, e.g. R3/PT1H or R/PT1H).
	TimerCycleInterval
	// TimerCycleCron recurs on a wall-clock cron schedule (<timeCycle> holding a
	// 5-field cron expression, e.g. "0 * * * *" — every full hour). Always
	// infinite.
	TimerCycleCron
	// TimerFeelDuration fires once, its delay a FEEL expression (Expr) evaluated
	// against the instance's variables when the timer is created; the result's text
	// is parsed as an ISO-8601 duration (ADR-0055).
	TimerFeelDuration
	// TimerFeelDate fires once, its instant a FEEL expression (Expr) evaluated when
	// the timer is created; the result's text is parsed as an RFC3339 instant
	// (ADR-0055).
	TimerFeelDate
	// TimerFeelCycle recurs, its cadence a FEEL expression (Expr) evaluated when the
	// timer is armed and again on each re-arm; the result's text is parsed as a
	// repeating interval or cron (ADR-0056). Boundary (non-interrupting) only.
	TimerFeelCycle
)

type TimerStartDetail

type TimerStartDetail struct {
	Schedule TimerSchedule
}

TimerStartDetail is the per-timer-start-event data: the compiled schedule that the engine arms at deploy time and consults to compute each due date (ADR-0051).

type TimerStartEvent

type TimerStartEvent struct {
	Schedule  TimerSchedule
	ElementId int32
}

TimerStartEvent pairs a timer-start event's compiled schedule with its element index, so the engine can arm the right timer for the right node (ADR-0051).

type UserConnectorConfig added in v0.2.0

type UserConnectorConfig struct {
	Operation   string
	Username    RestExpr
	Email       RestExpr
	DisplayName RestExpr
	Roles       RestExpr
	Password    RestExpr
	Retries     int32
}

UserConnectorConfig is the deploy-time configuration of a user-provisioning task (ADR-0123). Operation is one of "create", "set-password", or "disable". Username identifies the account; Email/DisplayName/Roles/Password are the create/update fields — each a literal-or-FEEL value (the parser compiles the FEEL ones) evaluated over the instance's variables at call time. There is no worker name and no credential: the worker mutates the internal user store directly, gated to the protected system project (ADR-0122) and opt-in server-side.

type UserTaskDetail

type UserTaskDetail struct {
	JobType int32
	Retries int32
	Name    int32 // interned element name (the task's human title) → index, -1 if unset
	// Assignee and CandidateGroups are the literal halves of the assignment: the
	// interned strings the model wrote, or -1 when it wrote an expression instead.
	Assignee        int32
	CandidateGroups int32
	// AssigneeExpr and CandidateGroupsExpr are the other half: a FEEL expression
	// the model wrote with a leading "=", evaluated when the task activates and
	// frozen into the job-created event, exactly as the due date below is
	// (ADR-0318). Nil when the model wrote a
	// literal or nothing.
	//
	// The two are exclusive by construction — a value is one or the other — and a
	// reader must consult the expression first: the literal is -1 whenever an
	// expression is present, so reading only the literal silently yields an
	// unassigned task, which is what happened before this existed.
	AssigneeExpr        *expr.Compiled
	CandidateGroupsExpr *expr.Compiled
	FormId              int32 // interned form id bound via zeebe:formDefinition → index, -1 if unset (ADR-0028)
	// Priority is the task's static importance from zeebe:priorityDefinition
	// (default 50, Camunda's convention); higher sorts first in the inbox.
	Priority int32
	// DueDateNanos is the ISO-8601 duration (from zeebe:taskSchedule dueDate),
	// in nanoseconds, after which the task is due — relative to its creation, so
	// the absolute due instant is frozen when the job is created (ADR-0051).
	// 0 means the task has no due date.
	DueDateNanos int64
}

UserTaskDetail is the per-user-task data a behavior needs at runtime. A user task parks a token and creates a job like a service task; the "worker" is a person using the Tasks app (ADR-0028). Assignee and CandidateGroups are interned strings from the zeebe:assignmentDefinition extension (-1 if unset).

type ValidationError

type ValidationError struct {
	Problems []Problem
	// Process is the compiled process the gate refused. The model is fully compiled
	// by the time stage 5 runs — validation decides whether it may be *deployed*, it
	// does not decide whether it can run (I5) — so the reload path, which re-reads a
	// definition that passed the gate of its own day, can take the process from here
	// instead of losing it to the gate a second time
	// (ADR-0177). compileProcess always sets it; it is
	// still the zero value of the field, so a caller checks it before use.
	Process *CompiledProcess
}

ValidationError is the fatal compile error compileProcess returns when graph-wide validation finds an error-severity Problem, so a deploy is refused (invariant I5, preserving today's compile-gate behavior). It carries the full Problem list — warnings included — so a caller that wants the structured findings (a future /validate endpoint reusing the compile path) can recover them with a type assertion; Error() renders only the error-severity findings into one line, matching how the other compile failures read.

func (*ValidationError) Error

func (e *ValidationError) Error() string

type WebScrapeConfig added in v0.2.0

type WebScrapeConfig struct {
	Url       RestExpr
	Selector  RestExpr
	Attribute string
	Result    string
	Retries   int32
}

WebScrapeConfig is the deploy-time configuration of a web-scraping task (ADR-0118). Url is the page to fetch and Selector the CSS selector whose matches are extracted — both literal-or-FEEL values (the parser compiles the FEEL ones) evaluated over the instance's variables at call time. Attribute, when set, names the HTML attribute to read from each match (empty → each match's text content); Result is the process variable the extracted values are written to as a JSON array. Like REST, the target lives entirely in the model, not a registry.

type WebScrapeExtractionConfig added in v0.5.0

type WebScrapeExtractionConfig struct {
	Url           RestExpr
	Selector      RestExpr
	Attribute     string
	Format        WebScrapeFormat
	MaxItems      int32
	Fields        []WebScrapeFieldConfig
	AbsoluteLinks bool
	PlainText     bool
	Result        string
	Retries       int32
}

WebScrapeExtractionConfig is the ADR-0190 deploy-time configuration used by the XML compiler. It extends the original WebScrapeConfig without breaking callers of AddWebScrapeConnectorTask: Format is explicit and MaxItems is the deterministic first-N bound (0 = unlimited). Fields, AbsoluteLinks and PlainText are the structured-extraction additions (ADR-0231); their zero values are exactly the pre-existing behavior.

type WebScrapeFieldConfig added in v0.5.0

type WebScrapeFieldConfig struct {
	Name      string
	Selector  string
	Attribute string
}

WebScrapeFieldConfig is one authored field of a structured HTML scrape (ADR-0231). Name is required and unique within a task; Selector is optional and relative to the matched item (empty = the item itself); Attribute is optional (empty = the element's text).

type WebScrapeFormat added in v0.5.0

type WebScrapeFormat uint8

WebScrapeFormat selects the document representation a web-scraping worker extracts (ADR-0190). It is compiled from the model and carried as a compact value in ConnectorTaskDetail so the worker never infers a representation from runtime content. Zero is HTML deliberately: ConnectorTaskDetail values produced by code written before ADR-0190 therefore keep their existing HTML semantics.

const (
	// WebScrapeFormatHTML preserves ADR-0118's CSS-selector extraction.
	WebScrapeFormatHTML WebScrapeFormat = iota
	// WebScrapeFormatRSS extracts RSS 2.0 items into structured feed entries.
	WebScrapeFormatRSS
	// WebScrapeFormatAtom extracts Atom entries into structured feed entries.
	WebScrapeFormatAtom
)

func (WebScrapeFormat) String added in v0.5.0

func (f WebScrapeFormat) String() string

String returns the model token for a compiled web-scrape format.

type WikiConfig added in v0.21.0

type WikiConfig struct {
	Worker        string
	WorkerExpr    RestExpr
	Op            string
	Item          RestExpr
	Space         RestExpr
	ItemType      RestExpr
	Parent        RestExpr
	Title         RestExpr
	Properties    RestExpr
	PropertiesVar string
	MatchField    RestExpr
	Labels        RestExpr
	Text          RestExpr
	Blocks        RestExpr
	Transition    RestExpr
	Comment       RestExpr
	Query         RestExpr
	MaxResults    int32
	ResultVar     string
	Retries       int32
}

WikiConfig is the deploy-time configuration of a wikiwikibangbang task (ADR-0498). Worker names the configured wiki and WorkerExpr carries it as literal-or-FEEL; Op is a row of connector/wikiwikibangbang/catalog. Item, Space, ItemType, Parent, Title, MatchField, Labels, Text, Blocks, Transition, Comment and Query are literal-or-FEEL values; a literal Blocks is the JSON array the compiler has checked. Properties is the authored properties object compiled to one FEEL context, PropertiesVar the variable holding it instead; the compiler has refused a model that sets both. MaxResults bounds a query, with its default applied, and is zero on every other operation.

type WizardKind added in v0.10.0

type WizardKind uint8

WizardKind says whether, and for whom, an embedded subprocess is a wizard: one sitting of one filler, walked user task by user task (ADR-0449). The engine runs a wizard exactly like any other subprocess. What the mark changes is how the API carries a filler from one step to the next, and who may fill the steps.

const (
	WizardNone     WizardKind = iota // an ordinary subprocess, or not a subprocess at all
	WizardInternal                   // atlas:wizard="internal": signed-in fillers
	WizardPublic                     // atlas:wizard="public": the anonymous filler of a public start link
)

func (WizardKind) String added in v0.10.0

func (k WizardKind) String() string

String names the kind as the model writes it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL