'integer', 'action_config' => 'array', 'settings' => 'array' ]; public static function booted() { static::creating(function($step) { $step->uuid = Str::uuid('ws'); }); } public function workflow() { return $this->belongsTo(Workflow::class); } public function executions() { return $this->hasMany(WorkflowStepExecution::class, 'step_id'); } /** * Execute the action defined in this step */ public function executeAction($target) { $actionHandler = WorkflowActionFactory::createAction($this->action_type); return $actionHandler->execute($target, $this->action_config); } }