Class: Lyra::Verification::CrudLifecycleWorkflow

Inherits:
PetriFlow::Workflow
  • Object
show all
Defined in:
lib/lyra/verification/crud_lifecycle_workflow.rb

Overview

Petri Net model for verifying CRUD→Event mapping correctness.

This workflow models the lifecycle of an entity through CRUD operations and verifies that:

  1. Every CRUD operation generates exactly one event
  2. Entity state transitions are valid (can't update/destroy before create)
  3. All terminal states are reachable
  4. No deadlocks in the event flow

Examples:

Verify the workflow

workflow = Lyra::Verification::CrudLifecycleWorkflow.new
results = workflow.verify!
puts results[:liveness][:deadlock_free] # => true