Execution paths
The execution-paths plugin records paths that actually run. It does not enumerate possible graph paths.
import { createExecutionPathsPlugin } from "@rxova/journey-core/plugins";
const machine = createLinearJourney(definition, { plugins: [createExecutionPathsPlugin()]});
await waitUntilSettled(machine);await machine.navigate.goToNextStep();
machine.plugins["execution-paths"].getCurrentPath();const api = machine.plugins["execution-paths"];
api.getCurrentPath();api.getCompletedPaths();The current path receives each settled destination, including initial entry. Completing or terminating moves that path into completed paths and starts an empty current path. Restart then begins a new path when its initial entry settles.
Snapshot
Section titled “Snapshot”machine.getSnapshot().plugins["execution-paths"];// { currentPath: readonly string[], completedPaths: readonly string[][] }Returned collections are readonly copies.