Skip to content

BPMN Extensions

Agentwerke runs standard BPMN 2.0 with extension elements in the namespace:

text
https://agentwerke.de/bpmn/extensions/v1

The XML prefix currently shown as autofac: is a stable workflow wire-format prefix, not the product name. Keep it in BPMN examples so workflows round-trip through the current designer and runtime.

Include BPMN diagram layout information so the workflow renders correctly in the designer and run detail views.

autofac:agentTask

Use autofac:agentTask on a serviceTask or scriptTask to make a task executable by an agent or deterministic tool.

xml
<bpmn:serviceTask id="Implement" name="Implement">
  <bpmn:extensionElements>
    <autofac:agentTask
      agent="implementation-engineer"
      action="implement"
      executionMode="agent_sandboxed"
      sandboxProfile="repo-write"
      purposeType="implementation"
      policyTag="repo-change"
      permissionLevel="read-write"
      allowedTools="sandbox.file_write,sandbox.git">
      <autofac:prompt>Implement the change described in {{input.body}}.</autofac:prompt>
    </autofac:agentTask>
  </bpmn:extensionElements>
</bpmn:serviceTask>
AttributeRequiredNotes
agentYesAgent id. Unknown ids run with a generic prompt.
actionYesDrives behavior. Some deterministic actions skip the model.
purposeTypeYesPurpose label used by policy and risk.
policyTagYesPolicy bucket used by the policy engine.
environmentNoExample: ci, staging, production.
requiresEvidenceNoCSV of required evidence items.
executionModeNolocal, tool_sandboxed, or agent_sandboxed.
sandboxProfileNooffline, repo-read, repo-write, or deployment.
permissionLevelNoread-only, read-write, or full.
allowedTools / deniedToolsNoCSV allow/deny lists narrowing the agent's tools.
prompt, promptFile, autofac:promptNoTask instructions with run-context interpolation.
includeAgentOutput / outputFromNoInclude prior output in a pull request body.
maxRetries, retryBackoffSecondsNoRetry policy.

Deterministic tool actions

These actions dispatch to the Tool Gateway without a model call:

  • github.read_issue
  • github.create_branch
  • github.create_pull_request
  • github.create_pr
  • github.request_review
  • github.post_review
  • cicd.trigger_deploy
  • registered mcp.* tools

autofac:approvalTask

Use autofac:approvalTask on a BPMN userTask.

xml
<bpmn:userTask id="Review" name="Code Review">
  <bpmn:extensionElements>
    <autofac:approvalTask purposeType="code_review" policyTag="human-code-review" />
  </bpmn:extensionElements>
</bpmn:userTask>
AttributeRequiredNotes
purposeTypeYesShown on approval cards and used for risk display.
policyTagYesPolicy bucket for the approval boundary.

The run pauses until a decision is posted to POST /api/approvals/{id}/decision.

autofac:externalEvent

Use autofac:externalEvent on a receiveTask or message intermediateCatchEvent.

xml
<bpmn:intermediateCatchEvent id="WaitForMerge">
  <bpmn:extensionElements>
    <autofac:externalEvent
      messageName="github.pull_request.merged"
      correlationKeyTemplate="{{input.branch_name}}" />
  </bpmn:extensionElements>
  <bpmn:messageEventDefinition />
</bpmn:intermediateCatchEvent>
AttributeRequiredNotes
messageNameYesEvent type to wait for.
correlationKeyTemplateYesTemplated key matched against the inbound event.

Timers

An intermediate catch event with a BPMN timer event definition pauses the run for the configured duration.

Run-context variables

VariableDescription
{{input.*}}Values seeded at run start.
{{output.<NodeId>}}Output of a prior step.
{{event.*}}Payload from a resumed external event.
{{run_id}}Current run id.
{{step_id}}Current step id.
{{node_name}}Current BPMN node name.
{{agent_name}}Current agent name.
{{action}}Current task action.

Apache-2.0 open core. Enterprise-only capabilities are labeled in context.