getOrCreateInstanceByDefId($person_id, $process_definition_id, $userId); if (!$instance) { throw new WorkflowNotFoundException("Nie można pobrać lub utworzyć instancji procesu."); } $instanceId = $instance['id']; // 2. Fetch all related data $stmt_person = $pdo->prepare("SELECT first_name, last_name FROM people WHERE id = ?"); $stmt_person->execute([$person_id]); $person = $stmt_person->fetch(); $stmt_process = $pdo->prepare("SELECT * FROM process_definitions WHERE id = ?"); $stmt_process->execute([$process_definition_id]); $process = $stmt_process->fetch(); $definition = $process && $process['definition_json'] ? json_decode($process['definition_json'], true) : null; $isChecklist = ($definition && isset($definition['type']) && $definition['type'] === 'checklist'); $events = $engine->getEvents($instanceId); ?>
Brak zdarzeń.