Azure Durable Functions #4 – Orchestrator Constraints
There are some constraints when adding code in to the orchestrator code. It is because of the replay behavior in orchestrator. When you adding code in to Orchestrator make sure you follow the following rules. (Not hard to follow :) ) 1. Orchestrator should be deterministic This means we should not add following type of code in to it. Getting current date time : This is because when it replays value will be changed Generating random numbers or Guids : This is because when it replays value will be changed Getting values from a DB : This is because when replayed values in the DB could be changed If you want to have such values in the orchestrator you could Pass it to orchestrator in the parameter when calling it Create a separate function activity to get the value and call it in the orchestrator 2. Orchestrator should be non blocking No I/O calls or Thread.sleep should be used 3. Orchestrator should never initiate any async operation This is because orchest...