Skip to content

Commit 0190729

Browse files
Document invocable carrier SDK reference
Add the invocable carrier reference page and navigation entry for the Python SDK docs.
1 parent 7d55171 commit 0190729

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pip install 'durable-workflow[prometheus]'
2525
- **[Metrics](reference/metrics.md)** — pluggable recorders, including a Prometheus adapter.
2626
- **[Serializer](reference/serializer.md)** — payload encoding and decoding helpers.
2727
- **[External storage](reference/external_storage.md)** — reference envelopes and driver contracts for large-payload offload.
28+
- **[Invocable carriers](reference/invocable.md)** — activity-grade external-task adapter for HTTP and serverless handlers.
2829
- **[Sync helpers](reference/sync.md)** — blocking wrappers around the async client for scripts and tests.
2930

3031
## Versioning

docs/reference/invocable.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Invocable Carriers
2+
3+
`InvocableActivityHandler` is the reference adapter for activity-grade external
4+
execution. It consumes the stable external-task input envelope, rejects
5+
workflow-task inputs, dispatches a registered activity handler, and returns the
6+
stable external-task result envelope.
7+
8+
Use it for HTTP, serverless, and other bounded carriers that should execute
9+
activities without becoming workflow runtimes. Operators and agents can inspect
10+
the same result contract as poll-based workers: success, retryability,
11+
application failures, cancellations, decode failures, unsupported payloads, and
12+
deadline-exceeded failures all stay in the structured result envelope.
13+
14+
```python
15+
from durable_workflow import InvocableActivityHandler
16+
17+
18+
async def handle_request(request_json: dict) -> dict:
19+
adapter = InvocableActivityHandler({"billing.charge-card": charge_card})
20+
return await adapter.handle(request_json)
21+
```
22+
23+
::: durable_workflow.invocable

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ nav:
7474
- External storage: reference/external_storage.md
7575
- External task input: reference/external_task_input.md
7676
- External task result: reference/external_task_result.md
77+
- Invocable carriers: reference/invocable.md
7778
- Metrics: reference/metrics.md
7879
- Sync helpers: reference/sync.md
7980
- Testing: reference/testing.md

0 commit comments

Comments
 (0)