private readonly EventDispatcherInterface
$dispatcher,
private readonly AppFlowActionProvider
$appFlowActionProvider,
private readonly AbstractRuleLoader
$ruleLoader,
private readonly FlowRuleScopeBuilder
$scopeBuilder,
$actions ) { $this->actions =
$actions instanceof \Traversable ?
iterator_to_array($actions) :
$actions;
} public function execute(Flow
$flow, StorableFlow
$event): void
{ $state =
new FlowState();
$event->
setFlowState($state);
$state->flowId =
$flow->
getId();
foreach ($flow->
getSequences() as $sequence) { $state->delayed = false;
try { $this->
executeSequence($sequence,
$event);
} catch (\Exception
$e) { throw new ExecuteSequenceException($sequence->flowId,
$sequence->sequenceId,
$e->
getMessage(),
$e->
getCode(),
$e);
}