Skip to content

Processing a command

Duncan Jones edited this page Jan 28, 2019 · 9 revisions

Command handler

Running a command overview

A command request is received by an event grid topic, with the parameters required to perform the command passed in the data parameter.

This triggers and azure function which, in turn, calls a Durable Function orchestrator. This orchestrator calls each step in the command handling process individually as Durable Function activities.

These individual steps write their progress to an event stream which underpins the command execution. This allows for post-hoc analysis of what the command handler did to perform that command.

Command logged in a blob

With the exception of the "parameter validation" type of activity steps, the command handling activity functions would not return any value - instead they return a ActivityResponse that is used to log their operation. This includes a FatalError property which should be used to decide whether to proceed to the next step or not.

Logging step status

Each step is responsible for checking the command event stream to see that it is in a state to which it makes sense to run - for example the validation step needs to check that the command has had its parameters written before running.

Clone this wiki locally