Cadence Noob
cadenceworkflow.io
Last updated
Was this helpful?
cadenceworkflow.io
Last updated
Was this helpful?
Support: Slack invite -
The main restriction is that the workflow code must be deterministic which means that it must produce exactly the same result if executed multiple times. This rules out any external API calls from the workflow code as external calls can fail intermittently or change its output any time. That is why all communication with the external world should happen through activities. For the same reason, the workflow code must use Cadence APIs to get the current time, sleep, and create new threads.
WorkflowExecutionAlreadyStarted - Cadence guarantees that there could be only one workflow (across all workflow types) with a given ID open per domain at any time.
Cadence identifies a workflow with two IDs: Workflow ID and Run ID. Run ID is a service-assigned UUID. To be precise, any workflow is uniquely identified by a triple: Domain Name, Workflow ID, and Run ID.
The workflow interface can have only one @ WorkflowMethod which is a main function of the workflow and as many signal methods as needed.
Workflow is stateful.
Cadence does not recover activity state in case of failures. Therefore an activity function is allowed to contain any code without restrictions.
ScheduleToStart: Max time an activity is allowed to wait in the queue before a worker picks it up for execution.
StartToClose: Max time an activity can execute after a worker has picked it up.
ScheduleToClose: Max time from workflow requesting the activity execution until it's completion.
Heartbeat: Max time b/w heartbeat requests.
Note: Either ScheduleToClose or both ScheduleToStart and StartToClose timeouts are required.