Skip to main content
Version: 1.x

Constraints Summary

ConstraintWorkflow codeActivity code
IONot allowedAllowed
Mutable global variablesNot allowedAllowed
Non-deterministic functionsNot allowedAllowed
Carbon::now()Not allowedAllowed
sleep()Not allowedAllowed
External side effectsMove them into activitiesAllowed only when safe to repeat

Workflow code must be deterministic because the engine rebuilds orchestration state by replaying recorded history. Given the same workflow input and history, the workflow body must make the same durable decisions in the same order. The workflow body does not need to be idempotent; determinism is the replay requirement.

Activity side effects must be safe to repeat because an activity may be retried after a failure or lost response. Usually that means making the external effect idempotent with a stable key, deterministic target resource, or naturally idempotent operation.

See Idempotent vs. Deterministic Workflows for a direct comparison and examples that separate the two properties.