Skip to content

Dispatch a local task

Use this workflow to send one task to a configured integration and entity through the connected ECN.

The runnable dispatch example publishes one task request and, when the selected mode expects it, subscribes only to the exact derived response topic.

Terminal window
python examples/dispatch_task.py --check
export ECN_TARGET_ENTITY_ID=00000000-0000-4000-8000-000000000001
export ECN_TARGET_INTEGRATION=authorized-receiver
export ECN_TASK_COMMAND=echo
export ECN_TASK_MESSAGE='synthetic message'
export ECN_TASK_MODE=complete
export ECN_TASK_TIMEOUT=10
python examples/dispatch_task.py

Dispatch is a mutation and is prohibited in read-only validation. The SDK uses the literal source="local" compatibility profile when ECN_TERMINAL_ID is absent. When that canonical UUID is configured, it becomes the request source, matching the normal terminal-derived wire. The request topic remains unprefixed.

An unprefixed task can be forwarded when the deployment routes the task family, so “local” is not an infrastructure guarantee. Use the terminal-addressed task workflow when one configured target terminal is required. A timeout or caller cancellation cleans up the response subscription but does not publish a cancellation request.

When a human must review and confirm a task before publication, continue with the operator workflow.

Version 0.2.0 · branch main