Function: eventsForCommands()
eventsForCommands(
state,commands,context):EventsForCommandsResult
The events a command batch appends, in order, or why the batch is refused.
Commands must already have passed validateCommands; this checks them
against the run (ids not reused, cancels of open work only, the run still
running). state is not changed.
Parameters
state
commands
readonly WorkflowCommand[]